Hi,
this is a first rough cut version of a shell namespace extension to access the unix filesystem from wine. It's primary use-case is for winecfg's drive-mapping propery sheet. It already works for this purpose.
It would be cool if 'the COM guys' could take a look at the code, since this is the first time I did something COM'ish. It would be nice if possible miss-conceptions could be found early on.
Ciao,
On Sun, 20 Feb 2005 23:14:44 +0100, Michael Jung wrote:
this is a first rough cut version of a shell namespace extension to access the unix filesystem from wine. It's primary use-case is for winecfg's drive-mapping propery sheet. It already works for this purpose.
Cool!
Here are some comments:
- I do not understand why a UnixFSPIDLToPath function is needed, doesn't Win32 already provide a generic form of this function? If we are going to introduce new APIs then the whole excercise becomes meaningless as we may as well just have a wine_browse_for_unix_path() function and skip the whole COM/shell extension business.
- You don't need to check This, if it's NULL the code should crash not fail with an error code.
- Normally we'd use S_OK instead of NOERROR as an HRESULT return
Other than those minor nitpicks it all looks A-OK to me. Please do go ahead and submit it!
thanks -mike
On Wednesday 23 February 2005 12:38, Mike Hearn wrote:
- I do not understand why a UnixFSPIDLToPath function is needed, doesn't Win32 already provide a generic form of this function? If we are going to introduce new APIs then the whole excercise becomes meaningless as we may as well just have a wine_browse_for_unix_path() function and skip the whole COM/shell extension business.
I agree, but I couldn't figure out how it is supposed to be done. I'll have to dig deeper on this one. Comments, anyone?
- You don't need to check This, if it's NULL the code should crash not fail with an error code.
OK.
- Normally we'd use S_OK instead of NOERROR as an HRESULT return
MSDN says it's NOERROR, but since both S_OK and NOERROR are defined _HRESULT_TYPEDEF_(0L) in winerror.h, we can as well switch to S_OK. Is NOERROR some kind of a legacy definition?
Please do go ahead and submit it!
Currently, unixfs is registered as a virtual folder appearing directly at 'My Computer'. Winecfg uses SHBrowseForFolder, but it will also appear in open/save-as dialogs. Would this be ok?
Thanks for your comments,
On Wed, 23 Feb 2005 14:20:09 +0100, Michael Jung wrote:
Currently, unixfs is registered as a virtual folder appearing directly at 'My Computer'. Winecfg uses SHBrowseForFolder, but it will also appear in open/save-as dialogs. Would this be ok?
Well exactly, I'm not sure we want it in the open/save dialogs, otherwise if / is mapped anywhere the user will try and pick items from it, and loading will fail.
The right way to do this sort of stuff long term IMHO is to redesign the open/save dialogs so they don't expose drive letters to the user at all, and instead take the approach GTK+ has taken (home directory/device oriented).
For now I'm not sure how to suppress it. Hmmm.