Asked By Anjali A
30-Dec-09 02:20 AM
I am getting System>AccessViolationException while debugging the below code. Can anyone please help me...
ShellLib.IShellFolder pShellFolder;
pShellFolder = ShellLib.ShellFunctions.GetDesktopFolder();
string sPath = "C:\\Documents and settings\\giji\\Desktop\\gg.doc";
uint var = (uint)sPath.Length;
IntPtr pidlchild;
uint pdw=0;
pShellFolder.ParseDisplayName(IntPtr.Zero, IntPtr.Zero, sPath, ref var, out pidlchild,ref pdw);
Guid riid = new Guid("BB2E617C-0920-11d1-9A0B-00C04FC2D6C1");
IntPtr ppv;
uint len = 1;
uint reser = 0;
IntPtr[] arry = { pidlchild };
pShellFolder.GetUIObjectOf(IntPtr.Zero, len,arry, riid, ref reser, out ppv);