Hello,
I'm brand new to PureBasic and I wanted to get the PB-ListComPort project compiled so I could see how it worked and utilize some of its functionality for a project I have in mind.
I downloaded the source from https://github.com/aziascreations/PB-Li ... /releases and have tried to compile it but I get the following error:
Macro Error
Declare.HANDLE DetectRootKey(RegistryKey$)
RegistryHelper.pbi:
[22:53:53] [COMPILER] Line 100: Structure not found: HANDLE.
It's a long shot but was wondering if anyone knows what the issue is or can point me in a general direction to investigate.
Thanks,
Problem compiling aziascreations/PB-ListComPort project
Re: Problem compiling aziascreations/PB-ListComPort project
Welcome to
Is written in an old PB version 5.x. The rules for macros have changed since then.
Here is the original from ts-soft. https://www.purebasic.fr/english/viewtopic.php?t=56204
But still needs to be checked.
Is written in an old PB version 5.x. The rules for macros have changed since then.
Here is the original from ts-soft. https://www.purebasic.fr/english/viewtopic.php?t=56204
But still needs to be checked.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Problem compiling aziascreations/PB-ListComPort project
Thanks for the info and link.mk-soft wrote: Sat Mar 01, 2025 1:58 pm Is written in an old PB version 5.x. The rules for macros have changed since then.
Here is the original from ts-soft.
Re: Problem compiling aziascreations/PB-ListComPort project
Hello Indy, welcome the the PureBasic community
I took a look at your issue and pushed a fix to the repository with the 2.1.1 tag.
I was able to compile it with the following compilers without any issue:
* 5.73 LTS x64
* 6.11 LTS x64
* 6.11 LTS x64 C Backend
As mk-soft stated, the macros' behaviour changed, and the old HKEY macro was getting expanded to `HANDLE` instead of `WinTypes::HANDLE`.
The fix is a bit quick and dirty, but it should let you play around with the code without having to manually fix my mistakes.

I took a look at your issue and pushed a fix to the repository with the 2.1.1 tag.
I was able to compile it with the following compilers without any issue:
* 5.73 LTS x64
* 6.11 LTS x64
* 6.11 LTS x64 C Backend
As mk-soft stated, the macros' behaviour changed, and the old HKEY macro was getting expanded to `HANDLE` instead of `WinTypes::HANDLE`.
The fix is a bit quick and dirty, but it should let you play around with the code without having to manually fix my mistakes.