Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 783285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:31:23+00:00 2026-05-14T20:31:23+00:00

As part of writing custom command (COM-Visible dll with class that implements Interwoven command

  • 0

As part of writing custom command (COM-Visible dll with class that implements Interwoven command interface) for one of Interwoven Worksite dialog boxes, I need to extract information from RichEdit textbox.

The only connection to the existing dialog box is its HWND handle; seemingly trivial task , but I got stuck:

  • Using standard win32 api functions (like GetDlgItemText) returns empty string.

After using Spy++ I noticed that the dialog box gets IRichEditOle interface and seems to encapsulate the string into OLE object.

Here is what I tried to do:

IRichEditOle richEditOleObj = null; 
IntPtr ppv = IntPtr.Zero; 
Guid guid = new Guid("00020D00-0000-0000-c000-000000000046"); 
Marshal.QueryInterface(pRichEdit, ref guid, out ppv); 
richEditOleObj = (IRichEditOle)Marshal.GetTypedObjectForIUnknown(ppv,typeof(IRichEditOle));

Judging by GetObjectCount() method of the interface there is exactly one object in the textbox – most likely the string I need to extract. I used GetObject() method and got IOleObject interface via QueryInterface:

if (richEditOleObj.GetObject(0, reObject, GetObjectOptions.REO_GETOBJ_ALL_INTERFACES) == 0) //S_OK
{ 
    IntPtr oleObjPpv = IntPtr.Zero;
    try
    { 
        IOleObject oleObject = null; 
        Guid objGuid = new Guid("00000112-0000-0000-C000-000000000046"); 
        Marshal.QueryInterface(reObject.poleobj, ref objGuid, out oleObjPpv);
        oleObject = (IOleObject)Marshal.GetTypedObjectForIUnknown(oleObjPpv, typeof(IOleObject)); 

To negate other possibilites I tried to QueryInteface for IRichEditOle to ITextDocument but this also returned empty string.

I tried to send EM_STREAMOUT message and read buffer returned from callback – returned empty buffer.

On this point I got stuck. Googling didn’t help much – couldn’t find anything that was relevant to my issue – it seems that vast majority of examples on the net about IRichEditOle and RichEdit revolve around inserting bitmap into RichEdit control.

The main problem – I couldn’t find a way to extract information I needed from IOleObject interface and didn’t find any examples relevant to extracting data from the object.

Now since I know only basic stuff about COM and OLE , I guess I am missing something important here.

I would appreciate any thoughts suggestions or remarks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T20:31:23+00:00Added an answer on May 14, 2026 at 8:31 pm

    I found the missing bit of the puzzle. Perhaps what I did will help others with similar problem.

    After calling IRichEditOle::GetObject I received REOBJECT structure. By using clsid field of the structure I found via registry the dll where needed interface was defined.

    Using explicit cast (This is C#; so it is equivalent to using QueryInterface) from IOleObject to the required interface I achieved what I needed – access to the data stored in that IOleObject.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.