(char*)GlobalAlloc(GPTR, len + 1);
This is the line of code in question, which I’m using from a tutorial. I’m reading from an EDITTEXT. I’d mostly like to know where GPTR came from, and what it’s for. It hasn’t been defined anywhere else in the code.
I’ve got a basic understanding of the rest of the line, but MSDN‘s explanation isn’t quite clear. They say this:
HGLOBAL WINAPI GlobalAlloc(
__in UINT uFlags,
__in SIZE_T dwBytes
);
Could someone explain in plain English where GPTR is from, what it’s for, and how it relates to __in UINT uFlags? I know it’s an unsigned int but then the knowing stops.
Thanks in advance.
Refer here
GPTR 0x0040 Combines GMEM_FIXED and GMEM_ZEROINIT.
As you can see, it is just a bit pattern (0x0040) and can be combined with other permissible flags