Problem compiling aziascreations/PB-ListComPort project

Everything else that doesn't fall into one of the other PB categories.
Indy
New User
New User
Posts: 2
Joined: Sat Mar 01, 2025 5:57 am

Problem compiling aziascreations/PB-ListComPort project

Post 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,
User avatar
mk-soft
Always Here
Always Here
Posts: 6245
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Problem compiling aziascreations/PB-ListComPort project

Post 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.
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
Indy
New User
New User
Posts: 2
Joined: Sat Mar 01, 2025 5:57 am

Re: Problem compiling aziascreations/PB-ListComPort project

Post 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.
User avatar
Azias
New User
New User
Posts: 8
Joined: Wed Oct 04, 2017 5:59 pm
Location: Belgium / Luxembourg
Contact:

Re: Problem compiling aziascreations/PB-ListComPort project

Post 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.
Post Reply