Calling .NET function from C code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am trying to write a .NET Class Library which generates an XML file from the input parameters of all the functions that are called in a C DLL.

(Everytime the GUI call the C DLL's function, I try to generate an XML file of the function called together with the parameters, this means calling the XML generating .NET library inside every function of the C DLL)

When I try to access the function like
GenXML::WriteXmlFile *myfile = new WriteXmlFile();
myfile->Run(parameters);
I get the error C3624 'System::Object': the compiler cannot find this type; it is defined in the assembly 'mscorlib'

[NOTE : i've also added
#import "..\debug\prgdir\GenXML.tlb"
using namespace GenXML;
to the start of the main file of the C DLL]

Help!!
 
GeRmIc said:
Hi,

I am trying to write a .NET Class Library which generates an XML file from the input parameters of all the functions that are called in a C DLL.

(Everytime the GUI call the C DLL's function, I try to generate an XML file of the function called together with the parameters, this means calling the XML generating .NET library inside every function of the C DLL)

When I try to access the function like
GenXML::WriteXmlFile *myfile = new WriteXmlFile();
myfile->Run(parameters);
I get the error C3624 'System::Object': the compiler cannot find this type; it is defined in the assembly 'mscorlib'

[NOTE : i've also added
#import "..\debug\prgdir\GenXML.tlb"
using namespace GenXML;
to the start of the main file of the C DLL]

Help!!

#include <mscorlib.h> ?

Cheers

Arne Janning
 
Yes, i've included that but still the error remains!!
I guess it is in referencing the function, how should I make the C DLL recogoinze the presense of the .NET Library in the project?


Arne Janning said:
GeRmIc said:
Hi,

I am trying to write a .NET Class Library which generates an XML file from the input parameters of all the functions that are called in a C DLL.

(Everytime the GUI call the C DLL's function, I try to generate an XML file of the function called together with the parameters, this means calling the XML generating .NET library inside every function of the C DLL)

When I try to access the function like
GenXML::WriteXmlFile *myfile = new WriteXmlFile();
myfile->Run(parameters);
I get the error C3624 'System::Object': the compiler cannot find this type; it is defined in the assembly 'mscorlib'

[NOTE : i've also added
#import "..\debug\prgdir\GenXML.tlb"
using namespace GenXML;
to the start of the main file of the C DLL]

Help!!

#include <mscorlib.h> ?

Cheers

Arne Janning
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top