I am using SHGetFolderLocation to get an IntPtr to the Desktop folder,
I have declared it as follows:
// SHGetFolderLocation
[DllImport("shell32.dll", EntryPoint="SHGetFolderLocation",
SetLastError=true, CallingConvention=CallingConvention.StdCall)]
public static extern int SHGetFolderLocation(IntPtr hwndOwner, int
nFolder, IntPtr hToken, int dwReserved, ref IntPtr ppidl);
The help file says:
The calling application is responsible for freeing this pointer with
the Shell's IMalloc interface (see SHGetMalloc).
Do I need to free the pointer returned in ppidl?
I don't use SHMalloc, in fact I'm sure I read in the help that it
shouldn't be used any more (?just in .NET) and to use Marshal instead.

Signature
Jeff Gaines Damerham Hampshire UK
Posted with XanaNews 1.16.4.6
Jeff Gaines - 15 Nov 2004 13:44 GMT
> I am using SHGetFolderLocation to get an IntPtr to the Desktop folder,
> I have declared it as follows:
[snipped]
Sorry, this was meant for interop, I have re-posted it there.

Signature
Jeff Gaines Damerham Hampshire UK
Posted with XanaNews 1.16.4.6