RE : Re: XmlTextWriter in c++ XSI

Date : Fri, 4 Apr 2008 09:36:39 -0400 (EDT)
To : XSI(at)Softimage.COM
From : dominic bélanger <lowtunes1(at)yahoo.ca>
Subject : RE : Re: XmlTextWriter in c++ XSI
Et thanks a lots  ,everything fine with #pragma unmanage and manage my xsi do not crash anymore but i have to fix somme litle things likes __declspec dllexport  i will read to day about this how it's work and CGHandle  . anyway im not c++ expert but i will someday .i'll keep you updated thanks again.

Kent Bowling <kentamanos(at)gmail.com> a écrit :
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
 
 

 

Découvrez les photos les plus intéressantes du jour!



À la recherche du cadeau idéal? Offrez Flickr!

Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.