winapi

How do the password revealers work?

I've seen some password revealing software. Most of them has a shooting pointer like pointer and you can just point the password text box and the software is revealing the password. But still the protected software and the revealer software are not interconnected. They are separate processes running on the same host. My queries are, ...

Programatically execute Windows Explorer context menu items

I'm about to tear my hair out for lack of a consistent, foolproof way to get at the context menu items that Explorer shows when I right click on an item. I don't want to show a menu, I just want to parse the items in the background and execute them programatically. I've tried various combinations of IShellFolder, IContextMenu, and other...

What's the difference between ON_NOTIFY, ON_CONTROL, ON_CONTROL_REFLECT?

I always struggle to keep all these macros straight in my head. Is there an easy way to remember them, and which to use in a given scenario? Specifically, does one of these allow a dialog to intercept/detect messages to child control windows? e.g Can the dialog register an interest when IDC_MY_CONTROL gets a WM_PAINT message? ...

How can I properly install Win32::GuiTest?

I am trying to use Win32::GuiTest and with Windows XP and perl version 5.8.6. I am getting the following error: Can't locate loadable object for module Win32::GuiTest in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at E:\a\simply.pl line 259 Compilation failed in require at E:\a\simply.pl line 259. BEGIN failed--compilati...

On which occasions exactly is WM_ACTIVATE sent?

I'm trying to debug a huge Win32 GUI application (I have full sources) divided into several processes. The problem is the following: in one process I have a dialog with a listbox, when I double-click an item in the listbox another process is started that creates its own window that is brought to front and covers the initial dialog. If I ...

Finding previously focused application - WinAPI

I 'answered' this in a related question - but it is more of an additional question that I having trouble with and I need more recent answers... Basically I have an application that stays open on the screen and the user can press a button on my app once they have made an entry into one of three 3rd party applications. When they click th...

Treeview selected item index

is there anyway to get the index of selected tree view node or do they even have one? ...

My wxFrame has a small thin 1 px border around it even though I asked for no border. Why?

Using wxwidgets. I want a window without a border. I pass the follwoing flags to the frame wxFRAME_NO_TASKBAR | wxSTAY_ON_TOP but it still draws a black outline 1 px wide around the window. Is this a bug or something? ...

Determine if Windows process has privilege to create symbolic link

I want to programmatically determine if the current user (or process) has access to create symbolic links. In Windows (Vista and greater), one cannot create a symbolic link without the SeCreateSymbolicLinkPrivilege and by default, this is only assigned to administrators. If one attempts to create a symbolic link without this privilege, a...

udp socket options for sendng RTP

I am opening socket on windows platform for sending RTP voice packets. The application is softphone. What preferable options should be set on this socket. ...

Can Win32 "move" heap-allocated memory?

I have a .NET/native C++ application. Currently, the C++ code allocates memory on the default heap which persists for the life of the application. Basically, functions/commands are executed in the C++ which results in allocation/modification of the current persistent memory. I am investigating an approach for cancelling one of these f...

Win32: How to enumerate child processes?

What's the best way to enumerate the child processes of the currently running process under Win32? I can think of a couple of ways to do it, but they seem overly complicated and slow. Here's the requirements for the solution: Specifically I need to know if any there are any processes currently running which were started by the current ...

The biggest size of Windows Cursor

I have a cursor what the size size 128x128, but when i used LoadCursor to load and show it, it only has 32x32. Which API can make it correctly? It seems MS resize it. Thanks. ...

How can I forcibly restart/reload a Playback device programatically in Windows?

By forcibly I mean even when some audio applications are using it. By reload I mean the kind of thing that happens after the shared mode sample rate of the speaker is changed in the advanced tab of Speaker Properties. Any audio applications stop immediately. Is it possible to do such a restart programatically? (Or even for that matter ...

How does CreateMutex() internally work?

Basically, it is used to make an application instance singleton. I wish to know, how it works internally and how does OS manage it ? ...

Google Chrome selected text

I am trying to get selected text from browsers(ie,opera, firefox..) using my C# application. I tried SendKeys.Send("^c") then reading the selected value from clipboard this method works fine with ie and Firefox.., but it doesn't work with Google Chrome. How can I get the selected text from Google Chrome and why SendKeys.Send("^c") doesn...

What is the performance cost of a Win32 process switch?

I know the cost of a physical Win32 thread context switch is estimated at between 2-8k cycles. Any estimates on the cost of a process switch? ...

Kill child process from main app

I have a Delphi server that run python scripts in the background (they run similar to "python Sync.py **params**"). This scripts can do things like connect to external servers, open ssh connections and scary stuff where they can hang. I need to detect if they hang, and kill it. Also, if the server is closed, and want to kill the proces...

EN_PROTECTED and RichEdit

The EN_PROTECTED notify message is sent to the parent of a rich edit control when there is an attempt to change "protected" text. This works for me and I've tried it with both richedit20 and richedit50. Any change to this protected text immediately triggers the EN_PROTECTED message. (Its a little complicated to set it up, but I've don...

WPF Startup Screen like Blend

Our main WPF window ('Main Window') takes considerable time to create (it is using a ribbon and docking panel similar to Visual Studio). Just like in Blend the first action will always be to either choose an existing project to work on or to create a new project. Therefore we would like to show this 'Select Project' window as quickly as ...