$com » History » Version 6
Per Amundsen, 12/14/2019 10:02 AM
1 | 1 | Per Amundsen | _Added in 1.9.4_ |
---|---|---|---|
2 | |||
3 | 4 | Per Amundsen | *$com(name|N)* |
4 | 1 | Per Amundsen | |
5 | Returns name if connection is open, or name of Nth connection. N = 0 returns number of open connections. |
||
6 | |||
7 | *Parameters* |
||
8 | |||
9 | 4 | Per Amundsen | name|N - The connection name or the Nth connection. |
10 | 1 | Per Amundsen | |
11 | *Properties* |
||
12 | |||
13 | .progid - The object name. |
||
14 | .result - The value returned by the COM object member after the call |
||
15 | .error - The error code if any. |
||
16 | .errortext - The error text if any. |
||
17 | 6 | Per Amundsen | .argerr - *TODO* |
18 | 1 | Per Amundsen | .dispatch - [[$true]] if this is a dispatch pointer. |
19 | .unknown - [[$true]] if this is a unknown pointer. |
||
20 | |||
21 | 5 | Per Amundsen | ----------------------------------------------------------------------------- |
22 | |||
23 | *$com(name, &bvar)* |
||
24 | |||
25 | Returns connection information for the connection and puts it into &bvar. |
||
26 | |||
27 | *Parameters* |
||
28 | |||
29 | name|- The connection name. |
||
30 | &bvar - The &bvar to write to. |
||
31 | |||
32 | *Properties* |
||
33 | |||
34 | .progid - The object name. |
||
35 | .result - The value returned by the COM object member after the call |
||
36 | .error - The error code if any. |
||
37 | .errortext - The error text if any. |
||
38 | 6 | Per Amundsen | .argerr - *TODO* |
39 | 5 | Per Amundsen | .dispatch - [[$true]] if this is a dispatch pointer. |
40 | .unknown - [[$true]] if this is a unknown pointer. |
||
41 | |||
42 | ----------------------------------------------------------------------------- |
||
43 | |||
44 | 1 | Per Amundsen | *$com(name/N,varname)* |
45 | |||
46 | Returns value of the specified variable name. |
||
47 | |||
48 | *Parameters* |
||
49 | |||
50 | 3 | Per Amundsen | name/N - The connection name or the Nth connection. |
51 | 1 | Per Amundsen | varname - Name of the referenced variable. |
52 | 5 | Per Amundsen | |
53 | ----------------------------------------------------------------------------- |
||
54 | 1 | Per Amundsen | |
55 | *$com(name,member,method,type1,value1,...,typeN,valueN)* |
||
56 | |||
57 | This calls a member of an open COM connection with the specified method and parameters. |
||
58 | |||
59 | Returns: 1 = ok, 0 = fail. |
||
60 | |||
61 | *Parameters* |
||
62 | |||
63 | name - Connection name. |
||
64 | member - Member name. |
||
65 | method - Combination of the following values added together: |
||
66 | 2 | Per Amundsen | <pre> |
67 | 1 | Per Amundsen | 1 = DISPATCH_METHOD |
68 | 2 = DISPATCH_PROPERTYGET |
||
69 | 4 = DISPATCH_PROPERTYPUT |
||
70 | 8 = DISPATCH_PROPERTYPUTREF |
||
71 | 2 | Per Amundsen | </pre> |
72 | 1 | Per Amundsen | type - The variable type, can be: i1, i2, i4, ui1, ui2, ui4, int, uint, r4, r8, cy, date, decimal, bool, bstr, variant, dispatch, unknown, error. |
73 | 2 | Per Amundsen | <pre> |
74 | 1 | Per Amundsen | VB equivalents are: boolean, byte, currency, date, double, integer, long, single, string, variant. |
75 | To make a variable by reference, use * in the type name, eg. i1* |
||
76 | To assign a name to a variable for later reference after a call, append it to the type, eg. i1* varname |
||
77 | When using a variant you must also specify the variable type after it, eg. variant bool. |
||
78 | 2 | Per Amundsen | </pre> |
79 | 1 | Per Amundsen | value - The value assigned to the variable type. |