Questions tagged [winapi]

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

The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. It was formerly called the Win32 API; however, the name Windows API more accurately reflects its roots in 16-bit Windows and its support on 64-bit Windows. Almost all Windows programs interact with the Windows API. You can find more help on the Windows API Documentation.

The Windows API (Win32) is primarily focused on the C programming language in that its exposed functions and data structures are described in that language in recent versions of its documentation. However, the API may be used by any programming language compiler or assembler capable of handling the (well defined) low level data structures along with the prescribed calling conventions for calls and callbacks.

42239 questions
10
votes
2 answers

Building C++ project on a PC with Windows SDK 7.1 but without VS2010

I have a C++ project (some sort of a console 32-bit appplication) developed in VS2010, which builds just fine on my PC (Windows 7 32-bit). My PC has Microsoft SDK 7.0A installed, which I think comes bundled with VS2010. I try to build the project on…
AntonK
  • 1,210
  • 1
  • 16
  • 22
10
votes
2 answers

Win32, C++: Creating a popup window without stealing focus

I am creating a program that displays a popup at certain times (just like some chat clients for example) on which the user can click. However, I do not want to take away the focus from the current application. The way I'm doing it now is by using a…
Rand
10
votes
3 answers

Does Windows 8 ARM, A.K.A. "Windows RT" have the Winapi (win32) available for third party developers?

Windows 8 for ARM, also known as Windows RT, does it have the equivalent of the Win32 API? (I don't mean if it can run Win32 x86 code, but if it has the Win32 API available to third party developers.)
Prof. Falken
  • 24,226
  • 19
  • 100
  • 173
10
votes
1 answer

How can i track COM+ events call with Delphi?

I have a huge application that was made with COM+ Objects and i want to track/log the call of events of these components. The objective is to find the problems and refator that methods. I have found some documentation of API like this…
Gabriel Fonseca
  • 345
  • 3
  • 12
10
votes
2 answers

how to convert from LPCSTR to LPCWSTR in c++

additional info im building an application which use the WinHttpOpenRequest Api which requires LPCWSTR for the object name and im using visual studio 2008
andrewmag
  • 252
  • 1
  • 4
  • 11
10
votes
2 answers

How can I generate continuous tones of varying frequencies?

I want to generate and play a continuous sound with specific frequencies and amplitudes that change over time. I don't want to have a delay between sounds. How can I do this with Delphi or C++ Builder?
user558126
  • 1,303
  • 3
  • 21
  • 42
10
votes
3 answers

Is zero ever a valid handle?

There is a SafeHandleZeroOrMinusOneIsInvalid class in the .NET Framework, as well as a SafeHandleMinusOneIsInvalid class. Why is this? In which situations is zero ever a valid handle?
user541686
  • 205,094
  • 128
  • 528
  • 886
10
votes
1 answer

How can i set an entrypoint for a dll

First i thought entry point in dlls DLLMain but then when i try to import it in C# i get an error that entrypoint wasn't found Here is my code: #include int Test(int x,int y) { return x+y; } BOOL APIENTRY DllMain( HMODULE hModule, …
method
  • 1,369
  • 3
  • 16
  • 29
10
votes
3 answers

How can I determine why my process terminates

I have a problem where during a call to a 3rd party library routine my process terminates. I am completely unable to catch this in my debugger. This may be related to this question: How can I debug a win32 process that unexpectedly terminates…
Yngve Hammersland
  • 1,634
  • 2
  • 14
  • 28
10
votes
2 answers

How to cast a LONG to a CString?

I want to cast a long to a cstring. I've been struggling with this for a while and I've seen so many variants of solving this problem, more or less riddled with hassle and angst. I know the question seems subjective, but it really shouldn't be in my…
Phil
  • 3,934
  • 12
  • 38
  • 62
10
votes
3 answers

How to resize regions allocated by VirtualAlloc?

I would like to resize a region of memory allocated by MS window's VirtualAlloc. Looking at the VirtualFree documentation, it is possible to decommit a region only partly, but it's not possible to partially release it. That is, it's possible to…
cib
  • 2,124
  • 2
  • 21
  • 23
10
votes
1 answer

CreateCompatibleBitmap and CreateDIBSection (Memory DC's)

from what I've read here it seems that most of the Windows GDI functions are accelerated. So for instance a call to BitBlt or AlphaBlend uses hardware acceleration if available. It also mentions that the contents of a window are kept only in video…
demorge
  • 1,097
  • 1
  • 7
  • 17
10
votes
1 answer

Native Win32 window in WPF Control

I am developing an application that needs to a host native Win32 window and somehow i have no clues how to do that. I need to create a WPF dialog window that could display native Win32 control on it. This dialog window will have WPF controls on it…
pablox
  • 643
  • 2
  • 8
  • 17
10
votes
1 answer

What are the differences between RedrawWindow and UpdateWindow in Win32?

What are the differences between RedrawWindow and UpdateWindow in Win32? Since they seem to have the same purpose to refresh a window, what are the differences?
jondinham
  • 8,271
  • 17
  • 80
  • 137
10
votes
4 answers

What is the purpose of GetPrivateProfileString?

I have come across the term GetPrivateProfileString in a C++ program. Could anyone give me a simple explanation of the use of this function? The code on my page is: GetPrivateProfileString("files", "directory", "/mediadb/files/", directory,…
smurf
  • 271
  • 2
  • 3
  • 12