windows

Get a list of the available drives and their sizes

I know you can use a combination of GetLogicalDrives() and GetDiskFreeSpaceEx() to get the list of drives and their sizes. I've been using GetDiskFreeSpaceEx() with no problem but when I try to use GetLogicalDrives() I ran into a problem: I don't want to have to check each possible letter to see whether it exists or not before passing it...

is there a Mercurial installer equivilant to VisualSVNServer?

I am using windows 2003R2 VisualSVNServer installs and works easily. I have been tasked with reviewing Mercurial, but I'm having trouble setting up the directory for Apache. is there any equivialant of the VisualSVNServer installer for Mercurial? ...

Opening files with default Windows application from within emacs

I'm trying to tweak the dired-find-file function in emacs on Windows XP so that when I open (say) a pdf file from dired it fires up a copy of Acrobat Reader and opens that file with it, instead of opening it within emacs. But I can't work out what variant on shell-command/call-process to use. Here's what I have so far: (defadvice dired-...

Why does Perl's IO::Socket on Windows complain about "Resource Not Available" after 64 connections?

I created a server with Perl under Windows (ActivePerl 5.10.1 build 1006) that forks upon being connected to, accepts some JSON data, and writes it to a database. I am running into a problem after 64 clients connect to the server, the error message being "Resource is not available" when trying to fork. Running this code under Linux I f...

What error codes does RegOpenKeyEx return on failure?

The MSDN documentation: http://msdn.microsoft.com/en-us/library/ms724897(VS.85).aspx Is strangely silent on what errors this function might return. I'm particularly interested in what error code is returned if the key doesn't exist, but more comprehensive information would be nice too. ...

Restrict application to one instance per shell session on Windows

There are a lot of solutions for restricting an application from running twice. Searching by process name, using a named mutex etc. But I all of these methods don't work if I want to restrict my application to the shell session. A user may have more than login session and shell on windows (right?)? If this is true I want to be able to r...

How do I insert CData value into azure table storage row

Hi geeks, I just can't insert a CData value into table row. my new table entity is like new Book { Description = new XCData("Asp.net<What>XXXXX</What>").ToString(), CreatedOn = DateTime.Now, }) and then I insert the book via context. THe result: <Properties><CreatedOn>2010-02-18T10:17:10.953Z</CreatedOn><Name>&lt;![CDATA[Asp.net&...

What is the difference between reading keyboard input asynchronously and using DirectInput?

DirectInput requires a lot of initialization functions and cetera to detect keyboard input, so what benefits are there to using it rather than the GetAsyncKeyState() function? ...

How to deny accessing to a service?

Some services can't start or stop with Service Management Console. ex) DcomLaunch, SamSs These services's stop button is disabled on Service Management Console. So, we can't stop the services.(Even if we have a Administrator account) Is it possible? How can I do that? Thanks in advance. ...

Free Lightweight IDE/Text Editor for Windows - C++ Development

I have searched a lot for the exact development tool that fits my requirements, but could not find it anywhere. Here are my requirements: 1) Free. 2) Lightweight. (Eclipse is out). 3) Can handle a large project. 4) Input: Just the source tree, and possibly makefiles. No project/solution files. 5) Indexing - Auto Completion and "Go ...

Detect if a windows machine has a virus scanner running?

Possible Duplicate: Detect Antivirus on Windows using C# In .net I would like to be able to detect of a windows box has a virus scanner running. Windows 7 knows because in "Control Panel\System and Security\Action Center" it reports the status of your virus scanner. ...

How to Check whether the current logged in user is member of Administrators group?

Hi, How to Check whether the current logged in user is member of Administrators group or not? in vbscript. Thanks, ...

C++ socket windows

Hello all , I have question. I create socket , connect , send bytes , all is ok. and for receiving data i use recv function. char * TOReceive= new char[200]; recv(ConnectSocket, TOReceive , 200, 0); when there are some data it reads and retuns, succefull , and when no data waits for data, all i need to limit waiting time, for ex...

Getting location of a file: network or local

What is the easiest way in Windows to get the location of a file? I have a filename that was returned to me by the Windows function GetModuleName (returns the full name of a module (exe or dll)), and which could be in any valid filename format, e.g. myfile.dll c:\windows\myfile.dll \?\c:\windows\myfile.dll (or something like this) x:\...

Winpcap MinGW compile error

I'm experimenting with WinPcap 4.1.1 libraries for Windows, but I can't manage to compile even example source provided with the library. I'm getting these errors: 'PCAP_OPENFLAG_PROMISCUOUS' undeclared (first use in this function) 'PCAP_SRC_IF_STRING' undeclared (first use in this function) And bunch of warnings: implicit d...

Enumerate CD-Drives using Python (Windows)

How can I find out the drive letters of available CD/DVD drives? I am using Python 2.5.4 on Windows. Thanks in advance. ...

How to run webkit on Windows?

Is it possible to integrate it with VS.NET? ...

Windows & C++: extern & __declspec(dllimport)

Hello, What is the difference/relationship between "extern" and "__declspec(dllimport")? I found that sometimes it is necessary to use both of them, sometimes one is enough. Am I right that: "extern" is for statically linked libraries, "__declspec(dllimport)" is for DLL (dynamically linked libraries), both do actually the same job fo...

What are the negative consequences of using /LARGEADDRESSAWARE for 32 bit Windows executables

We need to link one of our executables with this flag as it uses lots of memory. But why give one EXE file special treatment. Why not standardize on /LARGEADDRESSAWARE? So the question is: Is there wrong with using /LARGEADDRESSAWARE even if you don't need it. Why not use it as standard for all EXE files? ...

Why close all other applications before running installer?

Most windows installers includes a recommendation that you "close all other applications before continuing". I can imagine this may have been necessary in old versions of windows. And it may be for a small number of installations now. But surely it isn't needed for most installs. Is it? I'm creating an installer for my own (pretty simpl...