Calling IEGetWriteableFolderPath()

  • Thread starter Thread starter nexolite
  • Start date Start date
N

nexolite

Hi,

I am trying to call IEGetWriteableFolderPath() from a C# BHO.
So I have done this:

[DllImport("ieframe.dll")]
public static extern int IEGetWriteableFolderPath(ref Guid
clsidFolderID, StringBuilder str);

Later in a function:

Guid FOLDERID_InternetCache1 = new
Guid("{352481E8-33BE-4251-BA85-6007CAEDCF9D}");

StringBuilder Path = new StringBuilder();

int RES = IEGetWriteableFolderPath(ref FOLDERID_InternetCache1,
Path);

But I am not getting anything in Path!
Also the return value (RES) is -2147467623 , don't know what this value means.

The Original function Signature is:
HRESULT IEGetWriteableFolderPath(GUID clsidFolderID,LPWSTR *lppwstrPath);

Please help me.

Thanks
 
in case you still need it...
this worked for me...

C#

[DllImport("ieframe.dll", SetLastError = true, CharSet = CharSet.Unicode)]
public static extern Win32Error IEGetWriteableFolderPath(ref Guid clsidFolderID, ref string lppwstrPath);

(Win32Error is just an enum to wrap error codes)

let me know if you need the code for this crazy protection-mode...
G



nexolite wrote:

Calling IEGetWriteableFolderPath()
23-May-10

Hi

I am trying to call IEGetWriteableFolderPath() from a C# BHO
So I have done this

[DllImport("ieframe.dll")
public static extern int IEGetWriteableFolderPath(ref Gui
clsidFolderID, StringBuilder str)

Later in a function

Guid FOLDERID_InternetCache1 = ne
Guid("{352481E8-33BE-4251-BA85-6007CAEDCF9D}")

StringBuilder Path = new StringBuilder()

int RES = IEGetWriteableFolderPath(ref FOLDERID_InternetCache1
Path)

But I am not getting anything in Path
Also the return value (RES) is -2147467623 , do not know what this value means

The Original function Signature is
HRESULT IEGetWriteableFolderPath(GUID clsidFolderID,LPWSTR *lppwstrPath)

Please help me

Thanks

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
LINQ With Strings
http://www.eggheadcafe.com/tutorial...47db-adb9-db7fe2c6ab8c/linq-with-strings.aspx
 
Back
Top