Gnozal libraries for PB4.xx

Developed or developing a new product in PureBasic? Tell the world about it.
dige
Addict
Addict
Posts: 1391
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post by dige »

I've copied the lib to:

PureLibraries\UserLibraries
and
SubSystems\UserLibThreadSafe

Using the ThreadSafe Option results:
POLINK: error: Unresolved external symbol '_PB_StringBasePosition'
POLINK: error: Unresolved external symbol '_PB_GetGadgetItemText'

Without ThreadSafe:
POLINK: error: Unresolved external symbol '_PB_GetGadgetItemText'
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

dige wrote:Without ThreadSafe:
POLINK: error: Unresolved external symbol '_PB_GetGadgetItemText'
Because you are using PB4.10 ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
dige
Addict
Addict
Posts: 1391
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post by dige »

PB4.10 Beta 4, yes
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

PureLVSORT updated.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Re: Gnozal libraries for PB4.xx

Post by Rook Zimbabwe »

Seems to be a small issue with purecolor on 4.41.

The issue is the FONT I attached to the gadget seems to carry over bdly tot he colored button. Sizes are all over the place... and when no font is specified the last fint used is the font used in the colored button...

4.31
Image

and

4.41
Image

same window... the fonts in 4.31 are accurate. This happens all over the program and I can find no logic to it by color or ???

I have tried setting the FONT to a normal NON BOLD 10pt. Tahoma... No luck and no change.
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: Gnozal libraries for PB4.xx

Post by gnozal »

Rook Zimbabwe wrote:Seems to be a small issue with purecolor on 4.41.
The issue is the FONT I attached to the gadget seems to carry over bdly tot he colored button. Sizes are all over the place... and when no font is specified the last fint used is the font used in the colored button...
Hi Rook,
do you use the latest PureCOLOR version (15.03) ?

This code works here (NT4 or XP) :

Code: Select all

OpenWindow(0, 100, 300, 310, 40, "PureCOLOR button test", #PB_Window_ScreenCentered | #PB_Window_SystemMenu) 
ButtonGadget(3, 10, 10, 80, 20, "Normal", #PB_Button_MultiLine) 
ButtonGadget(4, 210, 10, 80, 20, "Extra + Toggle", #PB_Button_Toggle) 
ButtonGadget(6, 110, 10, 80, 20, "Extra Colors") 
SetGadgetFont(6, LoadFont(0, "Arial", 8))
PureCOLOR_SetButtonColor(3, RGB(255,0,255), RGB(0,255,255)) 
PureCOLOR_SetButtonColor(4, RGB(255,0,0), RGB(0,255,0), RGB(255,127,0), RGB(255,255,0)) 
PureCOLOR_SetButtonColor(6, RGB(255,0,0), #PureCOLOR_SystemColor, RGB(255,0,0), #PureCOLOR_SystemColor)
No bold fonts !

PureCOLOR-Buttons gets the gadget font with 'hFont = SendMessage_(GadgetHandle, #WM_GETFONT, 0, 0)'
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Re: Gnozal libraries for PB4.xx

Post by Rook Zimbabwe »

I have the one i just got from Gnozal's Purebasic Place. It unzips to Purecolor_440_1.exe or something like that. I don't see version number in CHM...

Could it be that I am using Tahoma as my font?
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: Gnozal libraries for PB4.xx

Post by gnozal »

Rook Zimbabwe wrote:I have the one i just got from Gnozal's Purebasic Place. It unzips to Purecolor_440_1.exe or something like that. I don't see version number in CHM...
The installer shows the version before installing (simply run it again and cancel installation).
Alternatively, you could use 'debug PureCOLOR_Version()'
Rook Zimbabwe wrote:Could it be that I am using Tahoma as my font?
I just tried with 'Tahoma' : no problem here.
Maybe some code would help.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Re: Gnozal libraries for PB4.xx

Post by Rook Zimbabwe »

AHA!!! Version is 14.06

But I downloaded the latest version from your site!

Actulaay that is the one in the latest download from the site... ???

Let me double check that in case I just slipped in to idiot mode!

{{EDIT}}
I did have the new file but it waasn't in the download folder I had managed to DLoad it in to My Docs... Installing now!

FIXED!!!

Thank you Phillippe! :mrgreen:
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Re: Gnozal libraries for PB4.xx

Post by SFSxOI »

Gonzal, would you happen to have a good example usage for your PurePROCS lib, specifically for the PurePROCS_Execute and PurePROCS_OpenLibrary functions?
The advantage of a 64 bit operating system over a 32 bit operating system comes down to only being twice the headache.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: Gnozal libraries for PB4.xx

Post by gnozal »

SFSxOI wrote:Gonzal, would you happen to have a good example usage for your PurePROCS lib, specifically for the PurePROCS_Execute and PurePROCS_OpenLibrary functions?
Did you check the library examples ?

PurePROCS_Example_1.pb

Code: Select all

Stream = ReadFile(#PB_Any, GetEnvironmentVariable("windir") + "\notepad.exe")
If Stream
  *Buffer = AllocateMemory(Lof(Stream))
  If *Buffer
    ReadData(Stream, *Buffer, Lof(Stream))
    CloseFile(Stream)
    ProcessID = PurePROCS_Execute(ProgramFilename(), *Buffer, Chr(34) + #PB_Compiler_Home + "\Catalogs\Compiler.catalog" + Chr(34))
    Delay(1000)
    PurePROCS_KillProcessID(ProcessID)
    ProcessID = PurePROCS_Execute(ProgramFilename(), *Buffer, Chr(34) + #PB_Compiler_Home + "\Catalogs\Editor.Catalog" + Chr(34))
    Delay(1000)
    PurePROCS_KillProcessID(ProcessID)
  EndIf
EndIf
PurePROCS_Example_3.pb

Code: Select all

Prototype.l Proto_PureZIPDLL_PackMemory(*SourceMemoryID, SourceLength.l, *DestinationMemoryID, *DestinationLength)
Prototype.l Proto_PureZIPDLL_UnpackMemory(*SourceMemoryID, SourceLength.l, *DestinationMemoryID, *DestinationLength)
;
DataSection
  PureZIPDLL:
  IncludeBinary "c:\PureBasic440\Program\PureZIP.dll"
EndDataSection
;
PureZIP = PurePROCS_OpenLibrary(?PureZIPDLL)
If PureZIP
  PureZIPDLL_PackMemory.Proto_PureZIPDLL_PackMemory = PurePROCS_GetFunction(PureZIP, "PureZIPDLL_PackMemory")
  PureZIPDLL_UnpackMemory.Proto_PureZIPDLL_UnpackMemory = PurePROCS_GetFunction(PureZIP, "PureZIPDLL_UnpackMemory")
  ;
  PackTest.s = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"
  SourceLength = Len(PackTest)
  *SourceMemoryID = AllocateMemory(SourceLength)
  PokeS(*SourceMemoryID, PackTest, SourceLength)
  DestinationLength = SourceLength + (SourceLength * 0.01) + 12
  *DestinationMemoryID = AllocateMemory(DestinationLength)
  PureZIPDLL_PackMemory(*SourceMemoryID, SourceLength, *DestinationMemoryID, @DestinationLength)
  Debug DestinationLength
  PureZIPDLL_UnpackMemory(*DestinationMemoryID, DestinationLength, *SourceMemoryID, @SourceLength)
  Debug SourceLength
  UnpackTest.s = Space(SourceLength)
  UnpackTest = PeekS(*SourceMemoryID, @SourceLength)
  Debug UnpackTest
  ;
  PurePROCS_CloseLibrary(PureZIP)
EndIf
Tested on NT4 and XP.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Re: Gnozal libraries for PB4.xx

Post by SFSxOI »

Yes, I did look at the examples, could not get the examples to work, thats why I asked if there was a good example :) Maybe its something i'm doing wrong, i'll try again.
The advantage of a 64 bit operating system over a 32 bit operating system comes down to only being twice the headache.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: Gnozal libraries for PB4.xx

Post by gnozal »

SFSxOI wrote:Yes, I did look at the examples, could not get the examples to work, thats why I asked if there was a good example :) Maybe its something i'm doing wrong, i'll try again.
I just ran them, and it worked here (NT4 / XP).

Note : PurePROCS_Execute() may not work on Vista / Se7en, depending on the security settings / user rights. Executing an EXE from memory is suspicious :wink:
And I assume it won't work on x64 systems.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
jamba
Enthusiast
Enthusiast
Posts: 144
Joined: Fri Jan 15, 2010 2:03 pm
Location: Triad, NC
Contact:

Re: Gnozal libraries for PB4.xx

Post by jamba »

edited. I think I made an obvious error. :oops:
Uninstalled Userlib, now works fine (using the DLL now instead of the userlib)

Image

however, this looks a bit odd to me, clipped off, maybe.
I suppose something messed up with the new version? or maybe it's just me/something I did wrong when I upgraded! (or maybe even it was always like this and I never noticed)
-Jon

Fedora user
But I work with Win7
jamba
Enthusiast
Enthusiast
Posts: 144
Joined: Fri Jan 15, 2010 2:03 pm
Location: Triad, NC
Contact:

Re: Gnozal libraries for PB4.xx

Post by jamba »

just reinstalled the PureZIP userlib also.

definitely now looks like it doesn't handle the purezip.res properly in 4.5b2

the DLL version works fine, of course.

Code: Select all

; Structure tm_date
;   tm_sec.l  ; seconds after the minute - [0,59]
;   tm_min.l  ; minutes after the hour - [0,59]
;   tm_hour.l ; hours since midnight - [0,23]
;   tm_mday.l ; day of the month - [1,31]
;   tm_mon.l  ; months since January - [0,11]
;   tm_year.l ; years - [1980..2044]
; EndStructure
; Structure unz_global_info
;   number_entry.l      ; total number of entries in the zipfile
;   size_comment.l      ; size of the global comment of the zipfile
; EndStructure
; Structure PureZIP_FileInfo
;   Version.l           ; version made by
;   VersionNeeded.l     ; version needed to extract
;   flag.l              ; general purpose bit Flag
;   CompressionMethod.l ; compression method     
;   dosDate.l           ; last mod file date in Dos format
;   Crc32.l             ; crc-32
;   CompressedSize.l    ; compressed size
;   unCompressedSize.l  ; uncompressed size
;   SizeFilename.l      ; filename length
;   SizeFileExtra.l     ; extra field length
;   SizeFileComment.l   ; file comment length
;   DiskNumStart.l      ; disk number start
;   internal_fa.l       ; internal file attributes
;   external_fa.l       ; external file attributes
;   tmu_date.tm_date    ; file date (see tm_date structure)
;   FileName.s          ; filename
; EndStructure
; Structure zip_file_info
;   tm_zip.tm_date
;   dosDate.l
;   internal_fa.l
;   external_fa.l
; EndStructure
; Structure unz_file_pos
;   pos_in_zip_directory.l
;   num_of_file.l
; EndStructure
-Jon

Fedora user
But I work with Win7
Post Reply