4.4 Getting the Value of a Property

This example shows a sequence of messages between an automation client and a server to get the value of a property.

  1. The client calls the GetIDsOfNames method on the server for a property named test. The server returns the DISPID (see section 2.2.32) of the property in the pointer passed by the client.

  2. The client calls the Invoke method on the server by using the DISPID returned from the server. Other parameters can be filled as shown in the following diagram. The property value is returned by the server in pVarResult. If an exception occurs during execution, or if there is an error in the arguments passed to Invoke, it is indicated in pExcepInfo or in pArgErr, accordingly (see section

Getting the value of a property

Figure 6: Getting the value of a property

Note For brevity, the Invoke method's dispid, riid, and lcid parameters are not shown.