Microsoft KB Archive/131048

= Properties with Optional Parameters Not Supported =

Article ID: 131048

Article Last Modified on 12/3/2003

-

APPLIES TO

 Microsoft OLE 2.03 Microsoft OLE 4.0, when used with:  Microsoft Windows NT 4.0

 Microsoft Windows 95 

-



This article was previously published under Q131048



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: kbprogramming KB131048

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.