Errors when calling DLL
Thomas Bock <[email protected]>
| Newsgroups | gmane.comp.windows.devel.jawin |
|---|---|
| Message-ID | <LISTSERV%[email protected]> |
I get the following errors when calling the following methods in a DLL
#ifdef MTPHELPER_EXPORTS
#define MTPHELPER_API __declspec(dllexport)
#else
#define MTPHELPER_API __declspec(dllimport)
#endif
extern "C"
{
// Initialize MTP helper library
MTPHELPER_API HRESULT MtpInitialize();
// Start playing
MTPHELPER_API HRESULT MtpPlay();
...<snip>
I get an
"org.jawin.COMExcpetion: 80004005: Unspecified error" - when I'm trying to
MtpInitialize
and
"COMExcpetion: 8000ffff: Catastrophic failure" - when I'm trying to MtpPlay
I use the following Java code
FuncPtr f = new FuncPtr("MtpHelper.dll", "MtpInitialize");
f.invoke(ReturnFlags.CHECK_HRESULT);
Any idea what I'm doing wrong??
Thanks
Thomas