windows

C# get width/height of image on web without downloading whole file?

I believe with JPGs, the width and height information is stored within the first few bytes. What's the easiest way to get this information given an absolute URI? ...

Sample N Tier Windows Forms Application - C#.NET

Hi, I am new to .NET Windows Forms Applications. Would you please let me know if there is any sample ’N Tier Windows Forms Application’ built on C#.NET so that I could go through it and understand the concepts? It would be of great help to me. Many thanks. Regards, Reshma. ...

read XLS file through batch script

This works:- for /F "tokens=4 delims= skip=1" %%x in (myfile.txt) DO echo %%x But not this:- for /F "tokens=4 delims= skip=1" %%x in (myfile.xls) DO echo %%x How can i read xls without converting to tab saperated? XLS = Excel file ...

CoCreateInstance returning E_NOINTERFACE even though interface is found

I have a COM class CMyCOMServer implementing IMyInterface in one application, both with correct GUIDs. CMyCOMServer::QueryInterface will return S_OK (and cast itself to the right type) if IUnknown or IMyInterface is requested, otherwise it returns E_NOINTERFACE. In another app on the same PC, I call: HRESULT hr = ::CoCreateInstance(__u...

Using pcap in VS .NET 2003 and error C2085, C2061

Hi all, I'm new to using Visual Studio. I'm currently using VS .NET 2003 on Vista, and I'm trying to port a program from Linux to Windows. The program uses the pcap library. I have installed WinPcap 4.0.2 and downloaded the Developer's Pack WpdPack_4_0_2. However, I have no idea what to do with the developer's pack, i.e. what do I do w...

Does hg pull only operate on the current working directory?

I have multiple mercurial repositories and used hg clone to create backups of them on our file server. Now I want to write a batch file that updates them once a day by running hg pull -u on each subdirectory. I want to keep this backup script as generic as possible, so it should update all backup repositories stored in my H:\BACKUPS\REP...

MSN Messenger/Growl Style Alerts in Windows C++

Does anyone know of any C++ Libraries which I can easily integrate in a project to allow me to show MSN Messenger/Outlook/Growl style toast popups? Tried having a look and found lots of Visual Basic controls etc but nothing for C++ so far. ...

Itask::put_Body() and itask::get_body() Need help on win ce based device

Hi, I am trying to add to-do item to win ce based device.... Hresult hr = put_body(text("help me")) givin hr as S_OK... but while reading body part using get_Body(&bstr) getting bstr ="" even though hr returned is S_OK.....May i know the reason plz... thanks in advance ...

Distribute a Python program with a minimal environment.

I want to distribute a Python application to windows users who don't have Python or the correct Python version. I have tried py2exe conversion but my Python program is really complex and involve code import on the fly by xmlrpc process so it is not suitable for py2exe. The complete Python folder takes around 80MB but this includes docs...

Retrieve all users from Active Directory (LDAP) using VBScript

How can I retrieve all users from Active Directory using VBScript? ...

BooKmark or favorites Apis for Windows Mobiles

How do i access bookmarks ie favorites from Windows mobiles using C# or win32 APis. ...

How do I pass multiple heap arrays to a new thread?

Hello everyone, I'm trying to learn how create new threads and run them. I need to pass a few variables into the function that is run on the new thread but I can't find out how to actually pass anything to that new function/thread. I'm following http://www.devarticles.com/c/a/Cplusplus/Multithreading-in-C/1/ but it only goes through h...

C++ Parsing a line out of a large file

I have read an entire file into a string from a memory mapped file Win API CreateFile( "WarandPeace.txt", GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0 ) etc... Each line is terminated with a CRLF. I need to find something on a line like "Spam" in the line "I love Spam and Eggs" (and return the entire lin...

What does "Unhandled Exception: GLib.GException: Unhandled tag: 'requires'" mean?

I'm trying to get my linux Gtk# application working on Windows. When I try to run it, I get this error message: Unhandled Exception: GLib.GException: Unhandled tag: 'requires' at Gtk.Builder.AddFromFile(String filename) at Interface.MainWindow..ctor() at [My Project Name].MainClass.Main(String[] args) in c:\Path\...

Best Rails / Android / Appcelearator development OS if have no money to buy a Mac

What operating system do you recommend. Currently I have Vista installed but it isn't developer friendly. I'm doing rails apps and learning Android development an Appcelerator. Oh, and haven't the budget for a Mac :( ...

Pylons howto get windows user

Is it possible to get the current windows user from with in pylons? I am starting a pylons app that is going to be used from within a controlled Windows domain. Is it possible to get the logged on user? Much like I would do in ASP.NET with Page.User.Identity.Name. ...

How to print out encoded Asian characters(gb2312) on command prompt?

Hi all: I am working for a company that uses the Python programming language version 3.1 as a causal work now. And I've encountered this problem: how to print out some encoded Asian characters(Chinese, Japanese, Korean) on command prompt? Done a bit research and tried, but got no luck: import sys import codecs print(sys.getdefaultenco...

Where do you assign the .ico file to display for a program's Unisntall (in Add/Remove programs) in Windows?

I want to assign an icon to display next to my app's Uninstaller in the Windows Add/Remove programs. I assume that would be in the Registry setting for the uninstaller, but I don' see an obvious place to assign that. ...

Is there a way to get access to a window handle in windows using WSH, or WMI or similar?

Is there a way to get access to a window handle in windows using WSH, or WMI or similar? I just want to flag a window as always-on-top. Ideally I'd use windows script host for this. Please note, I don't want to install PowerShell on the system in question. We are nervous about any additional software and already have some VBS files inv...

while loop in batch

Hello Here is what I want, inside the BACKUPDIR, I want to execute cscript /nologo c:\deletefile.vbs %BACKUPDIR% until number of files inside the folder is greater than 21(countfiles holds it). Here is my code: @echo off SET BACKUPDIR=C:\test for /f %%x in ('dir %BACKUPDIR% /b ^| find /v /c "::"') do set countfiles=%%x for %countfiles%...