Red Gate forums :: View topic - mshtml does not work in C# Pleas Help!
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
PInvoke.Net
PInvoke.Net forum

mshtml does not work in C# Pleas Help!

Search in PInvoke.Net forum
Post new topic   Reply to topic
Jump to:  
Author Message
mr1900



Joined: 16 May 2007
Posts: 2
Location: Ukraine

PostPosted: Wed May 16, 2007 3:51 pm    Post subject: mshtml does not work in C# Pleas Help! Reply with quote

Hello! Why the example does not work

Quote:
Sample Code:
// Get the ActiveX interface of some window of class "Internet Explorer_Server"
IntPtr hWnd = GetThatWindow(); // from wherever
uint nMsg = RegisterWindowMessage("WM_HTML_GETOBJECT");
UIntPtr lRes;
if ( SendMessageTimeout(hWnd, nMsg, UIntPtr.Zero, IntPtr.Zero,
SendMessageTimeoutFlags.SMTO_ABORTIFHUNG, 1000, out lRes) == IntPtr.Zero )
return null;
return (mshtml.IHTMLDocument) ObjectFromLresult(lRes,
typeof(mshtml.IHTMLDocument).GUID, IntPtr.Zero);


The programming language C#
Error: The type or namespace name 'mshtml' could not be found (are you missing a using directive or an assembly reference?)
What using????

Help please! I only study in programming.
I from Ukraine, therefore am sorry for my English
Back to top
View user's profile Send private message
Robert



Joined: 30 Oct 2006
Posts: 428
Location: Cambridge, UK

PostPosted: Wed May 16, 2007 4:06 pm    Post subject: Reply with quote

Hi,

The sample code appears to just be a snippet to demonstrate the ObjectFromLresult function, so isn't complete (it assumes the mshtml object is declared outside of that sample).

For more information on MSHTML, the MSDN MSHTML Reference at http://msdn2.microsoft.com/en-us/library/Aa741317.aspx might help you.
_________________
Robert Chipperfield
Developer, Red Gate Software Ltd
Back to top
View user's profile Send private message MSN Messenger
mr1900



Joined: 16 May 2007
Posts: 2
Location: Ukraine

PostPosted: Fri May 18, 2007 7:07 am    Post subject: Reply with quote

Hi Robert.

Many thanks to you, I have understood also all have earned!

Once again thanks!

With the best regards, mr1900.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group