Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

Loading DLL from AddOn fails for ArchiCAD27

Martin Walter
Enthusiast

I have working code for an ArchiCAD-Addon for Versions 22-26. Now I try to run it with ArchiCAD 27 but it fails in the following line:

 

 

 

m_hModule = ::LoadLibrary(wstrDLLPath);

 

 

 

LoadLibrary() returns 0.

 

I investigated, that ::GetLastError(); returns 127, that means a Procedure is not found.

This does not make much sense in the ::LoadLibrary function.

 

Maybe it is the 

 

 

BOOL APIENTRY DllMain(HMODULE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved);

 

 

 

function that is missing in my DLL. Or did I miss something else?

 

AC22-27, Windows 11, i7-1355U, 32GB RAM, 2TB SSD
1 ACCEPTED SOLUTION

Accepted Solutions
Solution

I found my mistake: It is my own DLL and it includes some ArchiCAD API functions. I compiled and linked it against the ArchiCAD 26 API and tried to load the DLL with ArchiCAD 27.

AC22-27, Windows 11, i7-1355U, 32GB RAM, 2TB SSD

View solution in original post

2 REPLIES 2
Akos Somorjai
Graphisoft
Graphisoft

Hi Martin,

 

Couple of questions:
Is this your own DLL?
Is it on a path accessible by Archicad?
Can you load it if you place the DLL beside Archicad 27?

 

Best, Akos

Solution

I found my mistake: It is my own DLL and it includes some ArchiCAD API functions. I compiled and linked it against the ArchiCAD 26 API and tried to load the DLL with ArchiCAD 27.

AC22-27, Windows 11, i7-1355U, 32GB RAM, 2TB SSD

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!