$comcall » History » Version 6
Per Amundsen, 02/23/2023 08:04 PM
| 1 | 2 | Per Amundsen | _Added in 1.9.4_ |
|---|---|---|---|
| 2 | |||
| 3 | 1 | Per Amundsen | *$comcall(name,alias,member,method,type1,value1,...,typeN,valueN)* |
| 4 | |||
| 5 | This calls a member of an open COM connection with the specified method and parameters. |
||
| 6 | |||
| 7 | Uses the same format as [[$com]]() apart from the alias. It is multi-threaded so it will not halt the script and will call the specified alias once the call returns. |
||
| 8 | |||
| 9 | Returns: 1 = ok, 0 = fail. |
||
| 10 | |||
| 11 | *Parameters* |
||
| 12 | |||
| 13 | 6 | Per Amundsen | table(ktable). |
| 14 | |*Parameter*|*Description*| |
||
| 15 | | name | Connection name. | |
||
| 16 | | alias | Alias to call when the call is finished. | |
||
| 17 | | member | Member name. | |
||
| 18 | | method | Combination of the method values added together (see below). | |
||
| 19 | | type | The variable type (see below), | |
||
| 20 | | value | The value assigned to the variable type. | |
||
| 21 | |||
| 22 | *Methods* |
||
| 23 | |||
| 24 | table(ktable). |
||
| 25 | |*Method*|*Description*| |
||
| 26 | | 1 | DISPATCH_METHOD | |
||
| 27 | | 2 | DISPATCH_PROPERTYGET | |
||
| 28 | | 4 | DISPATCH_PROPERTYPUT | |
||
| 29 | | 8 | DISPATCH_PROPERTYPUTREF | |
||
| 30 | |||
| 31 | *Types* |
||
| 32 | |||
| 33 | Can be: i1, i2, i4, ui1, ui2, ui4, int, uint, r4, r8, cy, date, decimal, bool, bstr, variant, dispatch, unknown, error. |
||
| 34 | VB equivalents are: boolean, byte, currency, date, double, integer, long, single, string, variant. |
||
| 35 | To make a variable by reference, use * in the type name, eg. i1* |
||
| 36 | To assign a name to a variable for later reference after a call, append it to the type, eg. i1* varname |
||
| 37 | When using a variant you must also specify the variable type after it, eg. variant bool. |