hello,
I wanted to call dismapi.dll function in c# code.
when I call function DismInitialize( ) its working fine.
next step I want to mount .Wim image file using DismMountImage( ) function.I got error 122,unable to mount image
what is wrong in this???
any help appreciated..
Thank You
I wanted to call dismapi.dll function in c# code.
when I call function DismInitialize( ) its working fine.
next step I want to mount .Wim image file using DismMountImage( ) function.I got error 122,unable to mount image
Code:
int hr="Marshal.GetLastWin32Error()"
I am calling DismMountImage as-
[DllImport(@"C:\Windows\System32\CompatTel\dismapi.dll", CharSet = CharSet.Unicode, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Error)]
public static extern int DismMountImage(
[MarshalAs(UnmanagedType.LPWStr)] string ImageFilePath,
[MarshalAs(UnmanagedType.LPWStr)] string MountPath,
UInt32 ImageIndex,
[MarshalAs(UnmanagedType.LPWStr)] string ImageName,
DismImageIdentifier ImageIdentifier,
UInt32 Flags
);
any help appreciated..
Thank You