I have setup the ImDisk (http://www.ltr-data....de.html/#ImDisk) .NET Wrapper in my project, and have written out my code. However, when I run my application, I get errors such as...
Unable to find an entry point named '_ImDiskFindFreeDriveLetter@0' in DLL 'imdisk.cpl'.
I have added the .dll/xml to my project directory, added the DLL as a reference to my project, and have had no luck. There is no sample code, and very little information on this library (although quite a few people seem to use it without issue) so I am stumped. The CLI and the Applet work fine, so the drivers and everything are installed fine. Just using the API through this wrapper is proving to be problematic.
My code is as follows...
public void CreateRAMDisk()
{
// Create Empty RAM Disk
char driveLetter = ImDiskAPI.FindFreeDriveLetter();
ImDiskAPI.CreateDevice(50000, 0, 0, 0, 0, ImDiskFlags.DeviceTypeHD | ImDiskFlags.TypeVM, null, false, driveLetter.ToString(), ref deviceID, IntPtr.Zero);
Console.WriteLine("RAMDisk DeviceID is " + deviceID);
// Create Mount Point (IS THIS NEEDED ALSO, OR OPTIONAL???)
//ImDiskAPI.CreateMountPoint("C://empty_directory", deviceID);
}
After searching Google, I read that issue occurs when the object is not initialized, however, it has no constructor so it can't be. The very small amount of code someone else pasted on their forums looked like they were just calling the methods directly as well, so I don't believe this is the issue.
Any help would be fantastic, as I am starting to get rather desperate.