What difference is there (if any) between these two? MSDN is very unclear.
Here it sounds like they are equivalent: https://msdn.microsoft.com/en-us/library/windows/desktop/ms683197%28v=vs.85%29.aspx
But here it sounds like _pgmptr may not always give me a full path, but it doesn't really explain under what circumstances. https://msdn.microsoft.com/en-us/library/tza1y5f7.aspx
_pgmptr Seems far more attractive to me because I don't have to play buffer size guessing games with it.
_wpgmptrmay not contain a full path. If you don't care about contracts, and would rather develop against a particular implementation, you can dive right into reading the CRT source. - IInspectable_get_pgmptrso that should be your preferred method. (It doesn't copy the string into a buffer you provide, it copies a pointer to the string into a pointer you provide.) - Harry Johnston