LPHANDLE vs HANDLE

While looking at the code, I found an OpenPrinter () call . The code compiles and works fine. But we pass HANDLEinstead LPHANDLE(as indicated on MSDN). I found out that the windef.hfollowing declaration exists:

typedef HANDLE FAR          *LPHANDLE;

What does LP mean? Should I use LPHANDLEor save HANDLE?

+3
source share
4 answers

LP stands for Long Pointer. This is a pointer to a descriptor in this case.

HANDLE h = <winapi function>();
LPHANDLE ph = &h;

You can use it just like a pointer descriptor descriptor:

HANDLE anotherh = *ph;
or
<winapi function>(*ph, ...);
+6
source

"LP" means "Long Pointer".

HANDLE! = LPHANDLE, same as DWORD! = DWORD * (or LPDWORD)

+7

FAR 8086/8088 , . NEAR FAR.

LP ( ) - Microsoft .

Win32 , NEAR FAR . , poitner, , , .

+4

, , , 16- 16- . , +, . LP - api .

, 32- 64- Windows , ( PAE - ).

+3

All Articles