R
Russ
Hello. I have a very large business application written all in VC++
and MFC. Now I want to interface some of it to the web. I have
VS.NET2003 and have been studing walkthroughs and documentation and
trying some things. I wanted to build an XML web service that would
interface to my existing data and classes. But most of the examples
are for C#, which I do not know, and which can not understand the C++
header files needed to interface to my existing libraries.
But I did find the walkthrough called "Creating an XML Web Service
Using Managed Extensions for C++", and built it. It worked fine and I
made a couple of mods to test returning strings, etc. Finally, I
figured, now all I have to do is add my C++ header files and link with
the C++ DLL's for my system.
WRONG! The dang application can not even recognize such basic types
as WORD and UINT, never mind CString, CPtrList, etc etc etc. When I
try to include the necessary windows headers to make it recognize
those things it no longer will compile or link, and if I add what it
takes to make it link, then it won't run. (This is without calling a
single function in my old DLL.)
So I decided I had to start from scratch and rewrite everything doing
it the .NET way. I started by creating a single class and putting two
variables in it, a bool and a CString. No problem with the bool, but
it chokes on the CString. After some study, I tried including
cstringt.h. No good, the compiler does not even recognize CString as
a valid type. Next I tried including atlstr.h. It now says "warning
C4935: assembly access specifier modified from 'public'", and "error
C2872: 'IServiceProvider' : ambiguous symbol".
Next I studied some more and discovered the String class for managed
C++. AHA says I, that is what I need.
NOPE! Now it says "cannot declare a managed 'm_Fname' in an unmanaged
'CTestClass'".
If I can't even get a simple string class to work, how the heck am I
going to get collection classes and all my polymorphic classes etc, to
work!!!
It looks like .NET is only good if you are writing everything over
again from scratch. That is a hell of a huge learning curve and a
huge project even if I knew how. I thought .NET was supposed to make
it possible for all platforms and all operating systems to communicate
- easily. What am I missing, PLEASE!
Russ
PS: If you think it sounds like I am frustrated, you are right.
and MFC. Now I want to interface some of it to the web. I have
VS.NET2003 and have been studing walkthroughs and documentation and
trying some things. I wanted to build an XML web service that would
interface to my existing data and classes. But most of the examples
are for C#, which I do not know, and which can not understand the C++
header files needed to interface to my existing libraries.
But I did find the walkthrough called "Creating an XML Web Service
Using Managed Extensions for C++", and built it. It worked fine and I
made a couple of mods to test returning strings, etc. Finally, I
figured, now all I have to do is add my C++ header files and link with
the C++ DLL's for my system.
WRONG! The dang application can not even recognize such basic types
as WORD and UINT, never mind CString, CPtrList, etc etc etc. When I
try to include the necessary windows headers to make it recognize
those things it no longer will compile or link, and if I add what it
takes to make it link, then it won't run. (This is without calling a
single function in my old DLL.)
So I decided I had to start from scratch and rewrite everything doing
it the .NET way. I started by creating a single class and putting two
variables in it, a bool and a CString. No problem with the bool, but
it chokes on the CString. After some study, I tried including
cstringt.h. No good, the compiler does not even recognize CString as
a valid type. Next I tried including atlstr.h. It now says "warning
C4935: assembly access specifier modified from 'public'", and "error
C2872: 'IServiceProvider' : ambiguous symbol".
Next I studied some more and discovered the String class for managed
C++. AHA says I, that is what I need.
NOPE! Now it says "cannot declare a managed 'm_Fname' in an unmanaged
'CTestClass'".
If I can't even get a simple string class to work, how the heck am I
going to get collection classes and all my polymorphic classes etc, to
work!!!
It looks like .NET is only good if you are writing everything over
again from scratch. That is a hell of a huge learning curve and a
huge project even if I knew how. I thought .NET was supposed to make
it possible for all platforms and all operating systems to communicate
- easily. What am I missing, PLEASE!
Russ
PS: If you think it sounds like I am frustrated, you are right.