473,403 Members | 2,284 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Calling .NET function from C code

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!!
Nov 16 '05 #1
2 1720
GeRmIc wrote:
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
Nov 16 '05 #2
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" wrote:
GeRmIc wrote:
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

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Muthu | last post by:
I've read calling conventions to be the order(reverse or forward) in which the parameters are being read & understood by compilers. For ex. the following function. int Add(int p1, int p2, int...
3
by: Glenn C. Rhoads | last post by:
I'm having a problem calling a C function from a publicly available library file. To get the code to compile, I had to declare the function as an external C function as follows. extern "C"...
13
by: RainBow | last post by:
Hi everyone, (Very Sorry, if this is the wrong group in which I am posting this query). Code snippet: //C library typedef int (*PFunc)(int* aArg); void call_c_foo(PFunc aPtrtoFunc) {
6
by: jchao123 | last post by:
Dear All, I have an MDB file (Access 2000/XP) which contains generic routines I use in various apps (eg, API calls, File access classes etc). I have compiled into an MDE file which I reference...
1
by: Jesse McGrew | last post by:
Hi all, I'm trying to make a plugin DLL for a third-party application, using VC++ .NET 2003. This DLL acts as a bridge between the C++ plugin API of the application, and my actual plugin code...
1
by: H.B. | last post by:
Hi, I need to make a function that can display data on my Managed C++ app and be called by an unmanaged C++ DLL. Something like : void Form1::Form1_Load(System::Object * sender,...
18
by: John Friedland | last post by:
My problem: I need to call (from C code) an arbitrary C library function, but I don't know until runtime what the function name is, how many parameters are required, and what the parameters are. I...
15
by: dspfun | last post by:
Hi, Is it possible to print the function name of the calling function? For example, f1() and f2() both calls f3(), in f3() I would like to print the name of the function calling f3() which...
11
by: briankirkpatrick | last post by:
Forgive me if my post seems a little amateurish... I'm requesting assistance from some of you smart folks out there to get the managed calls write that meet the specification in the esa.h for...
16
by: teju | last post by:
hi, i am trying 2 merge 2 projects into one project.One project is using c language and the other one is using c++ code. both are working very fine independently.But now i need to merge both...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.