Registry Module (windows only)
Re: Registry Module (windows only)
Should there be some kind of warning if someone on Linux wants to use this?
Re: Registry Module (windows only)
Yes, a compiler error 
Re: Registry Module (windows only)
A compiler error may indicate an incorrectly written function.
What if the function is from PureLibraries?
Re: Registry Module (windows only)
I was joking but it's a good question for libraries that are not cross-platform
-
Randy Walker
- Addict

- Posts: 1281
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
- Contact:
Re: Registry Module (windows only)
Probably not since the subject line clearly shows (windows only). which probably also excludes MAC as well.AZJIO wrote: Sat Dec 21, 2024 10:30 am Should there be some kind of warning if someone on Linux wants to use this?
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Nothing is faster, more stable, or easier to maintain than code that doesn’t exist.
Randy
I *never* claimed to be a programmer.
Nothing is faster, more stable, or easier to maintain than code that doesn’t exist.
-
Randy Walker
- Addict

- Posts: 1281
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
- Contact:
Re: Registry Module (windows only)
Ooops.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Nothing is faster, more stable, or easier to maintain than code that doesn’t exist.
Randy
I *never* claimed to be a programmer.
Nothing is faster, more stable, or easier to maintain than code that doesn’t exist.
Re: Registry Module (windows only)
Even if (windows only) were not specified, everyone already knows that the registry exists only in Windows. When the library is compiled, it will not know which forum thread it was compiled from. To do this, the library must have some kind of flag to warn the user that this library is not intended for this OS.Randy Walker wrote: Sat Dec 21, 2024 6:28 pm Probably not since the subject line clearly shows (windows only). which probably also excludes MAC as well.
When compiled, all debugger messages will be removed, so embedding a debugger message will not work.
There are no people here who will try the registry functions in LinuxRandy Walker wrote: Sat Dec 21, 2024 6:33 pm Ooops.Looks like someone didn't read the subject line and tried it anyway. Subject lines can be so tricky that way.
![]()
-
Randy Walker
- Addict

- Posts: 1281
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
- Contact:
Re: Registry Module (windows only)
I think this collects all installed programs using the native Windows "winget" command:olmak wrote: Thu Aug 11, 2016 4:37 am Hello at all
I'm trying to get a list of installed programs, with some parameters.
Can anyone help me?
Code: Select all
Exe = RunProgram("powershell.exe","winget list","",#PB_Program_Hide|#PB_Program_Open|#PB_Program_Read|#PB_Program_Error)
Debug "Please wait for info to be collected"
If Exe
While ProgramRunning(Exe)
If AvailableProgramOutput(Exe)
Output$=ReadProgramString(Exe)
name$ = StringField(Output$,1," ")
Debug Output$
;Debug name$
EndIf
Wend
EndIf
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Nothing is faster, more stable, or easier to maintain than code that doesn’t exist.
Randy
I *never* claimed to be a programmer.
Nothing is faster, more stable, or easier to maintain than code that doesn’t exist.
Re: Registry Module (windows only)
On 6.40 Beta 1 I get an IMA for the "OpenKeyS"-macro. Seems to be directly related the new string system. Could someone more experienced please take a look?
Good morning, that's a nice tnetennba!
PureBasic 6.30/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/2*DX517, 164TB+82TB+28TB+2TB SSD
Raspi 400/500
PureBasic 6.30/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/2*DX517, 164TB+82TB+28TB+2TB SSD
Raspi 400/500
Re: Registry Module (windows only)
It is PB v6.40 is alpha and must first be tested by us all string functions
Please do not post error messages in other code examples
Please do not post error messages in other code examples
My Projects EventDesigner V3 / ThreadToGUI / OOP-BaseClass / Windows: Module ActiveScript
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive
-
Randy Walker
- Addict

- Posts: 1281
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
- Contact:
Re: Registry Module (windows only)
FINALLY... Someone who agrees with me.ts-soft wrote: Sun Sep 01, 2013 6:10 pm Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Nothing is faster, more stable, or easier to maintain than code that doesn’t exist.
Randy
I *never* claimed to be a programmer.
Nothing is faster, more stable, or easier to maintain than code that doesn’t exist.
Re: Registry Module (windows only)
Regarding version 1.5.3 (as seen here: viewtopic.php?p=632329#p632329):
- Line 331 -> CopyTree always returns #False. This line needs to be commented out/deleted.
- Line 599 -> "We don't free the memory"...ok, but what if *Ret is "0" (the If/EndIf from line 595 to 598)? The pointer to the memory block is stored nowhere and it's never freed (as it can't be freed because the pointer isn't saved anywhere). Between line 597 and 598 insert
- Lines 612 to 615 -> The Memory is doubled on line 615. Is another doubling on line 613 really necessary for Unicode?
- Lines 743 to 768 -> #REG_MULTI_SZ awaits a second \0 at the end of the string (see table: https://learn.microsoft.com/en-us/windo ... alue-types). Between line 744 and 745 should be a line which automatically adds the second \0 to the memory block. Then also line 749 needs to be changed to In addition line 747 could be changed to
- Line 331 -> CopyTree always returns #False. This line needs to be commented out/deleted.
- Line 599 -> "We don't free the memory"...ok, but what if *Ret is "0" (the If/EndIf from line 595 to 598)? The pointer to the memory block is stored nowhere and it's never freed (as it can't be freed because the pointer isn't saved anywhere). Between line 597 and 598 insert
Code: Select all
Else
FreeMemory(*lpData)
- Lines 743 to 768 -> #REG_MULTI_SZ awaits a second \0 at the end of the string (see table: https://learn.microsoft.com/en-us/windo ... alue-types). Between line 744 and 745 should be a line
Code: Select all
lpcbData = SizeOf(Character)Code: Select all
If lpcbData > SizeOf(Character)Code: Select all
pcbData + StringByteLength(tmp, #PB_Unicode) + SizeOf(Character)Good morning, that's a nice tnetennba!
PureBasic 6.30/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/2*DX517, 164TB+82TB+28TB+2TB SSD
Raspi 400/500
PureBasic 6.30/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/2*DX517, 164TB+82TB+28TB+2TB SSD
Raspi 400/500
