Top "Winapi" questions

The Windows API (formerly called the Win32 API) is the core set of application programming interfaces available for the Microsoft Windows operating systems.

Power off an USB device in software on Windows

I would like to power cycle an USB device through software on Windows. I am doing development on a small …

windows winapi embedded usb microcontroller
How can I open a local HTML file in Microsoft Edge browser?

Since time immemorial, most web browsers have been able to open a local file if you ran the web-browser executable, …

windows winapi windows-10 microsoft-edge
WinApi - GetLastError vs. Marshal.GetLastWin32Error

I tested a lot. But I found no disadvantages of those 2! But see the accepted answer. I read here that …

c# winapi marshalling unmanaged managed
What exactly is a fault bucket and what causes it?

A have a Windows application which I've being running flawlessly for years, first on XP and now on Vista, just …

windows winapi fault
Difference between HANDLE and HWND in Windows API?

I'm trying to use function SetForegroundWindow(HWND hWnD). I have some handles but it's not working as parameter of above …

winapi hwnd handles
How to check if a HANDLE is valid or not?

In C++, I have opened a serial port that has a HANDLE. Since the port may close by an external …

c++ c winapi port handle
CreateProcess doesn't pass command line arguments

Hello I have the following code but it isn't working as expected, can't figure out what the problem is. Basically, …

c++ winapi createprocess
how to get process handle from process id?

I have process Id , I want to get its process handle. Is there any API available for that. I tried …

c++ winapi windows-vista
How to draw image on a window?

I have created a window with createwindow() api using VS2005 in C++ on Windows Vista My requirement is to draw …

windows winapi createwindow
How to make an OpenGL rendering context with transparent background?

Rendering contexts usually have a solid color on the background (black or whatever, see the image below): I'm wondering if …

c winapi opengl transparency