The Win32 API is the core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. This tag is for questions about developing native Windows applications using the Win32 API.

learn more… | top users | synonyms (6)

140
votes
7answers
106k views

Objective C for Windows

What would be the best way to write Objective-C on the Windows platform? Cygwin and gcc? Is there a way I can somehow integrate this into Visual Studio? Along those lines - are there any suggestions ...
120
votes
15answers
68k views

How do you configure an OpenFileDialog to select folders?

In VS .NET, when you are selecting a folder for a project, a dialog that looks like an OpenFileDialog or SaveFileDialog is displayed, but is set up to accept only folders. Ever since I've seen this ...
71
votes
13answers
43k views

Windows threading: _beginthread vs _beginthreadex vs CreateThread C++

What's a better way to start a thread? I'm trying to determine what are the advantages/disadvantages of _beginthread, _beginthreadex and CreateThread. All of these functions return a thread handle ...
57
votes
7answers
6k views

Find out what process registered a global hotkey? (Windows API)

As far as I've been able to find out, Windows doesn't offer an API function to tell what application has registered a global hotkey (via RegisterHotkey). I can only find out that a hotkey is ...
56
votes
10answers
37k views

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? Should I use the Windows API tools for INI file processing (with which I am totally unfamiliar), an ...
53
votes
11answers
38k views

Bring a window to the front in WPF

How can I bring my WPF application to the front of the desktop? So far I've tried: SwitchToThisWindow(new WindowInteropHelper(Application.Current.MainWindow).Handle, true); SetWindowPos(new ...
52
votes
8answers
26k views

How to find if a native DLL file is compiled as x64 or x86?

I want to determine if a native assembly is complied as x64 or x86 from a managed code application (C#). I think it must somewhere in the PE header since the OS loader needs to know this information, ...
51
votes
7answers
29k views

What is __stdcall?

I'm leaning some win32 programming, and the WinMain prototype looks like: int WINAPI WinMain ( HINSTANCE instance, HINSTANCE prev_instance, PSTR cmd_line, int cmd_show ) I was confused as to what ...
45
votes
2answers
2k views

Rendering controls on glass: Solution found, needs double-buffering/perfecting

I (finally!) found a way of rendering Windows.Forms controls on glass that doesn't seem to have any major drawback nor any big implementation time. It's inspired by this article from Coded, which ...
44
votes
10answers
24k views

Is gettimeofday() guaranteed to be of microsecond resolution?

So I find myself porting a game, that was originally written for the Win32 API, to Linux (well, porting the OS X port of the Win32 port to Linux). I have implemented QueryPerformanceCounter by giving ...
43
votes
9answers
18k views

Where can I find my .emacs file for Emacs running on Windows?

I tried looking for the .emacs file for my Windows install for Emacs but could not find it. Does it have the same filename under Windows as in Unix? Do I have to create it myself? If so, under what ...
41
votes
1answer
9k views

Using WinRT from C?

Watching the //BUILD stuff, I saw that WinRT API's can be consumed by C code: I am rather excited about a fresh C API available to Win32 developers. Where can I find information on the C WinRT ...
40
votes
12answers
95k views

Is it possible to “decompile” a Windows .exe? Or at least view the Assembly?

A friend of mine downloaded some malware from Facebook, and I'm curious to see what it does without infecting myself. I know that you can't really decompile an .exe, but can I at least view it in ...
39
votes
12answers
28k views

Generating a unique machine id

I need to write a function that generates an id that is unique for a given machine running a Windows OS. Currently, I'm using WMI to query various hardware parameters and concatenate them together ...
38
votes
3answers
4k views

What's “wrong” with C++ wchar_t and wstrings? What are some alternatives to wide characters?

I have seen a lot of people in the C++ community(particularly ##c++ on freenode) resent the use of wstrings and wchar_t, and their use in the windows api. What is exactly "wrong" with wchar_t and ...

1 2 3 4 5 1110
15 30 50 per page