Next Previous Up Top Contents Index

4.12 The OLE-AUTOMATION module

out-ref

Function

Summary

out-ref type => ref

Arguments

type
An instance of <integer> or <type>.

Values

ref
An instance of <ole-arg-spec>.

Description

Use this in a client to construct an object that can be passed as an argument to call-simple-method and receive the value of a returned output parameter. The return value is an instance of <ole-arg-spec>.

The type of the value is specified as either one of the low-level VARIANTARG type codes (such as $VT-I4) or as a C-FFI type designator, or as a corresponding Dylan type. Use the accessor arg-spec-value to get the value after the call.

For example, if a server defines a method that has a by-reference output parameter with C type long, a Dylan client could receive the value like this:

  // first make a place to hold the output parameter
  let ref = out-ref(<C-long>);
  // then call the server method
  call-simple-method(disp-interface, disp-id, ref);
  // now pick up the received value
  let value = arg-spec-value(ref);

If the server is written in Dylan, it will simply receive an instance of <C-long*>, and should use pointer-value-setter to store the value.


OLE, COM, ActiveX and DBMS Reference - 31 MAR 2000

Next Previous Up Top Contents Index