Forms 5.x/6.x OLE Problem "FRM-40922 error 0x80020005" (ESRI MapObjects)
Date: Mon, 10 May 1999 15:11:36 +0200
Message-ID: <3736db06.0_at_news.via.at>
hi,
[Quoted] i have difficulties in integrating an OCX-control (MapObjects from ESRI) in forms applications. Whenever i try to use Set_Ole(interface,memberid,value,vt_type) and the parameter <value> is of type OLEOBJ, i get following error message "FRM-40922: OLE-Error occured: 0x80020005"
Example of an on-dispatch-event trigger attached to this control
>DECLARE
> eventname VARCHAR2(32767) := :system.custom_item_event;
> rect oleobj; --or ole2.obj_type;
> map ole2.obj_type;
> a ole2.list_type;
>BEGIN
> IF eventname = 'EVENT4294966691' THEN
> -- Code for MouseDown
> -- Zoom into Map
> map:=get_interface_pointer('CTRL.MAPX');
> a:=ole2.create_arglist;
> rect:=ole2.invoke_obj(map,'TrackRectangle',a);
> ole2.destroy_arglist(a);
> --
> -- up to here everything is fine and variable rect contains good values
> -- next line produces the error
> --
> Set_Ole(map, 5, rect, vt_userdefined); -- Extent property/method
> --
> synchronize;
> ELSIF
... other events
> ELSE
> message('Unknown Event: ' || eventname);
> END IF;
>END;
[Quoted] The OLE-Importer generated following code
>...SUBTYPE z_Rectangle IS OleObj;
>...SUBTYPE Rectangle IS OleObj;
>PROCEDURE Extent(interface OleObj, newvalue MapObjects_CONSTANTS.Rectangle)
IS
>BEGIN
> Set_Ole(interface, 5, newvalue, VT_USERDEFINED);
>END;
Has anybody more information on OLE-programming within Forms or some
sample-code? And what is the difference between the OLE2 package and the
built-ins set_ole, get_ole, call_ole etc.?
Any help will be greatly appreciated,
TIA
joe
ps. I also tried
>Init_Oleargs(1);
>Add_Oleargs(rect);
>Call_Ole(map,5);
but this doesn't work too
Received on Mon May 10 1999 - 15:11:36 CEST