windows

Sparse Files and Disk Quotas

Suppose, My D: volume capacity is 100GB. And I'm using it 80GB now. The remain is only 20G. Now, I try to make a sparse file. DWORD written; std::wstring s = L"D:\\sparse9.test"; HANDLE h = CreateFileW(s.c_str(), GENERIC_WRITE, FILE_SHARE_DELETE, 0, CREATE_NEW, 0, 0); if(!DeviceIoControl( h, FSC...

jQuery function is fired twice in IE...?

I have a function that fires when the scroll bar hits the bottom. For some reason now, IE is firing the event twice. It wasn't doing it before. I don't have a duplicate function, and not have the JS declared twice. It's fine in Opera, FF, Chrome. I don't know why it's doing so in IE. Oh how I hate M$ and this troublesome browser. jQuer...

Python WSGI deployment on Windows for CPU-bound application

What options do I have for the deployment of a CPU bound Python-WSGI application on Windows? The application benefits greatly from multiple CPUs (image manipulation/encoding) but the GIL prevents it from using them. My understanding is: mod_wsgi has no support for WSGIDaemonProcess on Windows and Apache itself only runs with one proc...

How to get Environment.SpecialFolders.MyVideo folder in .NET 2.0?

Can anyone tell me how to get the Environment.SpecialFolders.MyVideo folder in .NET 2.0? In .NET 4.0, the MyVideo folder is listed in the enum Environment.SpecialFolders, but under .NET 2.0 it is not existant. Which way would you go if you had to find that folder under .NET 2.0 with different Windows localisations and OS versions? ...

Adding HTTP header to all outgoing packets on Windows?

I am developing a Windows application that will live in the system tray. The application can be enabled/disabled by the user. Whenever the user enables it, it needs to listen/sniff HTTP traffic and add a specific HTTP header on all outgoing packets. I think it can be done by changing the system or browser settings to be localhost:my_po...

How can I generate system wide events on Windows?

I would like to know how I can generate system wide events programatically on Windows. I am thinking of generating system wide events such as key presses, touch events and mouse clicks mainly. Is it possible to generate these events with an user mode application or I need to write drivers for this? Any samples or links would be usefull...

Best way to CRUD printers and ports using C#

I have to create, read, update and delete network printers using c# and their associated ports. I have to deal with clustered print servers, so WMI is not an option. My first choice would be using prnadmin.dll, but I cannot find reliable information if this would work and is supported under windows server 2008 x64. Can anyone share his/h...

How to detect when window content has changed

I need to write a screencast, and need to detect when window content has changed, even only text was selected. This window is third party control. ...

How to create Windows Service using JRuby?

I know we can create windows service using win32-service gem which is available in Ruby. How we can create a windows service in JRuby, is there any java-specific way which can be re-used ?? ...

Blocking function call

Hello, I am writing a small test application to test a communication interface. The communication interface is written in C++ (a DLL) and the test application using C#. The communication interface in turn talks to a low level hardware stack which uses windows messages to transmit and receive data. In order to achieve this, the commuicat...

postgres- start process under administrator account

Is it possible to start postgres process with a user account that has "administrative" privileges? I am on windows XP. --Error shown is --- (Not really error, it is a security feature) The server must be started under an unprivileged user ID to prevent possible system security compromises. See the documentation for more information on...

Why is this batch file producing extra, unexpected, unwanted characters?

I'm trying to use the following batch script to concatenate some files together: copy NUL bin\translate.js for %%f in (source\Libraries\sprintf.js, source\translate-namespace.js, source\util.js, source\translator.js, source\translate.js) do ( type %%f >> bin\translate.js echo. >> bin\translate.js ) However, when I do this, an ...

Possible to pre-empt the Windows message loop?

I have a wpf application that populates an Infragistics XamDataGrid by the usual method of binding an observable collection to the grid. As each data item is populated into the collection, one at a time, the grid updates. I also have a cancel button that I would like to immediately stop the population if the user clicks it. However, it ...

What are the default APPDATA directories each version of Windows?

Is there a list of default APPDATA directories each version of Windows? (XP & up) I need to know the default directory each OS will return for the following call: SHGetSpecialFolderLocation( NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE , &pidl ); ...

How to use Python's "easy_install" on Windows ... it's not so easy!

After installing Python 2.7 on Windows XP, then manually setting the %PATH% to python.exe (why won't the python installer do this?), then installing setuptools 0.6c11 (why doesn't the python installer do this?), then manually setting the %PATH% to easy_install.exe (why doesn't the installer do this?), I finally tried to install a python ...

version control with minimum hassle

I'm looking for a program, that is capable to monitor file deletions/creation/renames and issues appropriate version control commands automatically. Using bazaar and subversion. Is there any? ...

Read RSS on Windows Phone 7 and Pass data to next Page

On Windows Phone 7: I want to read RSS feed with 3 different field: Title, Description-1, and Description-2. But I want to show only title and description-1 in main page as listbox. When user click on each item then it goes to next page which just show title and description-2 field related to the item user clicked on it. How do we do ...

Getting the keyboard cursor location/coordinates in all applications.

Right now I'm using the functions GetCaretPos() and GetGUIThreadInfo() to get the current keyboard cursor/caret coordinates. These work properly in applications like Notepad and Wordpad and return the correct coordinates, but in applications such as Firefox, Thunderbird, and others, the coordinates returned are always 0, 0, no matter whe...

DLL monitoring.

Is there an application which allows me to see what is being sent to a DLL from a process? I have a process and I have a DLL and I would like to monitor the parameters that are being sent to the functions so that I can use the DLL myself. The EXPORT of the DLL is. ??0CCPCompressor@@AAE@XZ ??0CCPExpandor@@AAE@XZ ??1CCPCompressor@@AAE@X...

How can I retrieve the "Minimum allowed"/"Recommended"/"Currently allocated" values of paging file size on Windows using C++?

Windows XP/Vista/7 System Properties Advanced tab Settings... button under Performance Advanced tab Change... button The numbers at the bottom of that window in the "Total paging file size for all drives" section Anybody know how I would go about getting those three numbers from within a C++ program? Thanks! ...