Error loading a 3ds plugin that refers to a dependency dll
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello. I'm in the process of writing a 3ds plugin and have been hitting an error when launching 3ds Max. Here's the error that I'm getting.
DLL <C:\Program Files\Autodesk\3ds Max 2020\Plugins\TestPlugin.dlo> failed to initialize. Error code 126 - The specified module could not be found.
I understand this is a fairly common error but the suggested solutions I've seen so far haven't helped in this case. I think what's causing the issue is that my plugin is dependent on another dll that I have. So the TestPlugin.dlo plug in makes references to a separate dll called MainProject.dll that contains my custom code. The problem seems to be that when the plugin loads, the MainProject.dll hasn't been properly loaded and the plugin produces the error. From troubleshooting I've found that TestPlugin.dlo will load successfully in 3ds if I remove any references to the code in MainProject.dll first. So this tells me that there's something wrong with the relationship between these.
Could anyone advise what is the right way to deploy a plugin and the dll that it's dependent on? I also have a .lib file (MainProject.lib) that corresponds to the MainProject.dll. If someone could confirm where the .dlo, .dll, and .lib files need to be deployed to, that would be a huge help. Also, I've looked into whether I need to include a manifest file or if using delayed loading will be necessary. Though I haven't found anything that looks like a solution yet.
Thanks very much for the help! I'd be glad to hear any thoughts or recommendations.
Note: I'm using the 2020 version of 3ds Max.