News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Richedit tips

Started by TimoVJL, October 31, 2018, 05:18:08 PM

Previous topic - Next topic

TimoVJL

Missing TOM.h ?
You can create it from riched20.dll / msftedit.dll and rename it to tom.h

After that you can SendMessage(hREdit, EM_GETOLEINTERFACE, 0, (LPARAM)&pRichEditOle);
HRESULT hr = pRichEditOle->lpVtbl->QueryInterface(pRichEditOle, &IID_ITextDocument, (void **)&pDocument);
and VARIANT v;
v.vt = VT_BSTR;
v.bstrVal = SysAllocString(szFileName);
HRESULT hr = pDocument->lpVtbl->Open(pDocument, &v, 0x30, 0); // 0x30 tomOpenExisting
SysFreeString(v.bstrVal);

EDIT: Windowless RE with msftedit.dll 32-bit, by faking __thiscall with __fastcall :D
May the source be with you