Anyhow. as much I hated to do that:) I stidued your code yesterday afternoon, made some minor addition (I mean the directory thing) and this morning I tried to run it. Because of my level or perhaps because my specialty is way off I still have some conceptuial difficulty as to how to make a call. One seed parameter is unclear, so I assigned it arbitrarily, ulong, I made it 95. I simply do not understand what this number means and of course I would appreciate if you make a clarification.
You see, somebody else may try to use your code, will run in the same problem and will be shy enough to be turned away. Thus your magnificent effort (I am only 20% facitious--it is a great code, I'll tell you) will go in vain.
I am not that personality type. If I need to get down to the bottom of things I always do even at the expense of exposing my uneducated core.
This is how I called your sea rmonster.
UInt64 bb = 95;
string[ ] fileExtensions = newstring[ 2 ];
fileExtensions[ 0 ] = "exe";
fileExtensions[ 1 ] = "dll";
Dictionary<UInt64, PInvokeWin32.FileNameAndFrn> dict = newDictionary<ulong, PInvokeWin32.FileNameAndFrn> ( );
PInvokeWin32 pInv = newPInvokeWin32 ( );
pInv.EnumerateVolume ( out dict, fileExtensions );
I got an exception. Read it:
Message="Unable to get root frn entry"
Source="ComeAndGet"
StackTrace:
at ComeAndGet.PInvokeWin32.GetRootFrnEntry() in C:\VCsharp_Projects\ComeAndGet\ComeAndGet\MasterRecordRead.cs:line 228
InnerException: System.ComponentModel.Win32Exception
Message="The filename, directory name, or volume label syntax is incorrect"
ErrorCode=-2147467259
NativeErrorCode=123
InnerException:
Is that ulong bb supposed to be a volume label? Does not make much sense though. Anyhow I can get any seed information on any volume with WMI. I just need to know what your sea monster wants for dinner.
Also I do not understand what volume we are talking about. There is no volume label for input parameter anywhere. I may be mising something and I am sure when you point it out to me my face will be red. Don't worry. I am used to it.
else
{
thrownewIOException ( "GetFileInformationbyHandle() returned invalid handle",
newWin32Exception ( Marshal.GetLastWin32Error ( ) ) );
}
PInvokeWin32.CloseHandle ( hRoot );
}
else
{
thrownewIOException ( "Unable to get root frn entry",
newWin32Exception( Marshal.GetLastWin32Error ( ) ) );
}
} // GetRootFrnEntry <======== HERE IT WAS. It pointed to the closing curly braket.
Skipper, my life is hanging by a thread in a balance. You are the only one who can change it.
Thanks.
AlexB