;; COM Interface /* Objective(s) - - This code demonstrates the "COM Interface" capability that has been introduced to call a function available in external DLL/EXE - With this code, any generic DLL can be used for e.g., like the Microsoft Speech API to read out the given text which could be used. Syntax - - [COM Interface: ] Project : Class : Interface : Parameter : : [ : ] Returns : where Project accepts the name of the DLL Project or Namespace Class accepts the name of the Class within the DLL Project specified above Interface accepts the name of the Function within the Class specified under the Class attribute Parameter is a list type attribute where it accepts multiple parameters as required by the corresponding DLL Function and it accepts 3 parameter, viz., Parameter Name, Data Type of the Parameter and the Nature of Parameter which can be In if the Parameter is only an Input to the DLL Function, Out if the Parameter is only an Output Parameter and InOut if the Parmaeter acts both as an Input as well as Output. - Exec COM Interface: [: [: [:] ]] where COM Interface Name is the Name of the COM Interface defined as per the Syntax above. Parameter 1, 2, .... N are the optional Parameters accepted by the DLL Function being called and they must correspond to the Parameters declared, i.e., they must be in the same order declared in the COM Interface definition. The Parameters can accept an expression provided it is not an Out or InOut Parameter. If the Parameter is an Out or InOut Parameter, the variable name must only be specified i.e, without prefixing a ##. Dependencies - - There are no dependencies as such as Speech API is already available with Windows, by default. */ [#Menu : Gateway of Tally] Add: Item : "COM Interface" : Alter : TSPL COM Interface Speak the Text [Report: TSPL COM Interface Speak the Text] Form : TSPL COM Interface Speak the Text Title : "Speak the Text" [Form: TSPL COM Interface Speak the Text] Part : TSPL COM Interface Speak the Text Width : 30% Page On : Form Accept : Yes : Exec COM Interface : TSPL Smp Voice Interface : #TSPLCOMInterfaceSpeaktheText ;; Action Exec COM Interface is used to invoke the COM Interface 'TSPL Smp Voice Interface' with the required parameters [Part: TSPL COM Interface Speak the Text] Lines : Form SubTitle, TSPL COM Interface Speak the Text Local : Field : Form SubTitle : Info : "Speak the Text" [Line: TSPL COM Interface Speak the Text] Fields : TSPL COM Interface Speak the Text [Field: TSPL COM Interface Speak the Text] Use : Name Field Set as : "Tally supports COM DLLs" Case : Normal Width : 100% Page Max : 500 ;; COM Interface definition [COM Interface: TSPL Smp Voice Interface] Project : Sapi ;; Generic DLL provided by Microsoft 'Speak API' Class : SpVoice ;; Class within the above DLL Interface : Speak ;; Interface Speak to be invoked from the above Class Parameter : P1 : String ;; The above Interface accepts a parameter of Type String ;; End-of-File