Page 1 of 1

PBZIP doesn't work as a dll

Posted: Tue Apr 12, 2005 5:18 am
by halo
I am using PB v3.90, since my username/password stopped working, and the staff hasn't answered my email yet.

PBZIP always gives me a BAD_FILE error when I try to open a zip file from a dll, even with the full file path.

Anyone have experience with this?

Posted: Tue Apr 12, 2005 5:22 am
by Max.
Did you try the "Lost Password" option here: http://www.purebasic.com/securedownload/Login.php

The account name is the old email address you used to order Purebasic, if I remember right, no matter if you changed that later.

Posted: Wed Apr 13, 2005 12:02 am
by halo
I have a copy of the original email, so it isn't an issue of a lost username or password. It just doesn't work.

I tried calling the dll as a Blitz userlib, calling it from a PureBasic dll, and using CallDLL (blitz). It keeps failing to open packages, when I use other PureBasic dlls in the same program. Could this be because it was compiled with the PBZIP library, and the other dlls were not? I have noticed strange interference when using multiple pb dlls in one program.

Posted: Wed Apr 13, 2005 12:15 am
by halo
Interesting:

If another PureBasic DLL is called that contains global variable, the zip dll fails.

If other PureBasic DLL's are called, but they contain no global variables, the zip DLL works.

So it stands to reason that Blitz doesn't really release the DLL's properly. Should globals be declared in some kind of "InitDLL" function? How can you "undeclare" a global?

I think what I have to do is write a dll for blitz to call, which will in turn properly open and close other libraries.

Posted: Wed Apr 13, 2005 1:01 am
by halo
Oh god, you won't believe this:

If 3 libraries are opened and closed before the zip dll, everything is fine.

If 4 or more libraries are opened and closed before the zip dll, it doesn't work.

Has nothing to do with globals.