November 29, 2007 Re: Windows API: Strange behaviour after calling GetModuleFileNameExA | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos Santander | How could this be done? I never made an alias via a def-file before ;)
> > On the other side: extern (C) within D is the only possibility to use for
> > this two functions, if I use extern (Windows) I'll get linker errors (linker
> > can not find symbols _EnumProcesses@12 and _GetModuleFileNameExA@16).
> >
> > With extern (Windows) it seems to be correct - remember: EnumProcesses()
> > works fine, only GetModuleFileNameExA() causes the problem.
> >
> > Additional note: GetProcessImageFileNameA() (which could be an alternative to
> > GetModuleFileNameExA()) causes the same problem.
> >
>
> You could use a .def file to alias _EnumProcesses@12 to EnumProcesses.
>
|
November 29, 2007 Re: Windows API: Strange behaviour after calling GetModuleFileNameExA | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tobias Wassermann | Tobias Wassermann escribió: > How could this be done? I never made an alias via a def-file before ;) > > >> > On the other side: extern (C) within D is the only possibility to use for >> > this two functions, if I use extern (Windows) I'll get linker errors (linker >> > can not find symbols _EnumProcesses@12 and _GetModuleFileNameExA@16). >> > >> > With extern (Windows) it seems to be correct - remember: EnumProcesses() >> > works fine, only GetModuleFileNameExA() causes the problem. >> > >> > Additional note: GetProcessImageFileNameA() (which could be an alternative to >> > GetModuleFileNameExA()) causes the same problem. >> > >> >> You could use a .def file to alias _EnumProcesses@12 to EnumProcesses. >> Check http://www.digitalmars.com/ctg/ctgDefFiles.html#exports -- Carlos Santander Bernal |
Copyright © 1999-2021 by the D Language Foundation