Re: OCX and Forms 5.0

From: <uri.witman_at_gmail.com>
Date: Mon, 22 Apr 2013 07:17:20 -0700 (PDT)
Message-ID: <40f75a84-1654-4fdb-a65d-7f4102f533d6_at_googlegroups.com>


On Friday, September 4, 1998 10:00:00 AM UTC+3, Scott Donaldson wrote:
> I am trying to implement the MS Winsock 5.0 OCX in Forms 5.0 and am having trouble getting the argument of an event that is needed as an argument to another method for the OCX. Namely, the ConnectionRequest is fired and the RequestID is the input argument. I then need to take this RequestID and pass it as the argument of the Accept method. My question is how do I retrieve this RequestID parameter in Forms? I am a VB programmer and in VB the parameter is passed into the event. How do I get this parameter in the ON-DISPATCH-EVENT trigger. I know the Event number from the OLE Importer. Here is the code from the Program Unit Package Body that was created from the OLE Importer:PROCEDURE /* ConnectionRequest */ EVENT2(interface OleObj, requestID IN OUT NUMBER) ISBEGINNULL;END;Here is the code from my on-dispatch-event for the OCX:DECLARE eventname VARCHAR2(32767) := :system.custom_item_event; bytesTotal NUMBER;data VARCHAR2(32767);maxLen NUMBER; requestID NUMBER;BEGINIF eventname = 'EVENT0' THEN /*DataArrival*/ bytesTotal := MSWinsock_IMSWinsockControl.BytesReceived(:item('PB.ACTIVEX_WINSOCK').interf ace);MSWinsock_IMSWinsockControl.GetData(:item('PB.ACTIVEX_WINSOCK').interface, TO_VARIANT(data), TO_VARIANT(VT_BSTR), TO_VARIANT(maxLen));:PB.ASYNC_MSGS := :PB.ASYNC_MSGS||'data:'||data;:PB.ASYNC_MSGS := data;synchronize;MSWinsock_IMSWinsockControl.ole_Close(:item('PB.ACTIVEX_WINSOCK').interface) ;MSWinsock_IMSWinsockControl.Listen(:item('PB.ACTIVEX_WINSOCK').interface); synchronize;ELSIF eventname = 'EVENT1' THEN /*Connect*/NULL; ELSIF eventname = 'EVENT2' THEN /*ConnectionRequest*/IF MSWinsock_IMSWinsockControl.State(:item('PB.ACTIVEX_WINSOCK').interface) != MSWinsockLib_CONSTANTS.sckClosed THENMSWinsock_IMSWinsockControl.ole_Close(:item('PB.ACTIVEX_WINSOCK').interface) ;END IF;MSWinsock_IMSWinsockControl.ole_Accept(:item('PB.ACTIVEX_WINSOCK').interface , requestID);END IF;END;

Hi,
Still involved in that stuff?
Uri Received on Mon Apr 22 2013 - 16:17:20 CEST

Original text of this message