Sign in to follow this  
BrettPowell

Issue with .NET Wrapper DLL

Recommended Posts

I have been trying to sort this issue out for 3 days, and just spent 30$ on liveperson.com talking to an "expert" only to have them say "working on this now" then close the chat. I am getting desperate, so I am hoping that someone may be able to assist.

I have setup the ImDisk ([url="http://www.ltr-data.se/opencode.html/#ImDisk"]http://www.ltr-data....de.html/#ImDisk[/url]) .NET Wrapper in my project, and have written out my code. However, when I run my application, I get errors such as...

[b]Unable to find an entry point named '_ImDiskFindFreeDriveLetter@0' in DLL 'imdisk.cpl'.

[/b]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...

[code]
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);
}
[/code]

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this