Possible problem calling DLL functions in Windows 7

Windows specific forum
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Possible problem calling DLL functions in Windows 7

Post by luis »

The API only example by Danilo crash here too, but again moving the

filename$="text.xxg"
DeleteFile_(filename$)

before the

vx.l=LoadLibrary_("vfile.dll")

makes all work again.

DeanH wrote:I'll ask the guy who wrote it if he could recompile it.
See if you can convince him to put some ASSERT macros in the code to test for pointers validity, system functions return values and so on. I'm convinced this will help immensely to catch the problem quickly, if the asserts are positioned properly.

Then ask him for a "debug" (with the asserts) and a "release" version.
With debug I mean a release version with the asserts, not a debug build with debug code inside and the asserts.
"Have you tried turning it off and on again ?"
User avatar
DeanH
Enthusiast
Enthusiast
Posts: 281
Joined: Wed May 07, 2008 4:57 am
Location: Adelaide, South Australia
Contact:

Re: Possible problem calling DLL functions in Windows 7

Post by DeanH »

I'd like to thank you for have a look at this. As I said, it drove me nuts and I've spent way too many hours on it. So, it looks as if the problem involves a change to the way Windows version 6 (Vista, W7 & Server 2008) does memory allocation as opposed to previous versions and that functions within the DLL itself may not be checking for incorrect assignments or allocations. As I indicated at the start, I did not feel it was a PureBasic problem as such but something with the operating system. I happen to be using PureBasic, though, extensively. Again, thank you.
Post Reply