Methods and properties exposed through Get
/Put
functions follow much the same pattern, at least from a syntax point of view. To declare a method you need to use the following notation:
<IMPLEMENTS TYPE=Automation ID=automation>
<METHOD name="methodName" internalname="functionName">
</METHOD>
</IMPLEMENTS>
Even in this case, name
denotes the public name of the method while internalname
—which is an optional attribute—indicates the name of the function that internally implements the method. A method called Speak
would be coded this way:
<IMPLEMENTS TYPE=Automation ID=automation>
<METHOD name="Speak" internalname="DoSpeak">
</METHOD>
</IMPLEMENTS>
It will be called Speak
externally but internally implemented in DoSpeak
. By omitting the internalname
attribute we assume that the internal function has the same name as the method. At this point there's no need to declare the prototype of the method.