Page 4 of 6
Posted: Tue Oct 30, 2007 4:42 pm
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'
Posted: Tue Oct 30, 2007 4:50 pm
by gnozal
dige wrote:Without ThreadSafe:
POLINK: error: Unresolved external symbol '_PB_GetGadgetItemText'
Because you are using PB4.10 ?
Posted: Tue Oct 30, 2007 4:54 pm
by dige
PB4.10 Beta 4, yes
Posted: Tue Oct 30, 2007 5:38 pm
by gnozal
PureLVSORT updated.
Re: Gnozal libraries for PB4.xx
Posted: Tue Mar 16, 2010 7:54 pm
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
and
4.41
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.
Re: Gnozal libraries for PB4.xx
Posted: Wed Mar 17, 2010 8:54 am
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)'
Re: Gnozal libraries for PB4.xx
Posted: Wed Mar 17, 2010 4:20 pm
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?
Re: Gnozal libraries for PB4.xx
Posted: Wed Mar 17, 2010 4:44 pm
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.
Re: Gnozal libraries for PB4.xx
Posted: Wed Mar 17, 2010 7:06 pm
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!

Re: Gnozal libraries for PB4.xx
Posted: Fri Mar 19, 2010 3:20 am
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?
Re: Gnozal libraries for PB4.xx
Posted: Fri Mar 19, 2010 9:26 am
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.
Re: Gnozal libraries for PB4.xx
Posted: Fri Mar 19, 2010 12:17 pm
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.
Re: Gnozal libraries for PB4.xx
Posted: Fri Mar 19, 2010 1:35 pm
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

And I assume it won't work on x64 systems.
Re: Gnozal libraries for PB4.xx
Posted: Thu Apr 01, 2010 3:41 pm
by jamba
edited. I think I made an obvious error.
Uninstalled Userlib, now works fine (using the DLL now instead of the userlib)
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)
Re: Gnozal libraries for PB4.xx
Posted: Tue Apr 06, 2010 6:32 pm
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