FBWF API about FbwfGetVolumeList

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi all~

Now i am developing a GUI of FBWF-Manager, The IDE I´m using is Visual
Studio 6.0 using C++.

I want to get an information like c: or d:, to show to users. But by using
function "FbwfGetVolumeList" , i just can get results like
"DEVICE\HarddiskVolume2".

maybe some functions can do it, but i don't find now.


thanks for reply, Hayes
 
Hello Hayes,

I don't have an answer to your question, but maybe this one will help you:

Search in the newsgroup for "FBWF" and look into Subject: FBWF API using C++!

But I have a question too:

How to use the function "FbwfGetVolumeList"
I try this and get just a number like 0 or 92:

ULONG CurrSession = 0;
ULONG cbSize = 100;
char *ExcludedFiles = new char[100];

ULONG iErr = FbwfGetVolumeList(CurrSession, ExcludedFiles, &cbSize);
Folder->Items->Add(ExcludedFiles[5]);

Because you already got it, Can you help me with this?

Greeting Mario
 
Hayes,

We have already dicussed this in NG. Search NG archive for "FBWF API using C++" discussion thread.
Quick summary. Here is the code that Chris posted there (MFC but easy to re-write without):

CString DeviceNameToDrive(char *szDevice)
{
char szDrives[256];
char szCurDevice[256];
GetLogicalDriveStrings(sizeof(szDrives), szDrives);

int iSubStr = 0;
CString strDrive;

while(AfxExtractSubString(strDrive, szDrives, iSubStr, '\0') &&
strDrive.Compare("") != 0)
{
strDrive.Remove('\\');
QueryDosDevice(strDrive.GetBuffer(0), szCurDevice, 256);

if(strcmp(szDevice, szCurDevice) == 0)
{
strDrive += "\\";
return strDrive;
}

iSubStr++;
}
return "";
}

You can also use GetVolumeNameForVolumeMountPoint function instead if you like. (if you do, the pair
GetLogicalDrives/GetLogicalDriveStrings of APIs may also be helpful to you)

From DDK level you can also use IoVolumeDeviceToDosName API.
 
Mario,

I couldn't quite understand your question below. But in case you wanted just to convert the FbwfGetVolumeList results to more
readable drive letters, please see the reply I just posted to Hayes's question.

--
=========
Regards,
KM

Hello Hayes,

I don't have an answer to your question, but maybe this one will help you:

Search in the newsgroup for "FBWF" and look into Subject: FBWF API using C++!

But I have a question too:

How to use the function "FbwfGetVolumeList"
I try this and get just a number like 0 or 92:

ULONG CurrSession = 0;
ULONG cbSize = 100;
char *ExcludedFiles = new char[100];

ULONG iErr = FbwfGetVolumeList(CurrSession, ExcludedFiles, &cbSize);
Folder->Items->Add(ExcludedFiles[5]);

Because you already got it, Can you help me with this?

Greeting Mario



Hayes said:
hi all~

Now i am developing a GUI of FBWF-Manager, The IDE I?m using is Visual
Studio 6.0 using C++.

I want to get an information like c: or d:, to show to users. But by using
function "FbwfGetVolumeList" , i just can get results like
"DEVICE\HarddiskVolume2".

maybe some functions can do it, but i don't find now.


thanks for reply, Hayes
 
Hi,

thanks for your answer. Yes, the function gives a list with a multistring
back(see MSDN). I didn't know how to get those converted to an string.

ULONG FbwfGetVolumeList(
ULONG currentSession,
PVOID volumeList, //I want to print this in a Listbox with
//Listbox->Item->Add...
PULONG size
);

I can't test it until monday but then I will try your suggestion. I hope
this is going to help me. I spent two days on this problem.

Thanks, Mario

KM said:
Mario,

I couldn't quite understand your question below. But in case you wanted just to convert the FbwfGetVolumeList results to more
readable drive letters, please see the reply I just posted to Hayes's question.

--
=========
Regards,
KM

Hello Hayes,

I don't have an answer to your question, but maybe this one will help you:

Search in the newsgroup for "FBWF" and look into Subject: FBWF API using C++!

But I have a question too:

How to use the function "FbwfGetVolumeList"
I try this and get just a number like 0 or 92:

ULONG CurrSession = 0;
ULONG cbSize = 100;
char *ExcludedFiles = new char[100];

ULONG iErr = FbwfGetVolumeList(CurrSession, ExcludedFiles, &cbSize);
Folder->Items->Add(ExcludedFiles[5]);

Because you already got it, Can you help me with this?

Greeting Mario



Hayes said:
hi all~

Now i am developing a GUI of FBWF-Manager, The IDE I?m using is Visual
Studio 6.0 using C++.

I want to get an information like c: or d:, to show to users. But by using
function "FbwfGetVolumeList" , i just can get results like
"DEVICE\HarddiskVolume2".

maybe some functions can do it, but i don't find now.


thanks for reply, Hayes
 
Back
Top