BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

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?

 

AC23, Windows 10, i7-6700HQ, 8Gb RAM, 500Gb 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.

AC23, Windows 10, i7-6700HQ, 8Gb RAM, 500Gb 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.

AC23, Windows 10, i7-6700HQ, 8Gb RAM, 500Gb SSD
Learn and get certified!

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!