Notifications
Clear all

[Closed] Loading c++ DLL into MaxScript

Hi,
im pretty new to MaxScript and got a very annoying problem.
I’ve been searching around and trying out many many code examples from forums but I got none working.

What I want to do:
Load a C++ DLL into my mini MaxScript plugin and call some functions.

Everytime i try to load the DLL it ends up as “undefined”.
I checked the location of the script trice and tried out many different locations like /scripts, /stdplugs/stdscripts etc… SO Im kinda sure that I didnt just mess the location up.

I would be really happy about a little help here. If someone could post a short codeblock I could use I would fall onto my knees

Thanks to all readers
Martin

PS: If I hit a wrong forum or it is already answered anywhere Im sorry, but I didnt find any solution up to now

3 Replies

Is it a C++ DOT NET dll?

C# dlls are the only ones I have been able to load via max script.

Its a DLL a co-worker wrote.
His words:

Its a c++ DLL (from Delphi, but equal) but NO managed .net DLL

So I guess there is no chance to import that one

If you are going to use c++ functions from maxscript then your best bet is to use the 3dsmax SDK and ‘Function publishing’.

http://docs.autodesk.com/3DSMAX/16/ENU/3ds-Max-SDK-Programmer-Guide/files/GUID-D11DA39D-8190-44A6-B5B1-8F5E94FDA46F.htm

You then make a plugin with the SDK and expose the function to maxscript.