Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

ObjectFromLresult (oleacc)
 
.
Summary
Retrieves a requested interface pointer for an accessible object based on a previously generated object reference
Summary
TODO - a short description

C# Signature:

[DllImport("oleacc.dll", PreserveSig=false)]
[return: MarshalAs(UnmanagedType.Interface)]
static extern object ObjectFromLresult(UIntPtr lResult,
     [MarshalAs(UnmanagedType.LPStruct)] Guid refiid, IntPtr wParam);
[DllImport("oleacc.dll")]
internal static extern int ObjectFromLresult(
    IntPtr lResult,
    [In] ref Guid refiid,
    IntPtr wParam,
    [Out, MarshalAs(UnmanagedType.Interface)] out object ppvObject);

VB Signature:

Declare Auto Function ObjectFromLresult Lib "oleacc.dll" (ByVal lResult As UIntPtr, <MarshalAs(UnmanagedType.LPStruct)> ByVal refiid As Guid, ByVal wParam As IntPtr) As <MarshalAs(UnmanagedType.Interface)> Object

or

<Dllimport("oleacc.dll")> _
Shared Function ObjectFromLresult(ByVal lResult As UIntPtr, <MarshalAs(UnmanagedType.LPStruct)> ByVal refiid As Guid, ByVal wParam As IntPtr) As <MarshalAs(UnmanagedType.Interface)> Object
End Function

Declare Function ObjectFromLresult Lib "oleacc.dll" (TODO) As TODO

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Please add some!

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);

See

Alternative Managed API:

Do you know one? Please contribute it!

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions