Thankyou for your response, Christian.
I find out that pDirectoryServiceProvider->GetFile(...) returns a
false status. Does anyone know when I went wrong?
That should work. What do you mean with "false status"? Remember that a
return value of 0 is NS_OK and indicates success.
rv = pDirectoryServiceProvider->GetFile(NS_OS_CURRENT_WORKING_DIR,
&persistent, getter_AddRefs(pFile));
and NS_FAILED(rv) returns TRUE.
I also thought it should have worked, but it didn't.
The same call, but for a different symbolic name:
rv = pDirectoryServiceProvider->GetFile(NS_OS_DRIVE_DIR, &persistent,
getter_AddRefs(pFile));
works fine. This looks weird for me. But never mind coz....
Btw, how in general can I get the nsIFile of a file given it full path
in Windows, for example: "c:\myfolder\myfile.dll"
In C++? NS_NewLocalFile (or NS_NewNativeLocalFile)
THIS WORKS!!!
Regards
Vonuyx
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom