Handle LPDWORD, LPSTR in GCC

I have a C ++ program that uses LPDWORD, DWORD, etc. When I compile using GCC, it throws an error. How to handle LPDWORD, DWORD, LPBYTE and LPTSTR in GCC?

+3
source share
4 answers
typedef uint32_t* LPDWORD;
typedef uint32_t DWORD;
// etc
+8
source

These are the types defined in the Windows.h Windows header file. If your code uses these types, it probably also uses many of the special Windows functions and therefore will not be portable. This does not mean that you cannot compile such code with GCC - you can with MinGW port , but it will only work on Windows.

+5
source

Windows,

#include <windows.h>

Windows API.

, typedef , , , , .

+3

typedefs Microsoft Gmail typedefs. , , GCC.

Microsoft . MSDN:

http://msdn.microsoft.com/en-us/library/aa383751(VS.85).aspx

+2

Source: https://habr.com/ru/post/1748524/


All Articles