Click here to Skip to main content
15,890,185 members
Home / Discussions / COM
   

COM

 
AnswerRe: Possible to dvlp COM/ATL C++ code in VS.NET? Pin
Amit Dey24-Jan-04 11:47
Amit Dey24-Jan-04 11:47 
Generalproblem with __uuidof Pin
emmatty17-Jan-04 0:04
emmatty17-Jan-04 0:04 
GeneralRe: problem with __uuidof Pin
Abhishek Srivastava18-Jan-04 17:17
Abhishek Srivastava18-Jan-04 17:17 
GeneralRe: problem with __uuidof Pin
Anonymous30-Jan-04 11:09
Anonymous30-Jan-04 11:09 
GeneralRelease in thread created by timer Pin
Steve Schaneville15-Jan-04 17:39
professionalSteve Schaneville15-Jan-04 17:39 
GeneralRe: Release in thread created by timer Pin
Jörgen Sigvardsson15-Jan-04 21:58
Jörgen Sigvardsson15-Jan-04 21:58 
GeneralRe: Release in thread created by timer Pin
Steve Schaneville16-Jan-04 12:20
professionalSteve Schaneville16-Jan-04 12:20 
QuestionBig difference between VB new operator and COM CoCreateInstance? Pin
Brigsoft15-Jan-04 9:54
Brigsoft15-Jan-04 9:54 
I want to convert HTML to TEXT from some string
It good works in VB code like this:

Dim body As String
Dim hd As HTMLDocument
Dim str As String

Set hd = New HTMLDocument


Open "c:\test\a.html" For Input As #1

body = Input(4188, #1)
hd.body.innerHTML = body
Debug.Print hd.body.outerText


I try do it with VC++ so:

IHTMLDocument2 *pHtmlDoc = NULL;

HRESULT hr;
hr = CoCreateInstance(CLSID_HTMLDocument,
NULL,
CLSCTX_INPROC_SERVER,
IID_IHTMLDocument2,
(LPVOID *) &pHtmlDoc);

IHTMLElement *pBody;
hr = pHtmlDoc->createElement(CComBSTR("BODY"), &pBody);

CComBSTR bsText;
hr = pBody->get_outerHTML(&bsText); // OK, we have ""
CComBSTR SomeText("Some Text);
hr = pBody->put_outerHTML((BSTR)SomeText); // ;-( falls


It falls down while "put_outerHTML"

Who know right solution?

PS
Set hd = New HTMLDocument
creates an object with html code with base document structure (5 tags: html, body, head, title, p).

CoCreateInstance creates absolutely empty object.

Why?


================================
My products are here
AnswerRe: Big difference between VB new operator and COM CoCreateInstance? Pin
Anonymous30-Jan-04 11:18
Anonymous30-Jan-04 11:18 
QuestionHow to fill the fields of IE's web page from within VB or C++ ? Pin
John Thomas15-Jan-04 6:10
John Thomas15-Jan-04 6:10 
AnswerRe: How to fill the fields of IE's web page from within VB or C++ ? Pin
Amit Dey24-Jan-04 11:51
Amit Dey24-Jan-04 11:51 
GeneralProblems with out of process server (COM) Pin
Anonymous15-Jan-04 0:26
Anonymous15-Jan-04 0:26 
GeneralRe: Problems with out of process server (COM) Pin
Mike Dimmick15-Jan-04 2:34
Mike Dimmick15-Jan-04 2:34 
GeneralRe: Problems with out of process server (COM) Pin
Omar Alvi15-Jan-04 8:13
Omar Alvi15-Jan-04 8:13 
GeneralRe: Problems with out of process server (COM) Pin
Anonymous30-Jan-04 11:26
Anonymous30-Jan-04 11:26 
GeneralInside Ole Kraig BrockSchmidt, samples needed Pin
safee ullah13-Jan-04 23:35
safee ullah13-Jan-04 23:35 
GeneralWord Component Object Model Pin
Anonymous13-Jan-04 1:51
Anonymous13-Jan-04 1:51 
GeneralRe: Word Component Object Model Pin
Michael P Butler13-Jan-04 2:10
Michael P Butler13-Jan-04 2:10 
GeneralRe: Word Component Object Model Pin
Anonymous13-Jan-04 3:39
Anonymous13-Jan-04 3:39 
QuestionHow to get IStream on ordinary file ? Pin
vipsy12-Jan-04 22:11
vipsy12-Jan-04 22:11 
AnswerRe: How to get IStream on ordinary file ? Pin
Jörgen Sigvardsson13-Jan-04 9:39
Jörgen Sigvardsson13-Jan-04 9:39 
GeneralRe: How to get IStream on ordinary file ? Pin
vipsy13-Jan-04 17:58
vipsy13-Jan-04 17:58 
GeneralRe: How to get IStream on ordinary file ? Pin
Jörgen Sigvardsson13-Jan-04 21:48
Jörgen Sigvardsson13-Jan-04 21:48 
GeneralRe: How to get IStream on ordinary file ? Pin
vipsy14-Jan-04 0:39
vipsy14-Jan-04 0:39 
GeneralWhy IClassFactory Pin
Omar Alvi12-Jan-04 1:17
Omar Alvi12-Jan-04 1:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.