On 18. 12. 2014 21:16, Jim Michaels wrote: > using the code idea for FORMAT_MESSAGE_ARGUMENT_ARRAY: > http://msdn.microsoft.com/en-us/library/windows/desktop/ms679351%28v=vs.85%29.aspx > > it says va_list in this case is a * to array of DWORD_PTR. so what exactly is > a DWORD_PTR? I had assumed it was a pointer, that you need to cast, and > microsoft somehow did a sloppy or erroneous job of documenting or something.
Short answer: It's like uintptr_t. Long answer: According to the first example, I'd say that DWORD_PTR in this situation is kind of equivalent to (void*), i.e. a placeholder type for when the type is not known beforehand. In comparison to other possible placeholder types, DWORD_PTR and (void*) both have the the advantage of being large enough to safely contain any pointer (e.g. string), so unless you want to pass a (long long int) to the function on a 32-bit system, it should be able to contain any allowed parameter. > because in the past, _PTR has always been defined as a * (pointer) to > whatever, like DWORD*. who changed the definition of the word pointer? :-( in > c++ it's a nice and solid def. I can't say how _PTR types were defined in the past, I'm not very familiar with WINAPI. -- David Macek ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
