How could I prevent esc from closing a dialog box?
I searched for this topic, but all I found was for MFC (You can overwrite PreTranslateMessage function in MFC). but my program is written in Windows API, not MFC.
I tried to catch all Keyboard messages in Dialog procedure, but none of them works. I also tried using subclassing in dialo...
Trying this I have found a strange problem: Delete an old file. Create a new file and name it the same as the old file. Then the "created time" property of the new file is set to the "created time" of the old file. Why is that happens? And how of course? It seems that the directory does not delete the old file's entry and if a new file g...
I created a minimal debug loop which runs and debugs a process.
When the process hangs and the user tries to close it, Windows gives the message box with the option to wait or end now. I would like to try to detect when they hit end now, so my debugger can gather relevant information. However I cannot seem to figure out how to detect th...
I suspect that I will shortly have a need to write an "integration" library that will need to call an OLE object on Windows from Java.
I have done Java to C/C++ integration on windows before (using C/C++ and JNI) - so I'm not new to that part of the equation.
However; I'd like to try out writing a C/C++ wrapper around an OLE object to ...
I was reading the post http://stackoverflow.com/questions/469270/installation-file-names-in-windows-vista when I thought about Installation File Names. I'm a addicted software downloader, and frequently I've got installation names like "setup.exe" or "install.exe", that says nothing about the program to be installed.
I think that an ins...
I have made a setup and deployment project in C#, Now i have another windows update exe which i want to run and install successfully before it installs my project. I've packaged the exe with my project. How may i run that exe before?
...
Why does this code:
#include <stdio.h>
int main(int argc, char** argv) {
printf("%lld\n", 4294967296LL);
}
emit this for Windows:
0
but this for Linux:
4294967296
...
Is there a way to enumerate all users on a local (NT-based) Windows box that can log in locally? Basically, I need a list of non-system users - this includes Administrator but excludes SYSTEM, LOCAL SERVICE and NETWORK SERVICE.
Edit: Yes, I need to do this from code. Since this is a programming website, I thought this was implied.
...
This may not be an entirely not a .NET related question.
I am writing a .NET application to control some gadgets. I send commands to the gadget periodically (say every 500 milliseconds). As soon as I send the command I start a timer. (.NET stopwatch class)
If the gadget not respond within say, 10 milliseconds, I send the command again. ...
Platform: WinXP SP2, python 2.5.4.3. (activestate distribution)
Has anyone succeded in writing out box drawing characters in python?
When I try to run this:
print u'\u2500'
print u'\u2501'
print u'\u2502'
print u'\u2503'
print u'\u2504'
All tips appreciated. What am I doing wrong ? Does python support full unicode ? Is it possible at...
I have an interesting/annoying problem with some VBScripts running on Windows 2003 Server (they run fine on XP).
The scripts basically periodically call WMI objects to extract performance information and write it to a log file. It's started by Scheduled Tasks at 12:05 each morning and runs until midnight (or would if it didn't keep cras...
How to shutdown my computer using C#?
...
I have an MDI app. I would like to add an icon to the non client title bar of the child window that allows the window to float separately from the parent MDI container, allowing the user to take the child windows and arbitrarily place them around the desktop, outside of the MDI window.
I have seen it done so I know it's possible, but I'...
I'm working on a project that discovers/configures remote devices using UDP broadcasts. These devices may not have IP addresses configured yet, at least no to match the network they are connected to. Currently we use a single sendto with a target address of 255.255.255.255. This works fine in most cases but on Vista machines with multipl...
We use DIGEST authentication for our WebDAV Access. We observe that Windows clients send each request twice. First request doesn't have Authorization header (and gets 401 response), second request has Authorization header (and usually gets correct response).
While user probably cannot see this, it makes whole Webdav access slower then n...
I have a deployment script (.bat), part of which requires calling other programs and sending a password on the command line. I log the output of the deployment script to a file. The problem is that the password gets logged as well. I need a way of sanitizing this log file.
One way to do this is to not echo the line which contains the p...
I would like to redirect the output from a command to a file and to stdout. I am using Windows XP command line.
I realize that there is a command in linux called tee which will do this, but I want this in windows.
...
OpenFileDialog returns a pointer to memory containing a sequence of null-terminated strings, followed by final null to indicate the end of the array.
This is how I'm getting C# strings back from the unmanaged pointer, but I'm sure there must be a safer, more elegant way.
IntPtr unmanagedPtr = // start of the array ...
...
How can I see what the Windows clipboard currently contains without using the paste operation?
I don't want the "pasted-to" application to perform any actions on the clipboard (e.g. formatting text, converting).
Is there a tool which shows the clipboard's objects and their format (CF_BITMAP, CF_TEXT, etc.) and content (in simple bytes ...
My goal is to create a system monitoring application using Java. I would like to know when a user is doing activity on a Windows PC. The result would be something like this:
8:00 - 8:15 activity
9:12 - 10:29 activity
12:24 - 15:34 activity
I'm not interested in any other information (which key was pressed, application used, etc.). On...