windows

Duplication in Drive letters

i get device insertion and removal notification from WM_DEVICECHANGE i get the dbcc_name from the DBT_DEVTYP_DEVICEINTERFACE i get the corresponding drive letter from the DBT_DEVTYP_VOLUME if i insert the device one by one it works correctly but if i insert two device at a time i get duplication in drive letters how can i solve it ...

Displaying current language layout in traybar

Basically I want to write an application which would display the current language as a tray icon. Mainly I can code C++ and C#. Guess Google would help me out but I would like to ask it here first, since the community, the knowledge here is something I trust. (Never wrangled with such parts of the system so far. So that's why I would ...

How do I determine the user's language in Visual C++?

I've been searching msdn forever now without a straight answer. Is there a way to simply get the user's language? I don't want to load any resources or anything at this point, I just want to get their language. Is there ANY simple way to do this? I'm using visual C++,and I'm not using MFC or anything like that. Thanks in advance! ...

Best backwards compatible way to programmatically capture sound going to speakers

What would be the best approach to take in order to achieve a backwards compatible (Windows XP through Windows 7) way to capture sound that is being sent to the speakers on a machine, even if the audio driver doesn't expose the "Stereo Mix" recording device. For extra points, it would be great if this approach allowed for capturing soun...

MessageBox with timeout OR Closing a MessageBox from another thread

If my application crashes, I use an ExceptionFilter to catch the crash, perform some final actions, then show a message box to the user that the application has crashed. Because the application already crashed, there's not much I can (or I dare) to do, because if I do too much, the executed code might access corrupted memory and crash a...

Exception in two line Xerces program

The following code gives me an exception on the XMLFormatTarget line, but if I change the string from "C:/test.xml" to "test.xml" it works fine. // test.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <xercesc/util/XMLString.hpp> #include <xercesc/framework/LocalFileFormatT...

Explanation why MessageBox is owned by CSRSS process

In my application I catch exceptions using an exceptionfilter, then show a MessageBox telling the user that the application has crashed and giving him some additional information. I use a MessageBox instead of an explicitly constructed dialog because I want to minimize the logic executed after a crash. Initially I had the problem that i...

How to get field names and offsets of a struct using dbghlp and pdb

I would like to dump the fields and offsets of structures in the same way as windbg's dt command. Let's say for example I would like to dump the _PEB structure which is in the Microsoft Public symbols (since windbg's DT command works). From MSDN documentation I understood that the SymFromName function should be able to do this, below th...

Is it possible to translate Oracle Forms6 application to Windows Forms (.net) ?

Is there any tool that would help to move/translate appliaction written in oracle forms6 to .net ? maybe not whole application at once, but maybe modules/forms(screens) to windows forms. I know that languages are different (pl/sql vs .net) but maybe that tool could make some template and programmer would be responsible to translate busin...

How to retreive correct path of either system32 or SysWOW64?

I have a 32-bit process that can run either in 32-bit or 64-bit Windows. So, naturally, if the process tried to access the file c:\windows\system32\file.ext, it would be redirected to c:\windows\SysWOW64\file.ext. So far so good - I don't want to disable the redirection. My problem is that my process doesn't actually access the file - i...

Pause third party application execution on Windows

I have a database upgrade tool that is misbehaving. I would like to pause the execution of the application so I can change the database. I'm thinking a C# wrapper that could pause the process would do the trick. Has anyone ever attempted such a monster? C# is home, but other languages would be find if they can get the job done. ...

Monitor and change SQL queries with SQL Server 2000

I have a database upgrade tool that is misbehaving. I would like to catch one of the queries it sends to the database and change it before it is executed. The tool connects via ODBC. The tool and the SQL Server are on the same Windows 2003 Server box. Any ideas? EDIT: (More info) When the tool runs it dies on step 12 out of 100. It...

Form not listed in Windows Service Project Start up objects in VS.net 2008

Hello, I have a windows service in VS.net 2008. Just to test the application before I install the service, I have a form (Form1.cs). Now when I want to make this project as startup project and form1 as startup object, I don't see the form one in the start up object list. I just see the namespace of the Program.cs and not set Please help...

running a script after svn up in windows if there were incoming changes

My project is divided into bunch of subprojects . I want to automate the process of getting all the changes from svn, building and deploying it . So i I want to build and deploy a project only if there were incoming changes from svn . Is there a way to automate this ? Note that I am using a windows machine ( unfortunately ) ...

Potential Multiple installations of Python on Windows

I ran into the following problem: I need to supply the installation package to the client. Part of the code is python, so I have to make sure that it is installed. I am using NSIS for the installation ans would like to install python into a predefined by me folder (let it be c:\Program Files\Project\Python26). For that I downloaded the p...

Remove all files from a month but last one

Every day we run an backup job. This job creates a new file in format yyyyMMdd.7z and now we need to cleanup our backup storage automatically. Our backup police says that we need to keep files from last 5 days, and last backup of each month. First step is easy since I have current day. But how I can keep the last of each month? ...

install inf (driver) from nsis on windows vista or greater

i try installing a driver in a Windows 7 x64 environment, by using cmd, and a nsis installer made from a script from cmd i do for example: InfDefaultInstall C:\kit\driver\win7-64\my_driver.inf from nsis i do (this is the line from the script): Exec 'InfDefaultInstall $INSTDIR\driver\win7-64\my_driver.inf' the inf file should cop...

C++ SFML "unable to initialize application 0xc000005"

I wrote a wrapper for SFML that would allow me to replace the renderer for my game if I needed to. It worked. Then I refactored and while it still compiles, I now get "unable to initialize application 0xc000005" when running the compiled executable. What would cause such an error? Google was unhelpful. I'm using Windows XP. ...

how do I detect whether windows is in high contrast mode, or it displays large font or extra large font?

how do I detect whether windows is in high contrast mode, or it displays large font or extra large font? I need to provide accessibility support in my javascript. Thanks. ...

How to call usermode from Windows kernel?

Hello, I'd like to call my app from my driver when an interesting event happens in the Windows kernel. I need to be able to pass at least 4 bytes of data back to user mode. How to achieve this? These events might happen quite, but not too, often, so I don't want to build a queue system and use IOCTLs. I was thinking of something like t...