windows

Using `pkg-config` as command line argument under cygwin/msys bash

I'm trying to use cygwin as a build environment under Windows. I have some dependencies on 3rd party packages, for example, GTK+. Normally when I build under Linux, in my Makefile I can add a call to pkg-config as an argument to gcc, so it comes out like so: gcc example.c `pkg-config --libs --cflags gtk+-2.0` This works fine under...

Clock drift on Windows

I've developed a Windows service which tracks business events. It uses the Windows clock to timestamp events. However, the underlying clock can drift quite dramatically (e.g. losing a few seconds per minute), particularly when the CPUs are working hard. Our servers use the Windows Time Service to stay in sync with domain controllers, whi...

How to shutdown the computer from C#

What's the best way to shutdown the computer from a C# program? I've found a few methods that work - I'll post them below - but none of them are very elegant. I'm looking for something that's simpler and natively .net. ...

Build new computer using Scripts

I would like to automate the process of setting up a new PC, this would include downloading and installing the latest windows and office updates; installing software from a network share (some software will require a restart so the script would need to be able to login and continue) adding PC to a domain and setting up local user account...

Managed C++ Method naming

I'm using managed c++ to implement a method that returns a string. I declare the method in my header file using the following signature: String^ GetWindowText() However, when I'm using this method from C#, the signature is: string GetWindowTextW(); How do I get rid of the extra "W" at the end of the method's name? ...

Identify the host from a Windows user mode dump file

Is the an easy way of finding out the host name of a machine than generated a user mode dump file via WinDbg? Or at least any piece of identifying information to try and confirm that two dump files came from the same system. ...

Tools to view/solve Windows XP memory fragmentation

We have a java program that requires a large amount of heap space - we start it with (among other command line arguments) the argument -Xmx1500m, which specifies a maximum heap space of 1500 MB. When starting this program on a Windows XP box that has been freshly rebooted, it will start and run without issues. But if the program has run ...

Lowest cost Windows VPS hosting?

For a while, I thought I'd host stuff at home because I can do whatever I want. However, hurricane Ike knocked out my power for a week, and I've finally realized this situation won't work. I have extremely low traffice websites (20 visitors/day), so I don't need tons of CPU or bandwidth. What cheap options are there for VPS hosting th...

Finding GDI/User resource usage from a crash dump

I have a crash dump of an application that is supposedly leaking GDI. The app is running on XP and I have no problems loading it into WinDbg to look at it. Previously we have use the Gdikdx.dll extension to look at Gdi information but this extension is not supported on XP or Vista. Does anyone have any pointers for finding GDI object...

What's the best freely available C# wrapper for BITS?

BITS, the Windows background intelligent transfer service. Looks like there are a few C# wrappers around that manage the interop to BITS, does anybody have any opinions on the best one? ...

Default Printer in Unmanaged C++

I'm looking for a way to find the name of the Windows default printer using unmanaged C++ (found plenty of .NET examples, but no success unmanaged). Thanks. ...

MSI installer: Adding multiple properties to SecureCustomProperties

I'm looking for a way to add multiple properties to the SecureCustomProperties value in my .msi installer's property table. I've tried comma delimiting, semi-colon delimiting, and even space delimiters. None of the above seem to work. Hints? ...

What port is a given program using?

Greetings, I want to be able to figure out what port a particular program is using. Are there any programs available online or that come with windows that will tell me which processes are using which ports on my computer? PS - before you downmod this for not being a programming question, I'm looking for the program to test some networ...

What RTOS is best for working on the same PC with Windows?

What RTOS is best for working on the same PC with Windows? I know about RTX and INtime, but have not used them. Are there any others? Which one is your favorite and why? ...

good postgresql client for windows?

coming back to postgresql after several years of oracle ... what are the state-of-the art postgresql administrative/ddl generating/data inserting frontends on windows? it would be nice if it had integration for postgis as well. it should be standalone or alternatively a plugin for intellij idea thinking back, all the windows programs ...

How can I make a batch file to act like a simple grep using Perl?

I already know the obvious answer to this question: "just download <insert favorite windows grep or grep-like tool here>". However, I work in an environment with strict controls by the local IT staff as to what we're allowed to have on our computers. Suffice it to say: I have access to Perl on Windows XP. Here's a quick Perl script I ...

QDrag destroyed while dragging

I have a Windows/Linux Qt 4.3 application that uses drag and drop in a QTreeView. I have two very similar applications which use the same set of Qt libraries. Drag and drop works in both on Linux but in only in one on Windows. In the application that does not work the QDrag object gets deleted as soon as the mouse is moved. I...

Getting multiple UI threads in Windows Forms

I'm trying to figure out a way to make user controls run in their own UI threads. Is this possible? I'm trying to prevent a module-based application from crashing due to a single module. Any thoughts? ...

Possible to monitor processes another process launches via WMI?

I have a setup executable that I need to install. When I run it, it launches a msi to do the actual install and then dies immediately. The side effect of this is it will return control back to any console you call it from before the install finishes. Depending on what machine I run it on, it can take from three to ten minutes so having t...

What is a good application programming problem to solve for beginners?

UPDATE Please do not post game ideas. I am not looking for game ideas here. I am looking for ideas like; "Network browser", "File encrypter", "Notepad-clone", "Rss feed generator". Hello world. I have been programming on and off for some years, mainly with game development. Now I am interested in refining my skills...