Cannot find symbol using wine

Denis Koroskin 2korden at gmail.com
Sun Oct 24 18:20:53 PDT 2010


On Mon, 25 Oct 2010 05:03:50 +0400, Jonathan M Davis <jmdavisProg at gmx.com>  
wrote:

> I'm trying to read from the registry (thus far unsuccesfully).
> core.sys.windows.windows has RegOpenKeyExA() in it, and I'm trying to  
> use it to
> read a registry key. However, when I use it, I get this error upon  
> compilation:
>
> Error 42: Symbol Undefined _RegOpenKeyExA at 20
>
> I'm using wine, and according to
> http://source.winehq.org/WineAPI/RegOpenKeyExA.html it appears to be
> implemented. So, what on earth could I be missing? Any help would be much
> appreciated.
>
> - Jonathan M Davis

This function isn't implemented in Phobos, it's implemented in advapi32.dll
You either need to link with advapi32.lib or a linkage.def file with the  
following contents (without quotes):

"EXETYPE NT

IMPORTS
_RegOpenKeyExA at 20 = advapi32.RegOpenKeyExA"

Hope that helps.


More information about the Digitalmars-d-learn mailing list