The information in this article applies to:
Before an OLE 2.0 container application calls OleCreateFromFile() to create an embedded object from the contents of a named file, it must make sure that the filename it passes as the lpszFile parameter to OleCreateFromFile() is not a reserved MS-DOS device name, such as COM1 or LPT1. This check is necessary because OleCreateFromFile() does not perform such a check itself. A container application generally obtains the filename to pass to OleCreateFromFile() by presenting the user with the Insert Object dialog box. Many containers use the OLE2UI library implementation of the Insert Object dialog box, by calling OleUIInsertObject(). OleUIInsertObject() performs a check to make sure that the filename supplied by the user is not a reserved MS-DOS device name; if the user supplies a filename such as "COM1", OleUIInsertObject() brings up a modal dialog box stating "File COM1 Does Not Exist." Therefore, container applications that use OleUIInsertObject() do not have to perform a check for reserved names. Additional query words: 2.01
Keywords : kbole kbOLE200 kbGrpCom kbDSupport |
Last Reviewed: October 26, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |