windows

Detecting MCI activity in another app (powerpoint viewer 97)

Is there any way of detecting when another app plays audio via MCI? And more specifically, when it stops playing audio? The other app in question is the powerpoint viewer 97 which I believe uses MCI for its audio output. This is for a kiosk type system with XPe - I want to change the settings on attached audio amplifiers when the powe...

C++ Compiler For Windows

Hello, I'm using Windows Vista Ultimate and i want to know what is the best C++ compiler for my Windows, because in Linux i use in somee cases gcc and in others g++, but recently i've installed Windows in my computer and this is the question: What is the best C++ compiler for Windows? Thanks! ...

Kill self if hWnd doesn't exist

I have a c++ console application that launches another application and communicates with it via com. I have the spawned window's hWnd and I want the console app to kill itself if the COM app is no longer open. How could I go about doing this? ...

Detect movie being played (Windows)

Watching a movie is quite a different user activity. User doesn't touch neither mouse nor keyboard. Yet he 'actively' uses the computer. Thus, screensaver shouldn't run, indexing should be performed with care etc. On the other side, playing video requires either using direct write to video memory, or DirectShow, or some other API. This...

Using Cheetah Templating system with windows and python 2.6.1 (namemapper problem)

So I am trying to use the Cheetah templating engine in conjunction with the Django web framework, and that is actually working fine. I did some simple tests with that and I was able to render pages and whatnot. However, problems arise whenever doing anything other than using very simple variable/attribute/methods in the Cheetah templat...

How do I add a static dependency to a dll (advapi32.dll) from the cl.exe command line?

I'm sure there's something simple I'm missing. I'm running from the Visual Studio Command Prompt. ...

Prevent opening a second instance

What's the easiest way to check if my program is already running with WxPython under Windows? Ideally, if the user tries to launch the program a second time, the focus should return to the first instance (even if the window is minimized). This question is similar but the answer is for VB.NET. ...

Any way to allocate physical memory above 4GB on Vista x64?

I have a Vista x64 machine with 6GB of RAM, and I'm attempting to test that a device driver functions properly when doing DMA to physical addresses above 4GB. I've found the AllocationPreference registry key, which is supposed to "force allocations to allocate from higher addresses before lower addresses", but the page isn't clear wheth...

quick way to scripting or creating programs on Windows?

what's a good way to scripting or creating programs unders windows? ...

(Windows) Permanently altering a user's %PATH% via batch or Python

I'm packaging a Python project with setuptools and distributing it with easy_install, which allows me to place an executable file in a Scripts directory, hidden away inside the Python directory. For Linux users who run easy_install as root, there will be added a symbolic link in a standard bin directory (/usr/bin/, iirc). For Windows u...

How to update an older C extension for Python 2.x to Python 3.x

I'm wanting to use an extension for Python that I found here, but I'm using Python 3.1 and when I attempt to compile the C extension included in the package (_wincon), it does not compile due to all the syntax errors. Unfortunately, it was written for 2.x versions of Python and as such includes methods such as PyMember_Get and PyMember_S...

How do I create a Sidebar for my application in VC++?

How do I create a Sidebar for my application in VC++? Something similar to the one on Windows Vista or even Google Desktop Sidebar, which can be docked to the desktop window rather than to the application window. ...

How to check if the files exist on the FTP server ?

I have a ms-access application, now I need to check if that file had already uploaded before and then change the status of that record, is any tools or command we can use to check if the file exists? Or even some other appliaction I can use on windows and be able to update the records in the SQL server database. Environment: Ms-Access ...

Is ExAllocatePool deprecated? What use instead?

I am using ExAllocatePoolWithTag and the builder warns me about ExAllocatePool being deprecated. Is this just an artifact, because the former uses the latter? If not, what is to be used instead? ...

CPU load of the running process

I need to programmatically know (c/c++) what is the instant CPU load of the current running process. Win32 API offers a lot of low level API but I am unable to find one that gives me the current CPU load of my running c/c++ program. The question is: how to programmatically know how many percents of CPU load the current process is using....

Getting the number of logged on users in Windows

Hello! Let's say I have 3 logged on users. I have a test application which I use to enumerate the WTS sessions on the local computer, using WTSEnumerateSessions. After that, I display the information contained in each of the returned WTS_SESSION_INFO structure. On Windows XP, there are 3 structures displayed: Session 0, 1, and 3 (for e...

windows: command line used to launch a program

How can I find out the command line options a program was launched with under windows? ...

How to show an openfile dialog on windows ?

I'm trying to get an openfile dialog to show up on windows CE 6.0 according to msdn it's the same process as in win32, but it doesn't work. I submit for review the interresting part of the code : #include <windows.h> #include <commctrl.h> #include <winuser.h> #include <stdio.h> #include <Commdlg.h> /* Prototypes */ LRESULT CALLBACK ...

How to compile a 64 bits version of my dll?

Hi all, Probably a dumb question: I have a WinXP 32bits desktop that I use to compile a (32 bits) dll with Visual Studio 2005/Intel COmpiler 10.1. I would like to generate a 64 bits version of my dll. How to do that? Answers related to Visual Studio are interesting, but those addressing the Intel compiler side of things get extra browni...

.Net classes to control services on a remote machine?

Hi all, Yes I could google this but I'm being a little lazy. I need to remotely control windows services on another machine. Does the ServiceController class let me do this? What restrictions are there? Can I start / stop / change the "run as" details remotely, ie change a password that's due to expire? I'll be attempting to give ...