views:

186

answers:

0

I'm using GetOpenFileName; my lpstrInitialDir is set to a UNC path (network share), and that share requires login. I haven't found a way to either be prompted for credentials, or have my domain credentials used. If use Windows Explorer to go to that network share, then I run my app, the GetOpenFileName works with that network share as the initial directory.

UPDATE: I found some references to using the SetCurrentDirectory API call prior to invoking GetOpenFileName, so I gave that a try. It fails with system error code 0x0000005 (Access Denied).

related questions