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.

What does LPCWSTR stand for and how should it be handled with?

First of all, what is it exactly? I guess it is a pointer (LPC means long pointer constant), but what …

c++ winapi lpcstr
How to read a value from the Windows registry

Given the key for some registry value (e.g. HKEY_LOCAL_MACHINE\blah\blah\blah\foo) how can I: Safely …

c++ windows winapi registry
How can I get a process handle by its name in C++?

I'm trying to get the process handle of, say example.exe, so I can call TerminateProcess on it. How can …

c++ winapi process
Windows 7 SDK installation failure

I seem to be completely unable to install the Windows 7 SDK onto my machine, and the only solution I've found …

winapi failed-installation
Get current cursor position

I want to get the current mouse position of the window, and assign it to 2 variables x and y (co-ordinates …

c++ winapi
Check whether a path is valid

I am just wondering: I am looking for a way to validate if a given path is valid. (Note: I …

c# .net winapi path
Exporting functions from a DLL with dllexport

I'd like a simple example of exporting a function from a C++ Windows DLL. I'd like to see the header, …

winapi visual-c++ dll name-decoration
What is the easiest way to parse an INI File in C++?

I'm trying to parse an INI file using C++. Any tips on what is the best way to achieve this? …

c++ winapi ini fileparse
How large is a DWORD with 32- and 64-bit code?

In Visual C++ a DWORD is just an unsigned long that is machine, platform, and SDK dependent. However, since DWORD …

c++ winapi 64-bit dword
Cannot open include file 'afxres.h' in VC2010 Express

I'm trying to compile an old project using VS express 2010 but I get this error: fatal error RC1015: cannot open …

c++ visual-studio winapi visual-c++