Possible Add-in bug.
Summary: If an add-in is already enabled when Pelles C is started a call to AddIn_GetActiveProject returns the project name. However if the same add-in is disabled when Pelles C is started but then activated using the Tools- Customize, a call to AddIn_GetActiveProject fails to return the project name.
Thoughts: It could be a bug
OR could be I'm not initializing the add-in correctly
How to test:
Copy Add_in_Bug.dll to AddIns64 directory
Start Pelles C by clicking on any project you already have or just use Add_in_Bug.ppj from attached sources
Check TOOLBAR for a button 'C', if existing then the Addin was enabled automatically click to see project name.
if the button is not there go to Tool - Customize - Add ins and check the box for "PellesC addin bug check"
Click OK
Click the C button and see if the project name is displayed.
Then CLOSE PellesC and restart it. This will mean that the add-in was already active on Pelles C startup
Click the C button now the project name shows up.
Also when a different Project is loaded the 'C' which was working when enabled before Pelles was started now does not get the newly loaded project name.
I hope clear; the result of AddIn_GetActiveProject
seemingly depends on the add-in as already being checked as active when Pelles C starts up. If activated after Pelles is started the button shows but the results of AddIn_GetActiveProject is an empty string.
I lean towards "I've done wrong" so I hope for someone to correct me
Minimum project source attached as a PellesC ZIP.
Forum has been too quiet anyway
John Z