windows

Win32 API analog of sending/catching SIGTERM

Under POSIX OS there is signal API that allows to send a signal to process to shut it down with kill and you can catch it with sigaction and do what you need; However, Win32 is not POSIX system, so: How can I handle shutdown events that may come, for example from "End Process" in "Task manager"? What is the standard API for sending sh...

Code Signing for my Lauch4J/NSIS Installer on Windows XP?

What is the procedure for signing my code so that when user clicks on the installer it does not prompt unknown vendor. My Setup is, Application is java based. I wrap jar with launch4j Installer is based on nsis. My build platform is xp. One other thing when installation is finished i get a pop up saying installation was not succesful...

Cannot add folders and files to Windows Installer package

I' m using Visual Studio to create windows installer package, i can't add the folders and data files needed for the application. I create the folders needed for the application in the 'application folder'(under 'File System on Target Machine'), then add files into the appropriate folders, and when i install the application and go to the ...

filesize and linelength limits for windows batch files

Hey, I am generating a Windows batch file that might become quite large, say a few megabytes. I've searched on possible limits regarding the maximum file size and maximum length of a line in a batch file but couldn't find anything. Any practical experiences? ...

How to store arbitary text (including '\') in the Windows registry

I am storing some short user data strings in the Windows registry. This worked fine until one of my users tried to store a string containing a '\' character. This was then interpreted as a registry path delimiter. What is the best practice for avoiding this problem? Some sort of simple encoding? Note/ I am using the Qt QSetting class t...

Adding Windows Form to a DirectX application?

I'm working on a directx application and was wondering how I could add a regular window to the application, one which has text boxes, command buttons and all. ...

How to convert Win32 HRESULT to int return value?

I'm writing a Windows console application in C++ and would like to return zero on success and a meaningful error code on failure (i.e., S_OK should return 0, and E_OUTOFMEMORY should return a different return value than E_FAIL and so on). Is the following an okay approach?: int wmain(int argc, wchar_t *argv[]) { HRESULT hr = DoSomet...

How to disable Visual C# activity from appearing in My Recent Documents?

Hi, I would like activity in my Visual C# 2008 Express to not appear in My Recent Documents (I use Windows XP). To clarify, when you open a solution or other file in Visual C#, a link to that solution or other file is added to "My Recent Documents". I would like that not to happen. How can that be achieved? I know there's a chance thi...

Extract resources from PE file via script/command-line

I want to write a script (or something similar. don't care which language) which extracts the resources from a PE file (.rsrc section). I'm using Python's pefile and peutils for various PE tasks, but couldn't find anything which actually extracts the resources. Any help will be appreciated. Thanks, Moshe ...

How to add a new button to windows explorer?

Hi I want to know how to add a new button in windows explorer. I don't want to create a new toolbar. I just want to add a new button in the same windows explorer standard buttons toolbar and not IE. I appreciate any help possible. Regards ...

Counting the total of same running processes in C++

Hello there, I'm looking for a way to detect the # of running processes that has same process name. In example, I ran notepad three times. notepad.exe notepad.exe notepad.exe So it will return 3. I currently have these code to detect a running process, but not counting its running process quantity. #include <iostream> #include <win...

Need to Automate PPTP connectivity from Linux to Windows.

Hi All, I'm in need of setting up cron-based VPN connectivity from Ubuntu "Jaunty" to a Windows-based VPN over PPTP for incremental DB synchronization. Using the default Network Manager and PPTP module everything seems to work fine. However, I have 2 issues: 1) Despite checking "Use this only for resources", I still lose my local in...

Can a C++ dll compiled using Visual Studio 2008 be used with Visual Studio 2005?

I'm going to be working with a C++ library written in plain C++ (not .NET and without MFC). The library is available compiled using both Visual Studio 2005 / Intel Fortran 9.1 and VS 2008 / Intel Fortran 10.1. Obviously I'm going to grab the binaries for VS 2008 since that's the environment on my computer but I'm curious if there are r...

Where can I get information about the C/C++ linker in Visual Studio?

I'd like to learn more about C/C++ linker issues and troubleshooting in Visual Studio. I've had linker problems crop up from time to time and they are really annoying since you get such limited information from the linker error messages. I've seen a few not-so-detailed MSDN articles but nothing in depth. Where can I find a good source...

how to detect the plugin folder as a np plugin of Mozilla Firefox?

Here is a question and background: I wanna use some external resources which distributed with XPI file in "plugins" folder. How can I detect where the folder is and load all these resources? I am in Vista and expect the solution works cross-platform. ...

IE Addin with WebServices under Vista

I have an application that uses Add In Express (a product which creates Internet Explorer Add ons) and it consumes Web Services from within the browser. It works great under XP however - due to I am guessing Vista security it breaks down. I reference http://www.add-in-express.com/forum/read.php?FID=5&amp;TID=3948&amp;MID=18878&amp;phras...

How can you read values from an open application in Windows?

I want to create a program or use a program that will read the memory values out of another application. Does anyone know of an application/library that will do this? The target app is this. I would like to read the exchange rate values from it. I'm an experienced c# programmer, but have never worked with the Win32/user32 api ...

How to distribute an installer which contains a bootstrapper

Due to severe limitations of the Microsoft Windows Installer (MSI) system it is required to create a bootstrapper in order to install multiple MSI files (due to pre/post-requisites). However, this introduces an distribution problem because you now have multiple files that need to be included with the distribution. There are of course mul...

Mapping ISpMMSysAudio::SetLineId and mixerLineId

I want to set the lineId for SAPI by calling ISpMMSysAudio::SetLineId. I find out the line which I wish to set from the mixer handle I have. However the line id I get from the mixer is not what SAPI assumes. It results in SAPI listening to the wrong input line for mic thus getting no input. I'm getting the mux control for "DST_WAVEIN" f...

Windows 7 Driver for Print to XPS

Hiyas, The link to the Windows 7 DDK (or WDK) is not something I seem to be able to get to. I need to write a driver that will convert the content to XPS and then do something with it. The "do something" is easy, but its the first part I'm not sure of. I found links to the Win7 WDK but as I said above I can't get to it (my company has ...