YANQ (Yet another newbie Question)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Fireangel (Fireangel_at_discussions.microsoft.com)
Date: 10/14/04


Date: Thu, 14 Oct 2004 06:05:03 -0700


First off. Is there ANY C++.net examples out there?? In my google
experiance, I've hit alot of C# and some VB.net, but I'm doing C++.net. I've
tried to convert, but something always ends up broke and I don't know how to
fix it (Yet).

This is from a conversion of a simple chat example from C#. I've got a DLL
project with just the chat base in it (Namespace ServerBase, __gc class
ChatBase : Public System::MarshalByRefObject). I've got a Client project
with just a form in it (Namespace RemoteClient, __gc class Form1). I've also
got a Server project with nothing but an int APIENTRY_tWinMain (ect).

I can start up an object, and then connect to it remotely. But the problem
i'm having is that the client can't find assembly RemoteClient (Which is the
namespace and project name that its currently running inside). This occures
when the client tries add an event to a public delegate on the server.
I've look a few pages back in here, and somebody mentioned that the DLL
Project needs to have the Client class in it (An interface would work). Is
this the case?? I ask because even the C# example don't do this (atleast
none that I've found). If I take out the Delegate stuff, it works (but not
the way I want, hence the delegates).

I'm not using config files for this (probably my first mistake, but I'd
rather do everything programatticaly).

I've declare both sides to have a TypeFildterLevel::Full (Solved older bug).

If you want some specific code, i'm sure I can put some up here. It may
help, it may not.

Thanks you for any help

GE



Relevant Pages

  • Re: Delegates, Client-side Events and Remoting
    ... server without requring server to know about the concrete class of client ... Asynchronous delegate are best in that scenario; ... For client to server communication, however -- it is just a forward method ... To abstract in a "layer of delegation between the proxy class instance on ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: delegate question
    ... information of the method that the delegate is attached to. ... the server, and never get to you (a copy of your client will be sent to the ... event is remoted back to the client, ... the> client-runtime throws serialization exceptions of classes that are not> relevant for my client. ...
    (microsoft.public.dotnet.framework.remoting)
  • Threading problem
    ... If it is set up as a client, it will send some data when it wants to. ... If it is set up as a server, it will respond to messages sent from the Windows PC. ... The reason why the connections are not kept open is due to the device's ability of multithreading, i.e. it can only handle one connection at a time. ... I think this happens because the remoteClient are working (a message has been received, i.e. the remoteClient has been created, but not closed yet. ...
    (microsoft.public.dotnet.general)
  • Re: "Insufficient state to deserialize the object" error
    ... code snippet I sent is called "Inexus.dll" (namespace INexusStuff). ... on the Client side. ... Back on the Server side there is another module with the ... The code containing the Server side delegate, ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: YANQ (Yet another newbie Question)
    ... Create client access to a remote server by using Visual C++ .NET ... > when the client tries add an event to a public delegate on the server. ...
    (microsoft.public.dotnet.framework.remoting)