Windows API: Strange behaviour after calling GetModuleFileNameExA
Joel Lucsy
jjlucsy at gmail.com
Tue Nov 27 21:42:56 PST 2007
Regan Heath wrote:
> I've just looked at the psapi.h header in my SDK I see:
>
> #ifdef __cplusplus
> extern "C" {
> #endif
>
> BOOL
> WINAPI
> EnumProcesses(
> DWORD * lpidProcess,
> DWORD cb,
> DWORD * cbNeeded
> );
>
> note the extern "C" there. I believe that confirms it's C linkage and
> not Windows linkage.
Actually, the WINAPI is what sets STDCALL. I believe the extern "C" is
for telling the compiler how to mangle, or not mangle in this case, the
name of the function.
--
Joel Lucsy
"The dinosaurs became extinct because they didn't have a space program."
-- Larry Niven
More information about the Digitalmars-d
mailing list