bibikurosawa / dokan

Automatically exported from code.google.com/p/dokan
0 stars 0 forks source link

SSHFS / Print profile name instead of "DOKAN" in volume name #57

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using latest version (0.2.0.1226).
Would it be possible to have the profile name (the name you put in the
"Name" field in the dialog box) instead of "DOKAN" in the drive name. That
would be great when multiple drives are set up (which is my case).
Anyway, it's a great product

Original issue reported on code.google.com by renaud.m...@laposte.net on 23 Jan 2009 at 1:29

GoogleCodeExporter commented 9 years ago
Yes, This feature would definately be very useful

Original comment by nazeer.h...@gmail.com on 6 May 2009 at 9:56

GoogleCodeExporter commented 9 years ago
Any updates on this feature? Not available yet under 0.5.3
dokanctl : Jul  5 2010 21:39:28
Dokan version : 188
Dokan driver version : 188

Original comment by gam...@gmail.com on 28 Dec 2010 at 11:10

GoogleCodeExporter commented 9 years ago
This is available. You need to provide callback for 
dokan_operations->GetVolumeInformation and set the volume name in the callback.

Original comment by gam...@gmail.com on 3 Feb 2011 at 11:21

GoogleCodeExporter commented 9 years ago
I guess I'm not sure how this works. GetVolumeInformation looks like it only 
reads volume info. Could you show an example of how this works

Original comment by nl.thack...@gmail.com on 12 May 2011 at 9:15

GoogleCodeExporter commented 9 years ago
In the mirror example code, there is DOKAN_OPERATIONS structure which is 
initialized with callback functions for CreateFile, ReadFile, etc. This 
structure has a member GetVolumeInformation which is not initialized in the 
mirror example. Init this callback  with your own function. This function will 
be called by Windows to retrieve the volume label. Within this function return 
the name you want to. Example shown below:

static int __stdcall
my_GetVolumeInformation (
    LPWSTR VolumeNameBuffer,
    DWORD VolumeNameSize, // in num of chars
    LPDWORD VolumeSerialNumber,
    LPDWORD MaximumComponentLength, // in num of chars
    LPDWORD FileSystemFlags,
    LPWSTR FileSystemNameBuffer,
    DWORD FileSystemNameSize, // in num of chars
    PDOKAN_FILE_INFO DokanFileInfo)
{
    wcscat(VolumeNameBuffer, L"MYFS");
    *VolumeSerialNumber = 0x19831116;
    *MaximumComponentLength = 256;
    *FileSystemFlags = FILE_CASE_SENSITIVE_SEARCH | 
                        FILE_CASE_PRESERVED_NAMES | 
                        FILE_SUPPORTS_REMOTE_STORAGE |
                        FILE_UNICODE_ON_DISK;

    wcscat(FileSystemNameBuffer, L"myfs");

    return 0;
}

Original comment by gam...@gmail.com on 16 May 2011 at 8:51

GoogleCodeExporter commented 9 years ago
See this http://code.google.com/p/dokan/issues/detail?id=221&start=100

Original comment by mladenov...@gmail.com on 18 May 2011 at 10:05