I have written a small program that do p/invoke to obtain the pointer to the EWFProtected volume or disk. The operating system in windows embedded standard. The c: is a protected volume. Type is RAM<REG> When i make a function call EwfMgrOpenProtected("C:"); return value is -1 and error value is 5 which is access denied. How to obtain an handle to the protected volume?
static void Main(string[] args) { // HANDLE EwfMgrOpenProtected(LPCWSTR lpVolume); IntPtr ptr = EwfMgrOpenProtected("C:"); int error = Marshal.GetLastWin32Error(); Console.WriteLine("error " + error); Console.WriteLine(ptr); Console.ReadLine(); } [DllImport("ewfapi.dll", SetLastError = true, CharSet = CharSet.Unicode)] public static extern IntPtr EwfMgrOpenProtected(string volume);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)