DOC: defaultvalue Attribute Doesn't Work for MFC dispinterface Server and VB Client (216334)
The information in this article applies to:
- Microsoft Visual Studio, Enterprise Edition 6.0
- Microsoft Visual Studio 6.0 SP1
- Microsoft Visual Studio 6.0 SP2
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q216334 SUMMARY
The defaultvalue attribute is only supported for named parameters or VARIANT parameters in MFC automation server.
The MFC documentation does not clearly state that the defaultvalue attribute is not supported for parameters of VARTYPE when using dispinterface (or the default implementation of MFC automation server).
Actually, the typelibrary generated by MFC always contains the optional attribute together with the defaultvalue attribute, while the optional attribute is suppose to work only with VARIANT, but defaultvalue can also be present without the optional attribute, and defaultvalue should work for any VARTYPE. This article clarifies this situation.
REFERENCES
For additional information about a method to replace the default implementation of any MFC automation server, please see the following
article in the Microsoft Knowledge Base:
140616 SAMPLE: MFCDISP: Replacing MFC IDispatch Implementation
Modification Type: | Minor | Last Reviewed: | 8/15/2005 |
---|
Keywords: | kbdocfix kbVS600SP1fix kbVS600sp2fix KB216334 kbAudDeveloper |
---|
|