I'm setting a low-level mouse hook with SetWindowsHookEx:
HANDLE handle = SetWindowsHookEx(WH_MOUSE_LL, &callback, GetModuleHandle(NULL), NULL);
Because this is a low-level callback, it will be executed inside my own process; no DLL injection is performed.
Now, I've noticed that the callback sometimes (indirectly) gets invoked from s...
According to the documentation for API function GetNamedSecurityInfo, it can get information from the following objects:
Local or remote files or directories on an NTFS file system
Local or remote printers
Local or remote Windows services
Network shares
Registry keys
Semaphores, events, mutexes, and waitable timers
File-mapping objects...
How do I get the BIOS serial number without using WMI API under Win32? I need a non WMI way cause WMI calls under Windows Guest account return as access denied.
...
Does anyone know if its possible to adjust the MTU while sending an ICMP echo packet (with IcmpSendEcho)?
I'm trying to do this under Windows using the IcmpSendEcho() function.
...
I have a WTL application that uses an extended combobox control (the Win32 class ComboBoxEx32) with the CBS_DROPDOWNLIST style. It works well (I can have images against each item in the box) but the keyboard behaviour is different to a normal combobox - pressing a key will not jump to the first item in the combo that starts with that le...
I'm using WinApi and C#. I need to find window with variable caption. Caption contains constant part. I think that I need to enumerate all windows. How I can do this?
...
C++ win32 application (not MFC), whose GUI comprises just one dialog box from the resource file [WinMain() calls DialogBox()]. This works fine.
However, adding any "common controls" (listview, tab control, etc) to the dialog and they don't appear when the program is run. Normal controls (textbox, button, radiobox etc) are displayed, j...
Is this really the only way to get the correct address for an instance function:
typedef CBitmap * (CDC::* SelectObjectBitmap)(CBitmap*);
SelectObjectBitmap pmf = (SelectObjectBitmap)&CDC::SelectObject;
First, one has to create a typedef, and then one has to use that to force the compiler to select the correct overloaded method when t...
I have a multitoch-enabled tablet PC running Windows 7.
However, when using the stylus pen and getting too far away from the display, I often accidently hit it with my fingers which causes unwanted mouse-clicks.
The solution is navigating to "Control Panel - Pen- and Finger Input - Finger Input" and deactivate the checkbox "Use the fin...
I have a CComModule that is calling RegisterServer (TRUE) on DllRegisterServer and UnregisterServer (TRUE) on DllUnregisterServer. The UnregisterServer is getting a 0x8002801C (Error accessing the OLE registry.) error and leaving around registery keys. I am using a Windows Server 2k8 R2 machine with UAC enabled. The components are x86 an...
I'd like to know any sort of API or workaround (e.g., script or registry) to move (or resize) Windows taskbar to another position including another monitor (if dual monitors). Definitely, we can move task bar by using mouse, but I want to move it by a program, or a sort of automated way.
I tried to find Win32 API, but it seems no one do...
Is there an up-to-date Windows Library which allows the playing of individual musical notes?
Even just a wrapper on top of Beep, would suffice, though I don't know if that would be supported on all version of Windows.
...
hi, i'm trying to let 2 application communicate with each other using windows message.
however, i've been getting AccessViolationException (attempted to read or write protected memory) during allocating memory and marshaling of data.
Can someone explain to me what's wrong or suggest a better way?
Thanks.
EDIT: using WM_COPYDATA as su...
hi guys,
This sounds funny..just a little experiment.
i wanted to simulate a drag drop of a file on a Application/Window using Send Message.
Is it possible?
I dont have code for the application but on the executable.
The application is IP Messenger.
What i wanted to do is use "Send To" functionality to send the file to an .exe ,which ...
Hi,
I have an application which when I close the Windows, it exits gracefully and quickly (checked also in Task Manager and Process Explorer - the process isn't there anymore) but the OS doesn't. It seems that OS just ignores the Shutdown.
But if I try to close once more the Windows, now everything is ok. The system shuts down in a ve...
I've been fussing with this for the better part of the night, so maybe one of you can give me a hand.
I have found GDI+ DrawImage in C# to be far too slow for what I'm trying to render, and from the looks of forums, it's the same for other people as well.
I decided I would try using AlphaBlend or BitBlt from the Win32 API to get better...
Hi,
Currently I use the CURL open transport library to genereate http requests with a soap header. This all is implemented in C/C++. I was able to port this to Windows mobile howver I wonder whether I can use WinInet to do the SOAP request? Just to use less memory on the mobile device.
Are there samples on how to do this?
Thanks in ad...
I'm running a process as a user in the Administrators group, trying to get a process token for another process. The other process is run by a user not in the Administrators group. Here's the gist of the code I'm using. pid in this code represents the process id of the non-admin process. All of this is on Windows XP SP 2 and all on th...
I have a named pipe that's created in a managed process. I have a 2nd process that tries to open a file handle to the named pipe, however the 2nd process is running under an lower privilege than the process that created the named pipe. My understanding is that I need to create the named pipe in the first process with a security descripto...
For example:
// This will become either SomeMethodA or SomeMethodW,
// depending on whether _UNICODE is defined.
SomeMethod( _T( "My String Literal" ) );
// Becomes either AnotherMethodA or AnotherMethodW.
AnotherMethod( _TEXT( "My Text" ) );
I've seen both. _T seems to be for brevity and _TEXT for clarity. Is this merely a subjectiv...