The problem here is when developing C++ plugins, XSI wants a DLL with certain functions exported. When you make your project a CLR application, it creates a ".NET assembly" as opposed to a "normal" (not sure of the nomenclature) DLL. You could look at doing a C# plugin and obviously use System.Xml.
If want to do it in C++, you can make a "mixed mode" DLL (again, I'm not sure what the official term is :)).
You can use "#pragma managed" to mark sections of the code which use .NET assemblies (like System.Xml in your case). You then use "#pragma unmanaged" to mark sections of the code which are "straight" C++ (not managed C++).
Then make sure you've got the /clr setting in your project (I don't use the /clr:oldSynax, just /clr should be good).
Doing that should allow you to write a DLL that will export the proper functions (typically with some macro using __declspec dllexport and in an extern "C" block) and still be able to call .NET assemblies. I've never tried it with XSI, but I have for instance written a DLL callable from JNI (Java stuff) that could access managed .NET assemblies.
I'm curious how this turns out, so keep me updated.
-Kent
On Thu, Apr 3, 2008 at 8:48 AM, dominic bélanger <
lowtunes1(at)yahoo.ca> wrote:
hi, im trying to export my passcontainer to xml but i can't use XmlTextWriter and Reader from System::Xml .But if i use this
#using
<System.Xml.dll> using
namespace System::Xml ;
i have this massage from compilator::
-->Error 1 fatal error C1190: managed targeted code requires a '/clr'
from project properties i have change to this ::
-->Common Language Runtime Support, Old Syntax
(/clr:oldSyntax)
everything is fine to compile but xsi crashes when i upDate my plugin, maybe
something is wrong with the Managed code in xsi .
Anyway if someone has an idea how to use xml class through xsi plugs lets me know thanks in advance
À la recherche du cadeau idéal?
Offrez Flickr!