ASM Libs Updated

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1282
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

ASM Libs Updated

Post 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 :)
Last edited by Paul on Thu Sep 06, 2007 5:22 am, edited 1 time in total.
Image Image
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Thank you Paul :D
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
J. Baker
Addict
Addict
Posts: 2181
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Post by J. Baker »

Thanks Paul! Like the new custom window of VBin! :D
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef


Even the vine knows it surroundings but the man with eyes does not.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post 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
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Thanks Paul!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1282
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post 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. :lol:
Image Image
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post 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? :wink:

-Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Forgot to mention that it fails at the save point ("Could not save file from VBin") on the "password" version...

-Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1282
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post 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!
Image Image
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Many thanks for the library fix :D

Glad to have helped track it down with the example.


-Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post 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?
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post 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

Image

Here is the compiled program:
http://www.doubledutchdesigns.com/download/test2.exe

Any ideas?

-Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1282
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post by Paul »

DoubleDutch wrote: Any ideas?
-Anthony
Yes, use "VBin Creator" ....
or download latest update :)

Thanx.
Image Image
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Works fine now... :D

Thanks,

-Anthony
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post 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 
:?:
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Post Reply