[Library] Invalid Memory Access While Calling DLL Function

Windows specific forum
User avatar
grabiller
Enthusiast
Enthusiast
Posts: 309
Joined: Wed Jun 01, 2011 9:38 am
Location: France - 89220 Rogny-Les-Septs-Ecluses
Contact:

[Library] Invalid Memory Access While Calling DLL Function

Post by grabiller »

Hi,

I'm a bit puzzled here, I'm trying to use the Assimp64.dll from PureBasic, and while I succeed to open the DLL and retrieve all the C functions, whenever I try to call any of those I get the following error:

Code: Select all

[ERROR] Invalid memory access. (write error at address XXXXXXXXXXXXX)
XX.. being the address of the function.

I'm using standard OpenLibrary() and GetFunction() and load the DLL functions through Prototypes as usual.

I've used ExamineLibraryFunctions() to be sure, and indeed I correctly get all the DLL function entries.

That said, the address I get are quite 'high', such as :
aiGetVersionMajor -> 0x7FEE818BDB0
aiGetVersionMinor -> 0x7FEE818BDA0

I can post a simple Purebasic example if needed, perhaps I'm doing something obviously stupid I don't see, although I'm quite used to import DLL functions.

Any idea what could be wrong here ?

Does this happened to someone else too ?
guy rabiller | radfac founder / ceo | raafal.org
User avatar
grabiller
Enthusiast
Enthusiast
Posts: 309
Joined: Wed Jun 01, 2011 9:38 am
Location: France - 89220 Rogny-Les-Septs-Ecluses
Contact:

Re: [Library] Invalid Memory Access While Calling DLL Functi

Post by grabiller »

My bad..

I was, indeed, doing something stupid: I had an unexpected code path that was closing the library before using it..
guy rabiller | radfac founder / ceo | raafal.org
Post Reply