2 messages in net.java.dev.jna.usersCalling c++ methods with mangled name...
FromSent OnAttachments
vsworkFeb 28, 2008 5:21 am 
Timothy WallFeb 28, 2008 5:56 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Calling c++ methods with mangled names exported by DLL.Actions...
From:vswork (vsw@yandex.ru)
Date:Feb 28, 2008 5:21:20 am
List:net.java.dev.jna.users

Good day.

How do I call c++ methods with names mangled by linker?

For example, in .h file method is called

_declspec(dllexport) int WINAPI function(char *szAccount, char *szPassword, char
*szIpAddress, int nPort, int nMaxBufSize);

and method name as exported from DLL is

?function@@YGHPAD00HH@Z

There's FunctionMapper interface, but filling it with names map manually is very
hard. Is there a more automated solution?

Thank you.