Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Help:Getting Error While Registering Obj with Remoting Services

Help:Getting Error While Registering Obj with Remoting Services

Scheduled Pinned Locked Moved Managed C++/CLI
help
1 Posts 1 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Harvail
    wrote on last edited by
    #1

    I have a dll where i write // RMLib1.h #pragma once #using #using using namespace System; using namespace System::Runtime::Remoting; using namespace System::Runtime::Remoting::Channels; using namespace System::Runtime::Remoting::Channels::Tcp; namespace RMLib1 { public __gc class HelloObj:public MarshalByRefObject { public: HelloObj(); String* Greet(String* name); private: int numGreet; }; } #include "stdafx.h" this is implementation of these methods #include "RMLib1.h" using namespace RMLib1; HelloObj::HelloObj() { Console::WriteLine("HelloObj Activated "); } String* HelloObj::Greet(String* name) { numGreet++; String* greeting =S"Hello" ; return greeting; } Inother project i try register this objas remote services using namespace System; #using using namespace System::Runtime::Remoting; using namespace System::Runtime::Remoting::Channels; using namespace System::Runtime::Remoting::Channels::Tcp; #using using namespace RMLib1; // This is the entry point for this application int _tmain(void) { Console::WriteLine(S"Hello World"); TcpChannel* chan = new TcpChannel(8085); ChannelServices::RegisterChannel(chan); Console::WriteLine(S"Registering Hello Obj As SingleTon "); RemotingConfiguration::RegisterWellKnownServiceType(Type::GetType("HelloObj"),"HelloObj",WellKnownObjectMode::Singleton); Console::WriteLine(S"Waiting For Remote Calls"); Console::WriteLine(S"Hit Enter To Exit "); Console::ReadLine(); return 0; } I can compile this code but when try to excecute it gives me error System.ArgumentNullException:Value Can not be Be NULL Parameter Name:Type This line is giving Problem Any Idea............. RemotingConfiguration::RegisterWellKnownServiceType(Type::GetType("HelloObj"),"HelloObj",WellKnownObjectMode::Singleton);

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups