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

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
  • Comment on Re^8: How to write a client for accessing COM server

Replies are listed 'Best First'.
Re^9: How to write a client for accessing COM server
by Anonymous Monk on Jun 16, 2011 at 11:56 UTC
    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