Exporting C++ Callbacks

 
 
 

For C++ commands, the wizard no longer generates DEF files. Instead, the __declspec(dllexport) keyword is used to export functions from the command DLL:

XSIPLUGINCALLBACK CStatus XSILoadPlugin( PluginRegistrar& in_reg )
{
	...
}

The XSIPLUGINCALLBACK macro is defined in sicppsdk.h:

#ifndef XSIPLUGINCALLBACK
	#ifdef unix
		#define XSIPLUGINCALLBACK extern "C"
	#else
		// The Softimage C++ API uses C-linkage.  Disable the warning
		// that reminds us that CStatus is a C++ object
		#pragma warning( disable : 4190 ) 
		#define XSIPLUGINCALLBACK extern "C" __declspec(dllexport)
	#endif
#endif

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License