.Net Remoting and System::Activate

G

Guest

I'm tying to build a simple Remoting thingie (techincal term). However, I
can't seam to get it to compile.

ChatBase is defined as a public class..

The line that kills compiling:
theChatStuff = (ChatBase *) ( Activator::GetObject ( __typeof ( ChatBase ) ,
"tcp://localhost:9999/Try1") );


Form1.cpp(41): error C2039: 'GetObjectA' : is not a member of
'System::Activator'
Form1.cpp(41): error C2660: 'GetObjectA' : function does not take 2 arguments

I'm not calling GetObjectA, I'm calling GetObject. I have a C# example that
does exactly what the same call (with changes to C++.net). Why does it come
up with me calling GetObjectA??? Nothing I've done seams to get rid of
this...

GE

PS> Someone here mentioned it may have to do with some hidden functions
somewhere, and the A may deal with ASCII. Not too sure what exactly he meant.
 
T

Tomas Restrepo \(MVP\)

Fireangel,
I'm tying to build a simple Remoting thingie (techincal term). However, I
can't seam to get it to compile.

ChatBase is defined as a public class..

The line that kills compiling:
theChatStuff = (ChatBase *) ( Activator::GetObject ( __typeof ( ChatBase ) ,
"tcp://localhost:9999/Try1") );


Form1.cpp(41): error C2039: 'GetObjectA' : is not a member of
'System::Activator'
Form1.cpp(41): error C2660: 'GetObjectA' : function does not take 2 arguments

I'm not calling GetObjectA, I'm calling GetObject. I have a C# example that
does exactly what the same call (with changes to C++.net). Why does it come
up with me calling GetObjectA??? Nothing I've done seams to get rid of
this...

GE

PS> Someone here mentioned it may have to do with some hidden functions
somewhere, and the A may deal with ASCII. Not too sure what exactly he
meant.

You're running into this:
http://www.winterdom.com/mcppfaq/archives/000128.html
 
G

Guest

I undefined GetObject, but now I have a WHOLE crap load of errors in placed
I have no control over. So I really can't undefine GetObject :(

I'm going too look for a way to not have to put #include <windows.h> in the
header, since that would seam to solve more problems...

GE
 
G

Guest

Or not. I commented some stuff out and compiled. Got errors. Put the
program back to the way it was (With the undef), and now it works!!

I hate it when that happens..

thanks for your help!!
 
Top