Properties with Optional Parameters Not Supported

ID: Q131048


The information in this article applies to:
  • Microsoft OLE Libraries for Windows and Win32s, version 2.03
  • Microsoft OLE Libraries, used with:
    • Microsoft Windows NT 3.5
    • Microsoft Windows 95

Properties with optional parameters are currently not supported by the IDispatch::Invoke implementation provided by the OLE system (DispInvoke and CreateStdDispatch). For example, the following results in an error from MKTYPLIB.EXE:

[propput]
void MyProperty([in] BSTR bstrValue, [in, optional] VARIANT vIndex,);
[propget]
BSTR MyProperty([in, optional] VARIANT vIndex); 
Properties with non-optional parameters are allowed. For example, the following is acceptable:

[propput] void MyProperty([in] short nIndex, [in] BSTR bstrValue);
[propget] BSTR MyProperty([in] short nIndex); 

Additional query words: 2.0 2.00 3.50 4.00

Keywords : kbole kbprg kbNTOS350 kbWinOS95 kbGrpCom kbDSupport
Version : WINDOWS:2.03,95; :
Platform : WINDOWS
Issue type :


Last Reviewed: October 26, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.