Microsoft KB Archive/109553

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 16:06, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


Insert Link from File Changes Current Directory

Article ID: 109553

Article Last Modified on 3/3/2005



APPLIES TO

  • Microsoft OLE 2.01



This article was previously published under Q109553

SUMMARY

The Open common dialog box changes the current working directory unless OFN_NOCHANGEDIR is specified. The UI Change Source dialog box depends on the change directory functionality, therefore, the Insert Object dialog box cannot be modified to change this behavior.

MORE INFORMATION

The Insert Object dialog box allows a user to insert a linked object into the container document from a file residing on disk. This action changes the current working directory to the drive and directory in which the file resides. If this file is located on a network drive and the network drive becomes unavailable after the link is established, any subsequent attempt to insert an embedded object will fail until the working directory is changed to a drive and directory that is accessible.

The problem materializes when the OLE 2.0 libraries attempt to WinExec a server application for a subsequent embedded object. In this situation, the call to WinExec fails because the current working directory is invalid.


Additional query words: 2.01 OpenFile

Keywords: kbprogramming KB109553