THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/01/2003 at 11:40, xxxxxxxx wrote:
Cinema 4D Version: 8.012
Platform: Windows ;
Language(s) : C++ ;
Okay, back on track, using the STL example as a basis of the exporter plugin I'm writing, I got my plugin compiling through VC6. Basically I am writing the export plugin that uses a our file format .lib to generate a file that can read into our software. I am having to use windows.h and winsock2.h
Here's the situation:
I compile the plugin using headers from my API, my .lib files and the framework from the STL example, the plugin compiles, loads, gets registed and the plugin is available via the "export" menu.
However, if I only create a new object using my .api, the plugin compiles fine, but doesn't load. If I run C4D under debug, I get access violation 0x00005 (whatever that means). This error occurrs just when C4D tries to load the plugin, not executing any export code, not running any of our API code.
I run the compiled plugins through depends.exe, here's the list of dependent dlls that are with my code:
Here's the Depends .dll list from just the STL code:
Obviously with using my API, i'm invoking more windows-ish subsystems, but the place in the compiled plugin code where i'm just newing up an object isn't being executed on launch. so there isn't anything actually being done. It feels like with the added dll depends, C4D can't find the DLL entry point, or it doesnt like the other DLL depends. Our top developer over here is completely stumped on this as well..
First comment that you could say is that it must be a bad api. however, our API is the same API that has been used to generate plugins for Deep Exploration, 3d Studio MAX, Maya, and Lighwave.
On 21/01/2003 at 12:24, xxxxxxxx wrote:
When it loads you plugin in the debugger, what does the console output, is it something like:
Loaded 'C:\WINNT\system32\netapi32.dll', no matching symbolic information found.
First-chance exception in CINEMA_4D.exe (SHAVE.CDL) : 0xC0000005: Access Violation.
(this is an example btw) this one turned out to be the the libs ws2_32.lib rpcrt4.lib netapi32.lib (last dll (netapi32.dll) loaded was causing the crash), which had to be removed, they were just incompatible. Windows can behave rather badly unless you are very careful. It could well be winsock2.h, it is best to keep any Windows DLLs down to a bare minimum.
On 21/01/2003 at 16:14, xxxxxxxx wrote:
Well the last thing the console says in something like loaded: C:\\yayayaya\MyExport.cdl' no matching symbolic info found.
dosen't mention any windows dlls.
I compile a working (and loading) version of the plugin and run a process viewer on C4d, all the dll dependencies, and the static dll dependecies needed by the non-working plugin are loaded and not crashing.. must be a dynamic dependency. still checking.........
On 22/01/2003 at 13:32, xxxxxxxx wrote:
removed all functions that require winsock2.h and still getting the access violation
byw, the stack call looks like:
EXPORTAMX! operator new (unsigned int )
std::_Allocator( int, char * )