I have a C++ program that uses LPDWORD, DWORD, etc. When I compile using GCC, it throws an error. How do I handle LPDWORD, DWORD, LPBYTE, and LPTSTR in GCC?
If you're on a Windows system, you can use
#include <windows.h>
These datatypes are typical Windows API datatypes.
If you're on another platform, you can typedef
the datatypes, but it's likely that the problems will go on and you'll have to port much of the code.
typedef uint32_t* LPDWORD;
typedef uint32_t DWORD;
// etc
All of those typedefs are Microsoft's version of the GCC's typedefs. If you only have some of them in your program, you can add a header file to convert them into GCC's semantics.
See this MSDN page for more info on Microsoft's data types:
http://msdn.microsoft.com/en-us/library/aa383751(VS.85).aspx
Those are types defined in the Windows specific header file windows.h. If your code uses those types, it probably uses a lot of Windows specific functions too, and thus will not be portable. That's not to say you can't compile such code with GCC - you can with the MinGW port, but this will only work on Windows.