Click here to Skip to main content
15,924,507 members
Home / Discussions / COM
   

COM

 
GeneralRetrieving Pointer to IOleClientSite Pin
GeorgT12-May-03 4:15
GeorgT12-May-03 4:15 
GeneralUsing Updated Interface Pin
swarup12-May-03 3:17
swarup12-May-03 3:17 
Generalerror calling method in event Pin
particle2k11-May-03 23:44
particle2k11-May-03 23:44 
GeneralRe: error calling method in event Pin
Vi215-May-03 3:43
Vi215-May-03 3:43 
Generalexe-server component's interface related Pin
satishsilla11-May-03 20:54
satishsilla11-May-03 20:54 
GeneralRe: exe-server component's interface related Pin
valikac13-May-03 16:04
valikac13-May-03 16:04 
Generalexe-server component's interface related Pin
satishsilla11-May-03 20:53
satishsilla11-May-03 20:53 
GeneralMSHTML & IStream Pin
luda10-May-03 13:13
luda10-May-03 13:13 
Hi,
I want to load HTML code from file to MSHTML :

<br />
	HGLOBAL hMemLoad = GlobalAlloc(GPTR,(strlen(pBuffer)+1)*2);<br />
	WCHAR* pwBuff  = (WCHAR*) GlobalLock(hMemLoad);<br />
	MultiByteToWideChar(CP_ACP,MB_COMPOSITE,pBuffer,-1,pwBuff,strlen(pBuffer));<br />
	GlobalUnlock(hMemLoad);<br />
<br />
	HRESULT hRes = 0;<br />
	IStream *pStreamLoad; <br />
	CreateStreamOnHGlobal(hMemLoad,FALSE,&pStreamLoad);<br />
<br />
	IPersistStreamInit *pStreamInitLoad;<br />
	hRes = pHtmlDoc2->QueryInterface(IID_IPersistStreamInit,(LPVOID*) &pStreamInitLoad);<br />
	<br />
	pStreamInitLoad->InitNew();	<br />
	pStreamInitLoad->Load(pStreamLoad);<br />
	pStreamInitLoad->Release();<br />
<br />
	pStreamLoad->Release();<br />
<br />
	GlobalFree(hMemLoad);<br />


But, when I try :
<br />
	IHTMLDocument3 *pIHD3;<br />
	hRes = pHtmlDoc2->QueryInterface(IID_IHTMLDocument3,(LPVOID*) &pIHD3);<br />
	IHTMLElementCollection *pColl;<br />
	pIHD3->getElementsByTagName(L"a",&pColl);<br />
	long l;<br />
	pColl->get_length(&l);<br />
<code><br />
<br />
to get number of items, I getting 0. ;-(.<br />
<br />
Can somebody tell me what I do wrong ?<br />
Thanks, <br />
 Luda

GeneralRe: MSHTML & IStream Pin
Stephane Rodriguez.12-May-03 3:43
Stephane Rodriguez.12-May-03 3:43 
GeneralATL components Pin
Ancient Dragon9-May-03 13:00
Ancient Dragon9-May-03 13:00 
GeneralRe: ATL components Pin
valikac15-May-03 7:59
valikac15-May-03 7:59 
GeneralCustom Outlook property sheet (C#) Pin
rkiesler9-May-03 12:45
rkiesler9-May-03 12:45 
QuestionHow to get (and use) the IStream interface from CFile Pin
Anders Sandberg8-May-03 22:30
Anders Sandberg8-May-03 22:30 
AnswerRe: How to get (and use) the IStream interface from CFile Pin
rkiesler11-May-03 13:17
rkiesler11-May-03 13:17 
GeneralCOM vs ActiveX vs OLE Pin
weichai7-May-03 16:28
weichai7-May-03 16:28 
GeneralRe: COM vs ActiveX vs OLE Pin
Davy Mitchell8-May-03 8:53
Davy Mitchell8-May-03 8:53 
GeneralRe: Help...stuck on error MIDL2020 : error generating type library : LayOut failed : IVSSItemOld Pin
Stephane Rodriguez.7-May-03 20:47
Stephane Rodriguez.7-May-03 20:47 
GeneralRe: Help...stuck on error MIDL2020 : error generating type library : LayOut failed : IVSSItemOld Pin
RGTx8-May-03 10:09
RGTx8-May-03 10:09 
GeneralRe: Help...stuck on error MIDL2020 : error generating type library : LayOut failed : IVSSItemOld Pin
Vi27-May-03 22:52
Vi27-May-03 22:52 
GeneralRe: Help...stuck on error MIDL2020 : error generating type library : LayOut failed : IVSSItemOld Pin
RGTx8-May-03 10:10
RGTx8-May-03 10:10 
GeneralCD Burning Pin
TekProfessional7-May-03 13:30
TekProfessional7-May-03 13:30 
GeneralRe: CD Burning Pin
Michael Dunn7-May-03 15:12
sitebuilderMichael Dunn7-May-03 15:12 
GeneralAPI/Control -> AuthenTec FingerLogic USB Scanner Pin
Kramins7-May-03 10:35
Kramins7-May-03 10:35 
GeneralEmbedding word documents in OLE Container Pin
rajandpayal4-May-03 17:52
rajandpayal4-May-03 17:52 
GeneralPleas help me with IConnectionPoint::Advise() Pin
faberge3-May-03 2:01
faberge3-May-03 2:01 

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.