windows

Numeric values in ComboBox

I have a combo box CBS_DROPDOWNLIST control filled with numeric values. I'd like for the user to be able to type multiple characters to set the value but this only works if I specify the CBS_SORT flag which sorts the value 10 before 2. Is there a way I can get typing working correctly while keeping my values sorted numerically? ...

TeamCity Alternatives

I write a lot of little projects, and I'd like to use something like TeamCity for my build server(s). My problem with just using TeamCity itself is that the Professional version of only seems to allow for, at most, 20 projects. And since these projects are generally not-sellable, the price tag for the Enterprise edition is a bit much. ...

WMI Class for wireless mouse

What is the WMI class to get information about Wireless mouse? EDIT: How do I distinguish USB mouse from Wireless mouse(Connected via USB Doggle). DeviceInterface value from Win32_PointingDevice class shows as 162 for both because both are connected via USB. But I want to distinguish between these mouses. ...

Stack Pointer Register values

When a thread is executing in kernel mode, will the stack pointer points to its kernel mode stack? Similarly, will it points to the user mode stack when the thread is running in user mode? Thanks. ...

how to reliable capture display setting changed

static void Main() { // Set the SystemEvents class to receive event notification when a user // when display settings change. SystemEvents.DisplaySettingsChanged += new EventHandler(SystemEvents_DisplaySettingsChanged); // For demonstration purposes, this application sits idle waiting for even...

How Can I Check To See If the User Set His Clock Back?

In my desktop program, I want to check that to see if the user has set his clock back. To do so, I compare the timestamp of certain Operating System files to the current computer date. If any are after what the computer thinks is the current date, then he must have set his clock back. For Windows XP, I have been using such files as: ...

Does set affinity ensure that only one core resources are used?

Hello, I just wanted to find out if setting cpu affinity ensure that the application runs only on that core ? ...

How to delete file which is used/locked by windows in java

I have some application, which has ability to update itself. Its downloads the jar file from the net, and then tries to replace used jar to run this application by downloaded one. But I cannot to do that, because the file is locked by windows, because application is still running. Does anybody know some workaround of that? Thanks a lot....

how to draw image on a window

Dear All, I have created a window with createwindow() api using vs2005 in c++ on windows Vista My requirement is to draw image(any format) on that window. I am not using any MFC in this application Please help me with some code snippet with regards Vinayaka Karjigi ...

Windows installer technology how-to.

Hi, I am trying to create a custom installer technology for some fun and generic utility...I have experimented with several tools including Orca, WiX, VS S&D projects, NSIS, Innosetup etc but all of them seem to suffer from one or more of the following deficiencies... Its too complex for simple needs or outright simplistic. There is no...

Unable to unpickle a file on Mac that was pickled on Windows

Hello, I've got a simple class that I am pickling(dumping) to a file. On OS X this works fine, and on Windows this works fine. However, while on windows I can load/unpickle the object fine - when windows then pickles this file and saves it back to disk, it becomes unreadable on OS X (although in Windows it still behaves as normal). Th...

Problem with Named Pipes between C# and Python

I'm trying to create a two-way communication channel between two programs (one in Python and another in C#) When I create a named pipe between two C# programs or two Python programs, everything is OK, but when I try to (for example) connect to the C# server from Python code, it does not work: C# code: NamedPipeServerStream server = ne...

How do you actually use a C library?

I'm sure this question has been asked many times, but I can't figure this out. Bear with me. So when you download a library, you get a bunch of .c and .h files, plus a lot of other stuff. Now say you want to write a program using this library. I copy all the .h files into my project directory. It just doesn't compile. Great, so then I...

signing assemblies on windows mobile device

HI I have created an application for my windows mobile 6.0 device and I need to sign it so that the user can download updates without having to select that they trust the publisher I'm not entirely sure what I'm doing here but I created the following files on the command line .pfx using pvk2pfx .spc using cert2spc .cer using makec...

HOWTO: Tag a process

Hi: I am using CreateProcessAsUser() to make processes. I would like to tag some of them so that later on, given a process ID/handle I can work out whether or not it was I who launched them. Are there any techniques for marking a process natively like this. I want my solution to be stateless, hence a table of PIDs is not suitable - no...

Direct-X in C++ Game Programming.

I am reletively new to c++ programming can anyone please tell me how does Direct-X SDK is helpful and how does it works and how can we use it in game programming.I Downloaded it and I found lots of header files and documentation also tells something about game programming. ...

unresponsive java application for no reason

I have a java application that I run from eclipse 3.5. My OS is WinXP(SP2) and the JRE version is 6.05. I run the application on two identical computers (or so I think) but the application behaves differently on each computer. The computers are the same Dell Optiplex model with the same amount of memory and have the same GPU. On the ...

Deliberately crashing an external process under Windows

I would like to synthesise a native code fault. This is so that we can see where in particular some debugging output gets put when that occurrs. Pskill (from Sys-Internals) causes a graceful exit. DotCrash.exe doesn't seem to be available anymore from Microsoft directly. Is there any way to externally cause a crash in a process? ...

Game programming for windows in C++ or C#.

I just learned the basics of c++ and c#,just the simple basics of the language.And I want to pursue game programming can anyone please tell me where to start off I read somewhere that Direct-X is used for game programming and I downloaded it from Microsoft's website but I just didn't understood it.From where did you people started your g...

Are thread and process ids unique?

I am using a static library; it has a function which uses the current time and creates a unique id, which is then inserted into my database. This number should be unique in my database table. There are two processes running in parallel. Sometimes they simultaneously call this function, and the same number is generated. I get an integr...