winapi

list of exec (related) Windows API calls

hi, I try to create a big (let's not call it complete :) list of all exec-"able" api functions on windows. please help to extend it. ShellExecute(), ShellExecuteA(), ShellExecuteW() CreateProcess(), CreateProcessA(), CreateProcessW() WinExec(), WinExecA(), WinExecW() CreateProcessAsUser(), CreateProcessAsUserA(), CreateProcessAsUserW...

Using CryptoAPI to generate ascii cipher text.

Specifically what i'm trying to do is Generate a PassStub field for a Remote Assistance ticket. The problem is that my results look like binary data but somehow Microsoft generates printable characters. In [MS-RAI]: Remote Assistance Initiation Protocol Specification <16> Section 6: Microsoft says that the "PassStub" field "is encrypted...

Detecting state changes in Internet Explorer

I'm trying to automate some tests on Internet Explorer. How can I find out if the state of the webpage being shown is changed? Is there any way to know when the page finished loading, if it changes, if it is scrolled, etc.? I want to know how I can get this state information from another running process. ...

Shell extension installation not recognized by Windows 7 64-bit shell

I have a Copy Hook Handler shell extension that I'm trying to install on Windows 7 64-bit. The shell extension DLL is compiled in two separate versions for 32-bit and 64-bit Windows. The DLL implements DLLRegisterServer which adds the necessary registry entries. After adding the registry entries, it calls the following line of code to...

Can a window be "in between" minimized (or maximized) and restored state?

I am wondering what state a window is in during the action of minimize maximize or restore. I am not actually sure if this question even makes sense - I am quite new to win32 programming. Basically I have an app with a timing problem where it doesn't see an office app window as visible (IsWindowVisible call) when it is in the process of...

What are good resources to learn about creating a custom WS_CAPTION style for Windows 7?

I want to learn more about creating my own, custom WS_CAPTION style, the end of which would allow me to build a custom CMainFrame for my application that will respond appropriately to Windows 7 drag events. Any books, web sites, etc that people recommend for learning this kind of thing? ...

Starting a process without stealing focus (C#)

I need to be able to start processes (both console and windowed) without it stealing focus. The only way within the .NET framework that I found to do this is Microsoft.VisualBasic.Interaction.Shell with Microsoft.VisualBasic.AppWinStyle.[Minimized|Normal]NoFocus (which map to SW_SHOWMINNOACTIVE/SW_SHOWMA being passed through to ShellExe...

Not receiving WM_QUERYENDSESSION when minimized to system tray.

I'm trying to catch WM_QUERYENDSESSION to save some data in the app, but it seems that I'm not receiving this message on User logoff/system restart when the app is minimized to the system tray. How can I catch it? Thanks. Relevant code (nothing magic in there, hopefully :)): ON_WM_QUERYENDSESSION() BOOL CMainFrame::OnQueryEndSession(...

How to create a hidden window in C++

How to create a hidden window ? The purpose of this window is to receive some messages. ...

In wxwidgets, how do I make one thread wait for another to complete before proceeding?

I have a system where my singleton class spawns a thread to do a calculation. If the user requests another calculation while another calculation is still running, I want it to tear down the existing thread and start a new one. But, it should wait for the first thread to exit completely before proceeding. I have all the tear down working ...

Manipulating scrollbars in third-party application.

Hello, I need to create an application which do the following: At the beginning we have notepad window open with a lot of text in it. Our application must scroll through this file and take notepad window screenshot after each scroll action. I've tried to achieve this using SBM_GETRANGE, SBM_GETRANGE, SBM_SETPOS but it does not work f...

(Py)GTK StatusIcon notifications on Windows

I'm currently writing a screen capture app for Windows and Linux using PyGTK, and I've hit a slight problem with displaying notifications. On Linux, I've been using the libnotify bindings to provide notifications, which has been working very well; however, this has no equivalent on Windows. I'd use the Win32 APIs directly to display the...

How can I get HINSTANCE from a DLL?

I have created a DLL in VC++ as Win32 project DLLMAIN function is BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { return TRUE; } Now I need HINSTANCE of the DLL , that need to be passed to Win32 functions. Are HMODULE an...

Find out where PE file ends through PE header?

I want to append some binary data to the end of my executable. This is just to make my program into a single file. I tried using UpdateResource but I hit some bug inside it with my specific data, so I have to use another solution. So I need to know the original file size to determine if there is actually any data appended to it. Is it po...

Global Keyboard hook not working.

I have created a global Keyboard hook. Hook is created in a DLL. #pragma comment(linker, "/SECTION:.SHARED,RWS") #pragma data_seg(".SHARED") static HHOOK hkb=NULL; static CMyFile *pLF; #pragma data_seg() HINSTANCE hins = NULL; extern "C" LRESULT __declspec(dllexport) __stdcall CALLBACK KeyBoardHookProc( int nCode, WPARAM w...

Why HBITMAP use so little memory ?

Hi, I met an interesting question: load a big (4500x6000) jpeg into memory (RGBRGBRGB....) by libjpeg (cost about 200M memory) CreateDIBitmap() to create a HBITMAP from the data free the memory used now I found that the process use only 5M memory at all. I wonder where is the data of the HBITMAP. (I disable pagefile) update: I wr...

Edit values in config. file

Currently, I'm using ReadFile() and WriteFile() APIs to write & read from file. are there any API functions to replace/edit text if the data is large enough to be written again? I only heard about SetFilePointer() but i'm not quite sure how to use it to replace the text from a file. For example, select a string/char from file say, value...

How to create timer in WinApi (C++)?

How to create timer in WinApi (C++)? ...

What is a windowless control?

Under Windows their is something called a Windowless Control. RichEdit What is a Windowless Control and what are its benefits? ...

.NET wrapper for Windows API functionality

Does anyone know of a .NET managed wrapper around Windows API functionality that is not available in the .NET framework itself? Areas such as window creation and display styles, common UI control manipulation, keyboard/mouse input, file and disk information, memory mapped files etc I have been a regular to visitor http://www.pinvoke...