| Author |
Message |
mr1900
Joined: 16 May 2007 Posts: 2 Location: Ukraine
|
Posted: Wed May 16, 2007 3:51 pm Post subject: mshtml does not work in C# Pleas Help! |
|
|
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 |
|
 |
Robert
Joined: 30 Oct 2006 Posts: 428 Location: Cambridge, UK
|
Posted: Wed May 16, 2007 4:06 pm Post subject: |
|
|
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 |
|
 |
mr1900
Joined: 16 May 2007 Posts: 2 Location: Ukraine
|
Posted: Fri May 18, 2007 7:07 am Post subject: |
|
|
Hi Robert.
Many thanks to you, I have understood also all have earned!
Once again thanks!
With the best regards, mr1900. |
|
| Back to top |
|
 |
|
|
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