M
Michael Howes
I have some old C code that uses MFC and some C Run Time Library.
I need to be able to call this from C#
I thought i'd be able to create a Managed C++ DLL, tell the project it was
using MFC, include the .c file and be on my way.
Can I use MFC in a Managed C++ DLL?
If I build a Visual C++ Class Library (.Net) and tell it to use MFC in a
Shared DLL I immediately get the following warning
nochkclr.obj : warning LNK4099: PDB 'libc.pdb' was not found with
'C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\nochkclr.obj' or
at 'C:\BlueIguana\SymbolPDTSolution\Debug\libc.pdb'; linking object as if no
debug info
This is before I've typed any code.
linking with old run time library things because of the use of things like
strupr in the C code?
I was hoping I'd build a simple C++ class (2 methods), that would call into
this C code and that these methods would be available to my C# code
here is what I need to do
I have three files.....a LARGE .C file and a good sized .CPP/.h file. I
don't have time to port these 1000s of lines of code.
These files are actually being called from an C++/MFC application (which I
can build and run) but I don't need ANY of the UI that is calling this C
code
It's sort of strange how this project is set up, but in this MFC app, there
is a CPP file with two lines in it, and include of stdafx.h and a include of
the above mentioned .C file.
I need to call this C code form C#. The C code uses both MFC and run time
library calls.
Can I do this with a Managed C++ DLL?
thanks
mike
I need to be able to call this from C#
I thought i'd be able to create a Managed C++ DLL, tell the project it was
using MFC, include the .c file and be on my way.
Can I use MFC in a Managed C++ DLL?
If I build a Visual C++ Class Library (.Net) and tell it to use MFC in a
Shared DLL I immediately get the following warning
nochkclr.obj : warning LNK4099: PDB 'libc.pdb' was not found with
'C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\nochkclr.obj' or
at 'C:\BlueIguana\SymbolPDTSolution\Debug\libc.pdb'; linking object as if no
debug info
This is before I've typed any code.
linking with old run time library things because of the use of things like
strupr in the C code?
I was hoping I'd build a simple C++ class (2 methods), that would call into
this C code and that these methods would be available to my C# code
here is what I need to do
I have three files.....a LARGE .C file and a good sized .CPP/.h file. I
don't have time to port these 1000s of lines of code.
These files are actually being called from an C++/MFC application (which I
can build and run) but I don't need ANY of the UI that is calling this C
code
It's sort of strange how this project is set up, but in this MFC app, there
is a CPP file with two lines in it, and include of stdafx.h and a include of
the above mentioned .C file.
I need to call this C code form C#. The C code uses both MFC and run time
library calls.
Can I do this with a Managed C++ DLL?
thanks
mike