in reply to Re^5: How to write a client for accessing COM server
in thread How to write a client for accessing COM server

Hi i have written a client using VB and im able to access the COM server .But im getting error while im acccessing using Perl script
  • Comment on Re^6: How to write a client for accessing COM server

Replies are listed 'Best First'.
Re^7: How to write a client for accessing COM server
by Anonymous Monk on Jun 16, 2011 at 09:13 UTC
    Can you show the VB code?
      Sub Main()
      Dim objTestATL As TF_ExLib.Test_Ex
      objTestATL = New TF_ExLib.Test_Ex
      Dim num As Long
      objTestATL.TestObj(20, num)
      End Sub
        use Win32::OLE;
        use warnings;
        package main;
        sub test()
        {
        my $TM = Win32::OLE->new('TestServ_Perl.PerlServ.1')|| die;
        print $TM;
        print "\n";
        if( Win32::OLE->LastError() )
        { print "Error creating the .NET COM Server: ". Win32::OLE->LastError();
        }
        $test = 0;
        $test = $TM ->TestObj(34);
        print "The value returned from server is ------";
        print $test;
        } test();
        Im able to access the COM server using perl script
        Thanks for all your help