windows

TCP socket timeout configuration

I have a Java application which uses a third-party COM component through a Java-COM bridge. This COM component opens a socket connection to a remote host. This host can take some time to respond, and I suspicious that I'm getting a timeout. I'm not sure because as I said, it's a closed-source third-party component. The API of this comp...

Free Visual Database Design Software?

I am planning to build a web application that will require a relatively complex database. There are several tables involved with many relationships, enough to make it very difficult to keep it straight in my head. I need a simple and easy way to summarize the tables and illustrate the main relationships so that it visually makes sense ...

Making a windows program thumbdrive portable

I am currently trying to make an application portable. Where are the common places that an application puts its settings in a windows machine? do you know know of any other places besides -registry -Currentuser/Application Data -app folder ? ...

WCHAR array not properly marshalled

I have a COM interface with a following method definition (IDL notation): SCODE GetText( [in, out] ULONG* pcwcBuffer, [out, size_is(*pcwcBuffer)] WCHAR* awcBuffer ); Typelib marshaling is used for COM+, the type library is registered, other methods of the interface work allright when called through COM+, but not this met...

Easiest free email server for Windows development

I'm developing a Java app on the Windows platform, and my application needs to send email. For development/testing purposes, what is an easy and free email server I can run on Windows? ...

how to write a program in PHP, Ruby, or Python, and make it easily downloadable and installable by general users like a Win32 app?

I wonder when we write a program in PHP, Ruby, or Python, how do we make it easily downloadable and installable by general users like a Win32 app? and is it possible to make it a Mac app easily too? ...

How to get minimized window's RESTORED bounds?

It's easy to get the bounding rectangle for all the visible windows on a screen. It's also easy to tell if any window is iconic or not. But for minimized windows, the Top and Left is reported as -32000 from User32.GetWindowInfo.rcWindow. I've looked all through the API and can't find a call to return the bounds the window would restore...

Windows malloc replacement (e.g., tcmalloc) and dynamic crt linking

A C++ program that uses several DLLs and QT should be equipped with a malloc replacement (like tcmalloc) for performance problems that can be verified to be caused by Windows malloc. With linux, there is no problem, but with windows, there are several approaches, and I find none of them appealing: 1. Put new malloc in lib and make sure ...

By code, how can I test if a hard disk drive is sleeping without waking it up

Hello, I'm building a small app that gives me the free space available on my disks. I would like to add a feature displaying the status of the disk, if it is sleeping or not for example. The OS is Windows. How can this be done? The code should not have to wake the disk to find out, of course ;) A solution in C# would be nice but I gue...

Accessing Win32 CreateEvent/SetEvent from WSH or other native Windows program

I need to interface with a program suite that uses named. Win32 Events (eg, CreateEvent() API) to communicate between running processes. I'm able to do this with some very simple C code h = CreateEvent(NULL, FALSE, FALSE, argv[1]); if (h != INVALID_HANDLE_VALUE) SetEvent(h); However, due to policy issues, I can't install custom...

Copy a directory tree to a single directory at a command line

Anyone know of a command line utility (or one that can run as a command line) that will collect all the .jpg files in a directory tree to a single folder, only copying files that change? I started with Renamer, which is great for renaming files in their current directories, but fell short when I tried to mangle the path. This is probab...

IAudioSessionNotification, anyone have working code?

I'm picking up some experimental code I was messing with in the Windows 7 Beta now that I've installed the RC. Basically, I'm trying to get IAudioSessionManager2 & IAudioSessionNotification working together to inform my little app of every new audio session created. Punchline code in AudioListener ( : public IAudioSessionNotification):...

Recommended Open Source Profilers

I'm trying to find open source profilers rather than using one of the commercial profilers which I have to pay $$$ for. When I performed a search on SourceForge, I have come across these four C++ profilers that I thought were quite promising: Shiny: C++ Profiler Low Fat Profiler Luke Stackwalker FreeProfiler I'm not sure which one of...

How does one figure out what process locked a file using c#?

In Windows, how do I determine (using c#) what process locked a file? Third party tools are helpful, but not what I'm looking for here, thanks. ...

Programatically disable/enable network interface...

I'm trying to come up with a solution to programatically enable/disable the network card - I've done a ton of research and nothing seems to be a workable solution in both XP and Vista environments. What I'm talking about is if you went into the Control Panel 'Network Connections', right clicked on one and picked either enable or disable...

By code, how can I send a hard disk drive to sleep

Hello, I have lots of hard disk drives in my computer (7). When they are not used the power option send them to sleep after a while. But because everything makes a lot of noise I would like to send them to sleep when I want, not just after the default system timeout. On Windows (XP and up), preferably in C#, How can I send a disk to s...

How can I remotely execute a script in Windows?

Hello all! I would like to have a Windows 2003 server fire a script to fire another script in a separate Windows Server 2008 computer. I have been told that Powershell can do that, and that's fine, but I need more specific details. Does anyone have any tips for this? Thanks! ...

Winsock error code 10014

string SendRequestToServer(std::string url) { struct sockaddr_in addr = { 0 }; struct hostent *host = NULL; // If the URL begins with http://, remove it. if(url.find("http://") == 0) url.erase(0, 7); // Get the host name. string hst = url.substr(0, url.find('/', 0)); url.erase(0, url.find("/", 0)); // Connect to the host. host = geth...

Java detection failing in Safari on Windows

I need to detect java version in browser, I have used deployJava.js file to detect java. I think there is definitely a problem , the way deloyJava.js ( java detection and deployment helper file from Sun) works with Safari on Windows. You can see the problem in action if you go to official java verification page (http://www.java.com:80/...

Do I need a job queue in my COM server?

I have a COM EXE out-of-proc server exposing an API from one of its interfaces. The functionality of this API is to post URLs. My client will be creating the instance of the COM server and calling this API with new URLs. Every time client needs to post a URL it will create an instance of this COM server. Do I need to implement a queue...