It looks like a recent windows update has broken some functionality I was using to recycle IIS6 application pools, as this has been working for months up to today.
Exception calling "Recycle" : "Win32: The object identifier does not representException calling "Recycle" : "Win32: The object identifier does not represent a valid object.
...
Is there any way to check the status of the RPC connection from the server-side? I am looking for a way to detect if the connection from the client is lost, be it client crash or other connectivity issues.
...
I am using Stackdumps with Win32, to write all return adresses into my logfile. I match these with a mapfile later on (see my article [Post Mortem Debugging][1]).
EDIT:: Problem solved - see my own answer below.
With Windows x64 i do not find a reliable way to write only the return adresses into the logfile. I tried several ways:
Tri...
I want to get the ControlName of .NET properties in VB6 code, just like described in this article. But unfortunately, it doesn't work for me. I always got 0 for bufferMem.
bufferMem = VirtualAllocEx(processHandle, 0, size,
MEM_RESERVE Or MEM_COMMIT, PAGE_READWRITE)
If bufferMem = 0 Then
Error Err, "V...
Does anyone know how I can determine the server and share name of a mapped network drive?
For example:
import win32file, win32api
for logDrive in win32api.GetLogicalDriveStrings().split("\x00"):
if win32file.GetDriveType(logDrive) != win32file.DRIVE_REMOTE: continue
# get server and share name here
Is there a handy api call for ...
I have a system tray icon that receives incoming phone calls. When a call comes in, I want to send the phone number into a web app that does stuff on that phone number. We can launch the web app with the phone number in a query string, but if I launch a new window for every call, it will junk up the user's computer with lots of browser...
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
MessageBox(NULL, _T("This should return 90 no?"), _T("OK"), MB_OK);
return 90;
}
Why does the above program correctly display the message box, but does not se...
I realize "fast" is a bit subjective so I'll explain with some context. I'm working on a Python module called psutil for reading process information in a cross-platform way. One of the functions is a pid_exists(pid) function for determining if a PID is in the current process list.
Right now I'm doing this the obvious way, using EnumProc...
To simplify, this is a situation where a NamedPipe SERVER is waiting for a NamedPipe CLIENT to write to the pipe (using WriteFile())
The Windows API that is blocking is ReadFile()
The Server has created the synchronous pipe (no overlapped I/O) with blocking enabled
The client has connected, and now the server is waiting for some data....
I'm a bit rusty on my Windows system programming...
Is it possible for a program to send a keystroke (I'm guessing by SendMessage() api call) to another application, if the (open) target application does not currently have the focus? If it is possible, does it then make the target application become the active application, or does it s...
Vista introduced the new Common Item Dialogs for opening and saving files that supersede the old Common File Dialogs. Custom controls can be added by utilizing the simple IFileDialogCustomize interface. One of them is a standard ComboBox which is non-editable. Is there any way to create an editable ComboBox or modify an existing one (by ...
In win32 programming in C:
Whats the best way to execute a win32 console program within another win32 program, and have the program that started the execution capture the output? At the moment I made the program redirect output to a file, but I am sure I must be able to open some sort of pipe?
...
I am a newbie to API calls in .NET.
I am looking at the documentation for a method I want to call here
EDIT The method is a Windows Mobile API call.
To call it, I need to know what dll it is in and what the values are for any parameter flags (and other stuff but this is just an example).
So where do I find this out? It's not on the ...
I'd like get a notification if a particular process starts. For ex., if xyz.exe starts in the background, I need a messagebox stating the same.
I'm a little familiar with Windows Hooks in VC++. Can someone point me to some similar links or methods to achieve my goal? Thanks.
...
I have user control in .Net where I use a hit test in WndProc to allow resizing it in runtime with the mouse.
The problem is that after the hit test succedes (mouse press, drag to resize, mouse release) the control jumps upwards in the Z order and ruins it position in the form.
I need the hit test since it's a very customized control.
...
I am trying to create a thread in C++ (Win32) to run a simple method. I'm new to C++ threading, but very familiar with threading in C#. Here is some pseudo-code of what I am trying to do:
static void MyMethod(int data)
{
RunStuff(data);
}
void RunStuff(int data)
{
//long running operation here
}
I want to to call RunStuff fro...
I'm using Visual C# 2008 Express. I'd like to use the same icon for the application (ie, the icon shown for the .exe), and for the main form. Unfortunately, VC# doesn't seem to be very smart about this, and insists on duplicating the icon data.
There doesn't seem to be a way of selecting an "already embedded" icon for use in the form or...
I have date strings such as 2009-02-28 15:40:05 AEDST and want to convert it into SYSTEMTIME structure. So far I have:
SYSTEMTIME st;
FILETIME ft;
SecureZeroMemory(&st, sizeof(st));
sscanf_s(contents, "%u-%u-%u %u:%u:%u",
&st.wYear,
&st.wMonth,
&st.wDay,
&st.wHour,
&st.wMinute,
&st.wSecond);
// Timezone correctio...
I want to write a small utility in MFC which sends the Ctrl+Alt+Del message to OS. Can any one help me how do I achieve this ?
I tried
::PostMessage(HWND_BROADCAST, WM_HOTKEY, 0, MAKELONG( MOD_CONTROL | MOD_ALT, VK_DELETE)); But this is not working.
Thanks.
I want to Send Ctl+Alt+Del not to invoke TaskMgr.exe. Also, it is for my local...
I want to create some kind “social” connection/interaction in an application that I am creating.
The application is for a restrict group of professionals, that would benefits for social connection/interaction with each other.
So now I don’t know what to do. Do something new, integrate with an existing one ?
I am open for ideas.
----...