Receiving events from a COM control

Posted by ibs_webspeed on 03-Nov-2009 10:56

Hi All

I have to interface to a COM object (.NET dll which has been made to be COM interoperable).

The com object has events but to use them i need to register an event handler but this bit does not seem to work,

  chEventHandler = chHandle:RegisterEventHandler(chEventHandler).
  chEventHandler:enable-events("NetConnectEvents").

Is this the right way to do this.

Attached is the example program and the DLL / type library.

Thanks

Christian.

[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/netconnect_5F00_example.w:550:0]

[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/netconnectEssentials.dll:550:0]

[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/netconnectEssentials.tlb:550:0]

All Replies

Posted by Admin on 04-Nov-2009 13:56

What is your version of Progress? On 10.2A you should be able to use the .NET Assembly directly without the extra COM-Interop layer.

Posted by ibs_webspeed on 05-Nov-2009 02:28

Unfortunately we cannot go to 10.2a for this site at the moment.

Unless a  10.2a client can run 10.1c compiled code?

Thanks

Christian.

Posted by Admin on 05-Nov-2009 02:39

Even if 10.2A can use 10.1C R-Code you won't be able to compile code that accesses .NET objects and subscribes to .NET events on 10.1C.

This thread is closed