Page 1 of 1

Problem compiling aziascreations/PB-ListComPort project

Posted: Sat Mar 01, 2025 6:15 am
by Indy
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,

Re: Problem compiling aziascreations/PB-ListComPort project

Posted: Sat Mar 01, 2025 1:58 pm
by mk-soft
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.

Re: Problem compiling aziascreations/PB-ListComPort project

Posted: Sun Mar 02, 2025 4:30 pm
by Indy
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.
Thanks for the info and link.

Re: Problem compiling aziascreations/PB-ListComPort project

Posted: Thu Mar 06, 2025 8:33 pm
by Azias
Hello Indy, welcome the the PureBasic community :D

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.