This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mkshortcut debugging problem


On Thu, Feb 28, 2002 at 04:03:34PM -0800, Joshua Daniel Franklin wrote:
> The code that produces this error is:
> 
>       MultiByteToWideChar (CP_ACP, 0, lname, -1, widepath, MAX_PATH);
>       hres = pf->lpVtbl->Save (pf, widepath, TRUE);
>       if (!SUCCEEDED(hres)) 
>       {
>         fprintf(stderr, "%s: Save to persistant storage failed (Does the
> directo
> ry you are writing to exist?)\n", prog_name);
>         exit(3);
>       }

Try the following before calling pf->lpVtbl->Save():

   GetCurrentDirectory(dir);
   pf->lpVtbl->SetRelativePath(dir);

This is just basically as it should work.  Look in MSDN for the
exact usage.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]