Page 1 of 3
ASM Libs Updated
Posted: Wed Mar 02, 2005 3:55 am
by Paul
http://www.reelmedia.org/pureproject
The libraries in the ASM section have all been updated and tested to work with PureBasic 3.93
The VBin library was given a complete overhaul and a few more features were added as well as a new VBin Creator for quickly assembling VBins.
RC4_Lib, MBD_Lib and RegINI_Lib have all been tweeked up and 2 new libraries will be posted as soon as the help files are complete.
Enjoy

Posted: Wed Mar 02, 2005 8:59 am
by gnozal
Thank you Paul

Posted: Wed Mar 02, 2005 3:24 pm
by J. Baker
Thanks Paul! Like the new custom window of VBin!

Posted: Sun Mar 13, 2005 10:33 pm
by DoubleDutch
I had some problems with the encyption "password" stuff, files using this would not work properly afterwards???
Has anyone else had this problem?
-Anthony
Posted: Mon Mar 14, 2005 2:23 pm
by Karbon
Thanks Paul!
Posted: Mon Mar 14, 2005 4:10 pm
by Paul
DoubleDutch wrote:I had some problems with the encyption "password" stuff, files using this would not work properly afterwards???
Has anyone else had this problem?
-Anthony
Works great here and I use it in many applications.
If a file is encoded, you are decoding them before using right?
Anyway, if you don't post your code that is causing the problem, there is no way to point you in the right direction
Kind of like going to a garage and saying "my car doesn't seem to run properly" but not bringing your car for the mechanic to look at.

Posted: Wed Mar 16, 2005 12:36 am
by DoubleDutch
Non-Working code, as requested
Code: Select all
Result=VBin_Create("test.bin")
If Result=0
MessageRequester("Error","Could not create VBin")
EndIf
Result=VBin_AddFile("test.bin","C:\Program Files\PureBasic\Examples\Sources\Data\PureBasic.bmp","password")
If Result=0
MessageRequester("Error","Could not add file to VBin")
EndIf
TotalFiles=VBin_TotalFiles("test.bin")
If TotalFiles>0
For Loop=1 To TotalFiles
file$=VBin_Dir("test.bin",Loop)
osize=VBin_OriginalSize("test.bin",file$)
csize=VBin_CompressedSize("test.bin",file$)
MessageRequester("File:"+Str(Loop),"Name:"+file$+Chr(10)+"Original Size:"+Str(osize)+Chr(10)+"Compressed Size:"+Str(csize))
Next
Else
MessageRequester("Error","Contains no files")
EndIf
Result=VBin_SaveFile("test.bin","C:\Program Files\PureBasic\Examples\Sources\Data\PureBasic.bmp","image.bmp","password")
If Result=0
MessageRequester("Error","Could not save file from VBin")
EndIf
Working code (all thats changed is "password" has been removed):
Code: Select all
Result=VBin_Create("test.bin")
If Result=0
MessageRequester("Error","Could not create VBin")
EndIf
Result=VBin_AddFile("test.bin","C:\Program Files\PureBasic\Examples\Sources\Data\PureBasic.bmp")
If Result=0
MessageRequester("Error","Could not add file to VBin")
EndIf
TotalFiles=VBin_TotalFiles("test.bin")
If TotalFiles>0
For Loop=1 To TotalFiles
file$=VBin_Dir("test.bin",Loop)
osize=VBin_OriginalSize("test.bin",file$)
csize=VBin_CompressedSize("test.bin",file$)
MessageRequester("File:"+Str(Loop),"Name:"+file$+Chr(10)+"Original Size:"+Str(osize)+Chr(10)+"Compressed Size:"+Str(csize))
Next
Else
MessageRequester("Error","Contains no files")
EndIf
Result=VBin_SaveFile("test.bin","C:\Program Files\PureBasic\Examples\Sources\Data\PureBasic.bmp","image.bmp")
If Result=0
MessageRequester("Error","Could not save file from VBin")
EndIf
Hopefully this will enable the garage to fix my car?
-Anthony
Posted: Wed Mar 16, 2005 12:38 am
by DoubleDutch
Forgot to mention that it fails at the save point ("Could not save file from VBin") on the "password" version...
-Anthony
Posted: Wed Mar 16, 2005 3:20 am
by Paul
Thanks for the example.
There was a problem with VBin_AddFile generating an improper CRC check when password was used. We use VBin Creator to build our BIN files so this was not noticed (since VBin Creator was generating proper CRC checks)
Problem is fixed and update is available on pureproject.net
Thanks again for the info.
See how easy it is to find and fix a problem when we have something to work with

A little tune up and we're good to go!
Posted: Wed Mar 16, 2005 10:08 am
by DoubleDutch
Many thanks for the library fix
Glad to have helped track it down with the example.
-Anthony
Posted: Thu Mar 17, 2005 1:00 am
by Shannara
Hmm, looks like (according to the help) vBin2 is missing the compression rate option for adding files to bin files. Any chance to add this back in?
Posted: Thu Mar 17, 2005 5:47 pm
by DoubleDutch
The library crashes with VBin_AddFile and the included image:
Code: Select all
Result=VBin_Create("test.bin")
If Result=0
MessageRequester("Error","Could not create VBin")
EndIf
If VBin_AddFile("test.bin","logo.png")=0
MessageRequester("Error","Could not add file")
EndIf
MessageRequester("Okay","Finished")
Here is the image url:
http://www.doubledutchdesigns.com/download/logo.png
Here is the compiled program:
http://www.doubledutchdesigns.com/download/test2.exe
Any ideas?
-Anthony
Posted: Thu Mar 17, 2005 6:38 pm
by Paul
DoubleDutch wrote:
Any ideas?
-Anthony
Yes, use "VBin Creator" ....
or download latest update
Thanx.
Posted: Thu Mar 17, 2005 6:49 pm
by DoubleDutch
Works fine now...
Thanks,
-Anthony
Posted: Fri Mar 18, 2005 3:02 pm
by DoubleDutch
How do you release the memory?
Is it like the 4th line below?
Code: Select all
Image=VBin_("MyBin","images\PBLogo.bmp")
If Image
CatchImage(#Image,Image)
FreeMemory(Image) ; free memory used the VBin_ ??????
Else
MessageRequester("Error","Image not Found in VBin")
End
EndIf
