PC Review


Reply
Thread Tools Rate Thread

Calling IEGetWriteableFolderPath()

 
 
nexolite
Guest
Posts: n/a
 
      23rd May 2010
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
 
Reply With Quote
 
 
 
 
hypergaga
Guest
Posts: n/a
 
      25th May 2010
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/tutorials...h-strings.aspx
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling IEGetWriteableFolderPath() nexolite Microsoft Dot NET Framework 0 23rd May 2010 05:58 PM
Calling SQL from code has different behaviour than calling it from MS SQL Server Management Studio jeeji Microsoft C# .NET 1 29th Jun 2006 10:43 AM
Fail to send fax when making international fax calling / calling c =?Utf-8?B?c2Ftd2lzZQ==?= Windows XP Help 1 28th Dec 2004 02:31 PM
Calling FormsAuthentication.SignOut() after calling Response.Flush =?Utf-8?B?TWFydGluIExlZQ==?= Microsoft ASP .NET 1 28th Sep 2004 01:47 PM
Server Side button calling page_load before calling it's own click event. Ryan Ternier Microsoft ASP .NET 4 29th Jul 2004 02:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:18 PM.