Results 1 to 2 of 2

Thread: Instantiating a DCOM object

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    23

    Instantiating a DCOM object

    Hi

    I am trying to use DCOM in vb6 so that I can remotely control the application.
    I am having a hard time to instantiate the object that i created and is giving me an error : Object variable or a with block variable not set.
    Here is the code

    Dim loPublicRemote As ClsPublicRemote [ object created ]

    Set loPublicRemote = CreateObject("ProjectName.ClsPublicRemote", fsAnswerStationName) [this is where the error is comming from]
    sAnswerStationName is the remote computer name

    CLASS: ClsPublicRemote is :
    Public Property Get SingletonRemoteControl() As clsRemoteControl
    Set SingletonRemoteControl = goRemoteControl
    End Property

    ClsRemotControl is a class which has all the buttons of the remote application.

    I have tried to run a sample application that use Dcom and it works fine so I think the setting i did for dcomconfig are OK.

    Can someone please help me with this

  2. #2
    Member appdalesolution's Avatar
    Join Date
    Nov 2004
    Location
    London
    Posts
    37

    Re: Instantiating a DCOM object

    i would suggest its this line thats causing the error

    Code:
     Set SingletonRemoteControl = goRemoteControl
    Dont know where goRemoteControl comes froms but its probably not a created object yet.
    Lee Dale
    http://www.appdalesolutions.co.uk
    Web Design, Database/Software Developement, Hardware Upgrades, Network design/maintenance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width