Project

General

Profile

$com » History » Revision 6

Revision 5 (Per Amundsen, 06/29/2016 07:19 PM) → Revision 6/7 (Per Amundsen, 12/14/2019 10:02 AM)

_Added in 1.9.4_ 

 *$com(name|N)* 

 Returns name if connection is open, or name of Nth connection. N = 0 returns number of open connections. 

 *Parameters* 

 name|N - The connection name or the Nth connection. 

 *Properties* 

 .progid - The object name. 
 .result - The value returned by the COM object member after the call 
 .error - The error code if any. 
 .errortext - The error text if any. 
 .argerr - *TODO* TODO 
 .dispatch - [[$true]] if this is a dispatch pointer. 
 .unknown - [[$true]] if this is a unknown pointer. 

 ----------------------------------------------------------------------------- 

 *$com(name, &bvar)* 

 Returns connection information for the connection and puts it into &bvar. 

 *Parameters* 

 name|- The connection name. 
 &bvar - The &bvar to write to. 

 *Properties* 

 .progid - The object name. 
 .result - The value returned by the COM object member after the call 
 .error - The error code if any. 
 .errortext - The error text if any. 
 .argerr - *TODO* TODO 
 .dispatch - [[$true]] if this is a dispatch pointer. 
 .unknown - [[$true]] if this is a unknown pointer. 

 ----------------------------------------------------------------------------- 

 *$com(name/N,varname)* 

 Returns value of the specified variable name. 

 *Parameters* 

 name/N - The connection name or the Nth connection. 
 varname - Name of the referenced variable. 

 ----------------------------------------------------------------------------- 

 *$com(name,member,method,type1,value1,...,typeN,valueN)* 

 This calls a member of an open COM connection with the specified method and parameters. 

 Returns: 1 = ok, 0 = fail. 

 *Parameters* 

 name - Connection name. 
 member - Member name. 
 method - Combination of the following values added together: 
 <pre> 
              1 = DISPATCH_METHOD 
              2 = DISPATCH_PROPERTYGET 
              4 = DISPATCH_PROPERTYPUT 
              8 = DISPATCH_PROPERTYPUTREF 
 </pre> 
 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. 
 <pre> 
              VB equivalents are: boolean, byte, currency, date, double, integer, long, single, string, variant. 
              To make a variable by reference, use * in the type name, eg. i1* 
              To assign a name to a variable for later reference after a call, append it to the type, eg. i1* varname 
              When using a variant you must also specify the variable type after it, eg. variant bool. 
 </pre> 
 value - The value assigned to the variable type.