It is currently Mon May 20, 2013 3:16 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 593 posts ]  Go to page Previous  1 ... 31, 32, 33, 34, 35, 36, 37 ... 40  Next
Author Message
 Post subject:
PostPosted: Sat Apr 11, 2009 5:54 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon May 29, 2006 11:29 am
Posts: 238
Location: BARCELONA - SPAIN
Hi,

I'm using PB4.3 and when I execute the next code with the "create Threadsafe executable" flag activated, i get an error message.

Code:
MyZIP.s = "c:\tmp\test.zip"
MyFilesToZIP.s = "c:\tmp\test.pb"
MyZIPOutPut.s = "c:\tmp\"
; Create archive
Debug PureZIP_AddFiles(MyZIP, MyFilesToZIP, #PureZIP_StorePathAbsolute, #PureZIP_Recursive)
; Extract files from archive
Debug PureZIP_ExtractFiles(MyZIP, "*.*", MyZIPOutPut, #True)
; Count files in archive
Debug PureZIP_GetFileCount(MyZIP)
; Add memory bank to archive
Debug PureZIP_AddMemory(MyZIP, "MemoryTest.txt", @MyZIP, Len(MyZIP))
; On file more in archive :
Debug PureZIP_GetFileCount(MyZIP)


Error Message:
POLINK: error: Unresolved external symbol '_PB_StringBasePosition'.

What am I doing wrong?

Thanks in advanced

_________________
QuimV


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 11, 2009 6:58 pm 
Offline
User
User

Joined: Tue Mar 03, 2009 3:40 pm
Posts: 30
Location: france
Compiler options, Subsystems :

UserLibThreadSafe
UserLibUnicode
UserLibUnicodeThreadSafe


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 15, 2009 11:14 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
drgolf wrote:
Compiler options, Subsystems :
UserLibThreadSafe
UserLibUnicode
UserLibUnicodeThreadSafe
Exactly.
PureZIP.chm wrote:
This library exists in several versions :
- the standard version, located in %Purebasic%\PureLibraries\UserLibraries\ ;
- the thread-safe version, located in %Purebasic%\SubSystems\UserLibThreadSafe\PureLibraries\ .
- the unicode version, located in %Purebasic%\SubSystems\UserLibUnicode\PureLibraries\ .
- the unicode + thread-safe version, located in %Purebasic%\SubSystems\UserLibunicodeThreadSafe\PureLibraries\ .
In order to use this library in thread-safe mode (compiler option /THREAD), you have to enable the subsystem 'UserLibThreadSafe'
in the PB IDE, or add '/SUBSYSTEM UserLibThreadSafe' to the PBCompiler arguments. In jaPBe, do nothing : it will automatically
enable the 'UserLibThreadSafe' subsystem to use the threadsafe versions of the installed userlibraries.
It's the same logic for unicode and unicode + thread-safe modes.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 20, 2009 2:51 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Apr 28, 2003 2:22 pm
Posts: 875
Location: Duisburg, NRW, GER
Hi gnozal.

I maybe found a small problem with you zip userlib.

If I run the following code on my vista 64 Bot System (using PB x86 PB compiler) I always get a "BING!" sound if I click on an item inside the listview.

Sure, I don't use and ZIP command in this small snippet, but the problem does not occure if I remove the userlib from PB (and I only have installed your zip lib!).

Need to compile with Unicode + ThreadSave and WITHOUT XP Skinning support. If skinning support is enabled the problem does NOT occur.

So I believe its a problem with your lib, but maybe this can be a PB bug too, it can not proof. maybe you have an idea and confirm?

Code:
  #Main = 0
  #MDIChild = 1
  If OpenWindow(#Main, 0, 0, 400, 300, "MDIGadget", #PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_SizeGadget|#PB_Window_MaximizeGadget)
    If CreateMenu(#Main, WindowID(#Main))
      MenuTitle("Menu index 0")
      MenuTitle("MDI windows menu")
        MenuItem(0, "self created item")
        MenuItem(1, "self created item")
       
      MDIGadget(0, 0, 0, 0, 0, 1, 2, #PB_MDI_AutoSize)
        AddGadgetItem(0, #MDIChild, "Child-Fenster")

        AddGadgetItem(idMDI_Main,#PB_Any,"zugzuuz")
        tt=ListIconGadget(#PB_Any,0,0,200,200,"zgu",100)
        AddGadgetItem(tt,-1,"gzugugzu")


          ; add gadgets here...
      UseGadgetList(WindowID(#Main)) ; wir gehen zurück zur Gadgetliste des Hauptfensters
    EndIf
    Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
  EndIf


Thanks!

_________________
Tranquil
Grab my Music at: http://www.uptrax.com/MikeDelling
PB4.30, Windows Vista Ultimate,DX 9.0c & DX10 on:Intel Core Quad 6600, 4Gig DDR2 Ram,ATI 4870 512MB,Asus P5N 32E-SLI Board


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 20, 2009 3:02 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Tranquil wrote:
Hi gnozal.
I maybe found a small problem with you zip userlib.
If I run the following code on my vista 64 Bot System (using PB x86 PB compiler) I always get a "BING!" sound if I click on an item inside the listview.
After the beep on Windows 7, the bing with Vista 64 :shock:
Do I understand correctly : the problem occurs even if you don't use PureZIP in your code ?
Is there any sign of ZLIB in the final EXE ?

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 20, 2009 3:13 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Apr 28, 2003 2:22 pm
Posts: 875
Location: Duisburg, NRW, GER
Yes, the problem occures even if I dont use your ZIP commands.

If you want I can upload the same snipped that Ive posted here so that you can take a look on the exe.

Didnt know that this problem was also on Windows 7. As I wrote, it only occurs when XP Skinning is disabled.

EDIT:
http://rapidshare.com/files/223602597/Bing.exe

Thats my compiled version that makes shows the problem. Maybe its a PB bug? Dont know.

_________________
Tranquil
Grab my Music at: http://www.uptrax.com/MikeDelling
PB4.30, Windows Vista Ultimate,DX 9.0c & DX10 on:Intel Core Quad 6600, 4Gig DDR2 Ram,ATI 4870 512MB,Asus P5N 32E-SLI Board


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 20, 2009 3:48 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Tranquil wrote:
Yes, the problem occures even if I dont use your ZIP commands.
If you want I can upload the same snipped that Ive posted here so that you can take a look on the exe.
ZLIB doesn't seem included in the EXE.
I really have no idea what the problem could be ... if PureZIP isn't used, how could it influence the compiled exe :shock: ?

NB : if I compile your code with Unicode + ThreadSave and WITHOUT XP Skinning support (jaPBe V3 + PB4.30 x86 + installed PureZIP on NT4), I get a different EXE : http://rapidshare.com/files/223612425/bing2.zip.html ; could you test it ?

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 20, 2009 4:19 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Apr 28, 2003 2:22 pm
Posts: 875
Location: Duisburg, NRW, GER
That is mysterious. You exe also plays the BING sound on every click on the lists item.

EDIT: In my compiled exe I also have onError support enabled. Think thats the reason why it is a bit bigger then yours.

_________________
Tranquil
Grab my Music at: http://www.uptrax.com/MikeDelling
PB4.30, Windows Vista Ultimate,DX 9.0c & DX10 on:Intel Core Quad 6600, 4Gig DDR2 Ram,ATI 4870 512MB,Asus P5N 32E-SLI Board


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 26, 2009 2:03 am 
Offline
Addict
Addict
User avatar

Joined: Mon Apr 28, 2003 2:22 pm
Posts: 875
Location: Duisburg, NRW, GER
Me again:

Is it possible to send userdatas to a progression callback? I'm using many threads in my code, maybe there are more then one compression at a time with more then one progressbar. So I need to be able to send some userdatas to the progression callback to handle these. Is it possible to add this?

The Callback-Procedure then needs to be extended by a user value. (a pointer would be great)

Then those both commands needs to be enhanced with an optional parameter which holds the userdata that is send to the callback.

- PureZIP_ExtractFiles()
- PureZIP_AddFiles()

Edit:
And now I have another problem. If I add files to my archive using PureZIP_Archive_Create & #APPEND_STATUS_ADDINZIP in conjunction with PureZIP_Archive_Compress OR just PureZIP_AddFiles() I cant see my files after that with PureZip. If I use TotalCommander I can see my files. Ö.ö

Thanks for your great work!

_________________
Tranquil
Grab my Music at: http://www.uptrax.com/MikeDelling
PB4.30, Windows Vista Ultimate,DX 9.0c & DX10 on:Intel Core Quad 6600, 4Gig DDR2 Ram,ATI 4870 512MB,Asus P5N 32E-SLI Board


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 27, 2009 8:59 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Tranquil wrote:
Is it possible to send userdatas to a progression callback? Is it possible to add this?
It is possible, but it will break any existing code using callbacks because of this extra parameter.

I have uploaded a quickfix for you : http://freenet-homepage.de/gnozal/PureZIP_V2_430.zip [libs for PB4.30 only]. Compression / decompression functions now expect an optional UserParam.
This UserParam is mandatory in the callback functions.
Code:
Procedure MyCallback(FileName.s, Progression.f, UserParam.l)
   ; FileName : current processed file (if applicable)
   ; UserParam : some (optional) user parameter
   ; Progression : progression percentage
   ProcedureReturn #False                 
   ; ProcedureReturn #True to stop the compression
EndProcedure

Could you test it ?

Tranquil wrote:
And now I have another problem. If I add files to my archive using PureZIP_Archive_Create & #APPEND_STATUS_ADDINZIP in conjunction with PureZIP_Archive_Compress OR just PureZIP_AddFiles() I cant see my files after that with PureZip. If I use TotalCommander I can see my files.
Hmm...
This code works here :
Code:
; Create new zip
If PureZIP_Archive_Create("c:\purebasic430\program\test.zip", #APPEND_STATUS_CREATE)
  PureZIP_Archive_Compress("c:\PureBasic430\Help\PureWCX.chm", #False)
  PureZIP_Archive_Compress("c:\PureBasic430\Help\PureRESIZE.chm", #False)
  PureZIP_Archive_Close()
EndIf
; Append files to existing zip
If PureZIP_Archive_Create("c:\purebasic430\program\test.zip", #APPEND_STATUS_ADDINZIP)
  PureZIP_Archive_Compress("c:\PureBasic430\Help\PureCOLOR.chm", #False)
  PureZIP_Archive_Compress("c:\PureBasic430\Help\PureCAB.chm", #False)
  PureZIP_Archive_Close()
EndIf
; List zip content
myFileinfo.PureZIP_FileInfo
If PureZIP_Archive_Read("c:\purebasic430\program\test.zip")
  ReturnValue.l = PureZIP_Archive_FindFirst() = #UNZ_OK
  While ReturnValue = #UNZ_OK
    PureZIP_Archive_FileInfo(@myFileinfo)
    Debug "Filename: " + myFileinfo\FileName
    Debug "Compressed Size: " + Str(myFileinfo\CompressedSize)
    Debug "Uncompressed Size: "+ Str(myFileinfo\unCompressedSize)
    ReturnValue = PureZIP_Archive_FindNext()
  Wend
  PureZIP_Archive_Close()
EndIf
PureZIP sees all 4 archived files.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 27, 2009 12:30 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Apr 28, 2003 2:22 pm
Posts: 875
Location: Duisburg, NRW, GER
You are great gnozal!!! I will try asap! Thanks a lot!

_________________
Tranquil
Grab my Music at: http://www.uptrax.com/MikeDelling
PB4.30, Windows Vista Ultimate,DX 9.0c & DX10 on:Intel Core Quad 6600, 4Gig DDR2 Ram,ATI 4870 512MB,Asus P5N 32E-SLI Board


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 27, 2009 1:05 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Apr 30, 2004 10:44 pm
Posts: 123
Location: Turkiye (istanbul)
hi, PureZIP_ExtractFiles returns zero even it extract files correctly? I'm using the latest purezip from
Quote:
I have uploaded a quickfix for you : http://freenet-homepage.de/gnozal/PureZIP_V2_430.zip [libs for PB4.30 only].
with PB 4.30 registered, no multitreaded, no unicode.
extracted files are ok.

_________________
-= endo (registered user of purebasic since 98) =-


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 27, 2009 1:18 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
endo wrote:
hi, PureZIP_ExtractFiles returns zero even it extract files correctly? I'm using the latest purezip from
Quote:
I have uploaded a quickfix for you : http://freenet-homepage.de/gnozal/PureZIP_V2_430.zip [libs for PB4.30 only].
with PB 4.30 registered, no multitreaded, no unicode.
extracted files are ok.
Oops, forgot some ProcedureReturn in this build ... fixing ...

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 27, 2009 1:20 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Apr 30, 2004 10:44 pm
Posts: 123
Location: Turkiye (istanbul)
gnozal wrote:
endo wrote:
hi, PureZIP_ExtractFiles returns zero even it extract files correctly? I'm using the latest purezip from
Quote:
I have uploaded a quickfix for you : http://freenet-homepage.de/gnozal/PureZIP_V2_430.zip [libs for PB4.30 only].
with PB 4.30 registered, no multitreaded, no unicode.
extracted files are ok.
Oops, forgot some ProcedureReturn in this build ... fixing ...


wow, u r fast! I'm waiting thx :)

_________________
-= endo (registered user of purebasic since 98) =-


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 27, 2009 1:26 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
endo wrote:
wow, u r fast! I'm waiting thx :)


... should be fixed (same link).

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 593 posts ]  Go to page Previous  1 ... 31, 32, 33, 34, 35, 36, 37 ... 40  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye