windows

How do I capture command-line text that is not sent to stdout?

I am using the LAME command line mp3 encoder in a project. I want to be able to see what version someone is using. if I just execute LAME.exe with no paramaters i get, for example: C:\LAME>LAME.exe LAME 32-bits version 3.98.2 (http://www.mp3dev.org/) usage: blah blah blah blah C:\LAME> if i try redirecting the output to a text file ...

how to embed flash games into Windows Forms application.net compact framework under windows mobile 6

I want develop an application on windows mobile. In this app, i need to show some Flash games to the end user. How should I do? embed an Flash ActiveX Control (in Windows mobile Form application) ? embed an IE control? BTW (because i do not have a windows mobile device now) Can I views flash in IE of the windows mobile device? Tha...

Win32API: How to request embedded windows event notifications out to a parent window

Scenario: I would like a window control which is a sub-window in my dialog (a subwindow of a subwindow) to propagate its notification messages out to the dialog window. e.g. A COMBOBOX contains an EDIT control. I have a circumstance where I would really like to know when the EDIT field gains and loses focus (mainly because the stupid CO...

Linking different libraries for Debug and Release builds in Cmake on windows?

So I've got a library I'm compiling and I need to link different third party things in depending on if it's the debug or release build (specifically the release or debug versions of those libraries). Is there an easy way to do this in Cmake? Edit: I should note I'm using visual studio ...

CoInitialize Failed

We had multi-threaded application. Each thread has to invoke with CoIntialize when it is iniatialized as we use some C++ COM object for our DB operation. The application is working fine for longer time in the production env. But suddently the CoIntialize() API in thread init function failed with below error ThreadInit; HRESULT: 80070008 ...

what does <unclassified> mean in windbg !address output

Example: 0:074> !address -summary --- Usage Summary ---------------- RgnCount ----------- Total Size -------- %ofBusy %ofTotal Free 90919 7ec`34659000 ( 7.923 Tb) 99.03% <unclassified> 95426 12`3c3e9000 ( 72.941 Gb) 92.12% 0.89% Heap ...

One service appends to and another one truncates a file.

I have a service that controls an RS-232 device and logs actions to a file. I am to write another service which will read the log file line by line and run some queries on a database then delete all the logs. My concern is about read and write conflicts on the file. For example, the logger service open the file to append a new line at t...

How to hide using C\C++ with Show hidden Files and Folder enabled

I would like to know how to programmatically hide a file but making the file or folder still hidden with Show hidden files and folders enabled from the Tools->Folder options of Explorer. I hope I am not confusing anyone and if I might be please just ask. ...

Mouse coordinates lags if CPU usage is not 100% - really weird!

When i make my program to use only 0-2% cpu (removed some CPU intensive opengl function), my mouse coordinates starts to lag! and when i use 100% CPU (when enabling the opengl function) i get nice and smooth mouse coordinates, note that the opengl function does nothing to my mouse coordinates. look at below image i recorded my rotation f...

Why is Sleep(1000) resulting in a deadlock?

I have a basic Win32 console app that makes a call to a named pipe, and then Sleep(1000), inside a while(true) loop. After a hundred iterations, Sleep(1000) will hang. I can see no reason for this. Ok, all I'm doing is taking the code found in this MSDN sample, verbatim and running it as the server: http://msdn.microsoft.com/en-us/libra...

How to call a function automatically?

Hi! I have rewrited a simple MFC application in MS Visual Studio 2008, and now it is working how i wanted. My only problem is, that i have to press a button, and i don't want. It should work automatically. I also noticed that the function are somehow called automatically. These function are called each after: CGetFileListDlg::...

Desktop problem with using CreateProcessAsUser from a service on Vista

Hello All, I am using VC++ to create a process from a service on Vista using CreateProcessAsUser. The process creation is succeeding when i execute this code by login on the machine locally. The same code is failing when I am using Remote Desktop (mstsc) to login in to my machine from another machine and launch my App. I can understand...

Why Bison doesn't work properly in Windows (doesn't generate output file)?

Bison on windows does not produce an output file. This is the error message I get. m4_define([b4_percent_define(lr.keep_unreachable_states)], [[false]]) m4_define([b4_rhs_min], [[-1]]) m4_define([b4_pact_min], [[-5]]) m4_define([b4_conflicting_rules], [[ 0]]) I have solved this question myself, this is for others. ...

How to detect inactive user

How to detect inactive (idle) user in Windows application? I'd like to shutdown application when there hasn't been any input (keyboard, mouse) from user for certain period of time. ...

How can I identify Windows PnP events with Perl's POE?

Is there a POE module that identifies PnP events in Windows? If yes, could someone provide idea code snippet? ...

Required Registry location common to all users to avoid registry virtualisation in Vista

Hello All, In Vista standard user can no more create or write to keys under HKLM\Software. So to port the code according to Vista standards in to which key i should write the application configuration data. Same way like %AllUsers%/AppData for folders. My main requirement is I should avoid writting to HKLM\Software, but the key location...

Bluetooth development on windows

i need to create an application on a window machine that will communicate with a portable device over bluetooth...i am new to bluetooth so i was wondering what sort of APIs and drivers were available in the windows system...I know there is the bluez stack in Linux and OSX but not so much about the windows system. and also i need to tran...

How to get the program path i am executing with "open with" method?

I have the problem that i am using relative paths for my files, so when i use "open with" method for opening a file into my program, all my paths are screwed (it will create my files in the folder where i used this "open with" method.) How i can retrieve the full path to the .exe file that im using to open the file with "open with" meth...

EC2 - possible to run Windows on an EC2 Linux instance?

If you are handling all your own licensing(working under a BizSpark license), is it possible run Windows on an EC2 instance marked for Linux/Unix? I am considering migrating a dedicated server I have to EC2 but was not able to find guidance on this. I have been told that you get complete control over the instance to install whatever ...

Is this a scaleable named pipe server implementation?

Looking at this example of named pipes using Overlapped I/O from MSDN, I am wondering how scaleable it is? If you spin up a dozen clients and have them hit the server 10x/sec, with each batch of 10 being immediately after the other, before sleeping for a full second, it seems that eventually some of the instances of the client are starve...