Hi everyone,
I need to load external DLL in my lisp to do some calculations.Formulas and parameters are specific - cant implement in lisp.
The library was developed as dynamic library, written on Microsoft Visual C++.
I have detailed description of all three functions in DLL:
extern "C" __declspec(dllexport) long __stdcall
InitializeAllTheStuff(const char* par1, const char* par2)
extern "C" __declspec(dllexport) long __stdcall
DoTheCalc(int p1, int *z, double *a, double *b)
extern "C" __declspec(dllexport) long __stdcall
FreeStuff()
The last one is required after using "DoTheCalc" function
I have reviewed related topics and I'm trying something like this:
(defun C:loadmydll(/)
(vlax-invoke
(vla-GetInterfaceObject
(vlax-get-acad-object) "path\mydll.dll") 'InitializeAllTheStuff "p1" "p2")
)