I'm looking at migrating a messaging client application to a class so that it can be used as a COM/ActiveX object. And I'm new to COM. So, I have two initial questions that I'm hoping the COM gurus can help me with.
1. The PB help files indicate that the DUAL interface is the only one which should be used if the methods will be used by a non-PB language. Is this still correct? I'm not sure which languages require a DISPATCH interface.
2. If DUAL is the way to go, is this the correct way to wrap the class?
Advice is always welcomed.
1. The PB help files indicate that the DUAL interface is the only one which should be used if the methods will be used by a non-PB language. Is this still correct? I'm not sure which languages require a DISPATCH interface.
2. If DUAL is the way to go, is this the correct way to wrap the class?
Code:
$ClassGUID = GUID$("{14EC6DEF-1BB8-416C-9171-471110ED27B8}") $IfaceGUID = GUID$("{DE0AFF33-D092-477A-92CB-32579362A0B4}") CLASS MyClass $ClassGUID AS COM INTERFACE MyInterface $IfaceGUID INHERIT DUAL METHOD MyMethod <1> (BYVAL x AS LONG) AS LONG METHOD = x + 1 END METHOD END INTERFACE END CLASS
Comment