Here is the VB code:

Private Sub CalcButton_Click()
        Dim hours As Long
        Dim miles As Single

        Dim server As Object
        
        Set server = CreateObject("PCMServer.PCMServer")
        
        MsgBox "server product name" + server.ProductName

        MsgBox "origin: " + origin + "dest: " + dest
        
        miles = server.CalcDistance(origin, dest) / 10#
        
        ResultField.Text = CStr(miles) & " miles"
End Sub


-----Original Message-----
From: Jan Dubois [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 15, 2000 9:56 PM
To: Charlie Fineman
Cc: Perl-Win32-Users Mailing List
Subject: Re: Win32::OLE->new silently killing perl process


On Mon, 15 May 2000 21:19:14 -0700, Charlie Fineman <[EMAIL PROTECTED]>
wrote:

>Thanks. I had already tried the following:
>
>       - OLE::Warn is set to 3
>       - ran with -w
>
>I tried the Initialize(OLEINITIALIZE) as you suggested but it didn't change
>the behavior. Given your explanation in the notes I didn't expect it to
(you
>suggested that the program would hang, in this case it just exits without
>nary a word).
>
>FWIW this class object does use IDispatch (I assume that's required).

Yes, Win32::OLE uses *only* the IDispatch interface.

I have no idea what is going on here.  Can you show the VB code that is
working (just the object instantiation part).  Please make sure that you
are using late binding (variables declared as OBJECT and not as the
correct type).  Otherwise you wouldn't be using the IDispatch interface
but the VTBL (early binding) one.

-Jan

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to