windows

Would std::basic_string<TCHAR> be preferable to std::wstring on Windows?

As I understand it, Windows #defines TCHAR as the correct character type for your application based on the build - so it is wchar_t in UNICODE builds and char otherwise. Because of this I wondered if std::basic_string<TCHAR> would be preferable to std::wstring, since the first would theoretically match the character type of the applic...

What is your top motivation to program for or use Windows as development platform?

Microsoft has great technology, but core assets, such as code, remain closed. Developers likes to have control over their development environment (and eventually on the deployment platform as well) - so what is your top motivation to develop for a closed source platform? ...

Does SetupDiGetClassDevs work with device instance IDs as documented?

According to MSDN documentation, SetupDiGetClassDevs can be passed a device instance ID to obtain a device information set for a specific device: To return only a specific device, set the DIFCF_DEVICEINTERFACE flag and use the Enumerator parameter to supply the device instance ID of the device. I get the device instance ID by...

Using ChangeDisplaySettingsEx in Delphi to set primary monitor

I'm trying to use ChangeDisplaySettingsEx in Delphi 7 to set a specific monitor as Primary. In Windows.pas, it is defined as function ChangeDisplaySettingsEx(lpszDeviceName: PChar; var lpDevMode: TDeviceMode; wnd: HWND; dwFlags: DWORD; lParam: Pointer): Longint; stdcall; In MSDN, the documentation for ChangeDisplaySettingsEx...

how can I programatically get the name of an application?

I'm developing an orthogonal. Reporting/Logging system for several applications and was wondering how I can get an applications name on Windows using C/C++? the obvious requirement is I can't get it as a commandline argument or have the application tell me directly so I need to query the OS. Thanks for any ideas! ...

retrieving current drive letters in windows (from python)

Possible Duplicate: Is there a way to list all the available drive letters in python? What's the way to retrieve currently mounted drive list in Windows incl. Thumb drives, and mapped networks. i currently do drives=[] for c in string.lowercase: if os.path.isdir(c+':'): drives.append(c+':') which lo...

Opening the Add/Remove Programs dialog takes too much time

Hi, I'm on a WinXP Pro SP3 box. Some time ago, I noticed that opening the Add/Remove programs window takes a lot of time. The window itself opens, but it's building the list that takes so long. I fired FileMon from SysInternals, and it turned out that the process that's supposed to list the programs tries to open every file on my HD. A...

How to detect if my program is running in Windows?

I am writing a C# console app. It's going to run as a scheduled task. I want my EXE to exit quickly if it finds that another process is still running from the previous schedule task execution. I can't seem to find the way to let my app detect the active processes, and so know whether it's already running or not. Thanks for any ideas...

C++ Compiler for Windows without IDE?

I'm looking for just a compiler for C++ (such as g++) for Windows, that I could run in my cmd. I'm using notepad++ as my text editor and I want to set up a macro in there that can compile my programs for me. I do not wish to install Cygwin though. Any suggestions? Thanks in advance :) ...

In what OS should I host subversion?

I have decided to go with Subversion for a source control repository for my personal and side projects and I'm now trying to decide what OS to use. Currently my file server for my home network is Windows 7 beta. I'm wondering if I should wipe it and install Windows Server 2008 instead? Basically I'd like to know if there are things I ...

Force Windows to show a system tray icon

This is a pretty stupid question, but here goes: Is there a way (in .net) to force Windows to show your system tray icon instead of hiding it? I don't want to do this all the time, but at least for the first time my application is run I would like it to be visible in the system tray. ...

Determining “System Load”

Does anyone know an elegant way to determine “System Load” preferably using Windows performance counters? In this case I mean “System Load” in the classical (UNIX) sense of the term and not in the commonly confused “CPU Utilization” percentage. Based on my reading … “System Load” is typically represented as a float, defining the numb...

trapping http/https requests in windows

Is it possible to trap http/https requests for filtering in windows? ...

My C Program provides a callback function for a hook. How can I keep it alive, un-kludgily?

Currently, I'm spawning a message box with a OS-library function (Windows.h), which magically keeps my program alive and responding to calls to the callback function. What alternative approach could be used to silently let the program run forever? Trapping 'Ctrl-c' or SIGINT and subsequently calling RemoveHook() for a clean exit would ...

SVN checkin as different users on Windows

I would like to have an option to select what user that I'll do my checkin as when checking in from Windows. When using TortouiseSVN it seems like the authentication information is stored per repository and it cannot be changed. What would be a good way to make it easily possible to checkin as different users using SVN in windows? ...

I need a beginners guide to setting up windows for python development

I currently work with .NET exclusively and would like to have a go at python. To this end I need to set up a python development environment. I guide to this would be handy. I guess I would be doing web development so will need a web server and probably a database. I also need pointers to popular ORM's, an MVC framework, and a testing lib...

Is there any Win32 API to trigger the hibernate or suspend mode in windows?

Is there any Win32 API to put the machine into hibernate or suspend mode? I read MSDN and found that WM_POWERBROADCAST message gets broadcasted when power-management events occur. I thought of simulating the same with PostMessage(WM_POWERBROADCAST). Is this the correct way of doing or any Win32 API exists to achieve this? ...

How to implement a voice changer?

Hi all,I want to write a app which change the microphone input voice and make it like robot or some funny man's voice.It must support send changed voice to all application like im software or game client.which technology should I pick up? Windows WaveForm Api? DirectX ? audio driver? Thank you very much! ...

Asynchronous Windows Console input whilst outputting

Hey all, Long time reader, first time poster :D I'm having issues trying to read input whilst outputting at the same time. I need a server console for my game which can receive input whilst outputting and not mess up the buffer. For example, I'm typing "Hello world" and in the process, player deaths, kills, etc. are being outputted in...

How to change a value in memory space of another process

Hi all, If you could help me with this dilemma I have. Now, I know C \ C++, I know asm, I know about dll injection, I know about virtual memory addressing, but I just can't figure out how software like CheatEngine, and others, manage to change a variable's value in another process. For those who don't know, 3rd party cheat engine tools ...