1 message in net.java.dev.jna.users[jna-users] Kernel32 GetProcAddress r...
FromSent OnAttachments
A Dwi BasukiDec 21, 2008 10:46 pm 
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:[jna-users] Kernel32 GetProcAddress returning nullActions...
From:A Dwi Basuki (ag2@yahoo.co.uk)
Date:Dec 21, 2008 10:46:10 pm
List:net.java.dev.jna.users

Dear JNA users,

Hello I'm newbie in C and JNA. I've tried to map function LoadLibrary &
GetProcAddress in kernel32.dll. LoadLibrary was mapped successfully.

HINSTANCE LoadLibrary(String pctstr);

But, when GetProcAddress executed, it returned null value. The code below is the snipped c code of GetProcAddress :

FARPROC WINAPI GetProcAddress( __in HMODULE hModule, __in LPCSTR lpProcName );

And I have mapped it in Java:

FARPROC GetProcAddress(HINSTANCE hInstance, String str);

It returned null value. If i call GetLastError, it says that
ERROR_PROC_NOT_FOUND (error code: 0x7f). I'm sure that I have put the correct
parameter to call it. I do not know how to solve this problem. Any help please?