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

COM

 
GeneralRe: pass character string to COM Pin
CPallini2-Jul-08 22:08
mveCPallini2-Jul-08 22:08 
GeneralRe: pass character string to COM Pin
MKUser2-Jul-08 22:58
MKUser2-Jul-08 22:58 
GeneralRe: pass character string to COM Pin
Vi22-Jul-08 22:08
Vi22-Jul-08 22:08 
GeneralRe: pass character string to COM Pin
MKUser2-Jul-08 23:02
MKUser2-Jul-08 23:02 
GeneralRe: pass character string to COM Pin
Vi22-Jul-08 17:38
Vi22-Jul-08 17:38 
GeneralRe: pass character string to COM Pin
CPallini1-Jul-08 22:08
mveCPallini1-Jul-08 22:08 
GeneralRe: pass character string to COM Pin
CPallini1-Jul-08 3:25
mveCPallini1-Jul-08 3:25 
QuestionHow to add another activex control to web page dynamically. Pin
vies0028-Jun-08 22:28
vies0028-Jun-08 22:28 
I would like to add an IHTMLElement dynamically to the HTML that contain an "A" ActiveX control.
That I want to add is another "B" ActiveX control.
So.. I programmed in "A" activex source code as below.
I created new element.

/* I deleted bstr, SysFreeString, VARIANT etc.. to understand easily */
IHTMLElement* pObjectElement=NULL;
m_pDoc2->createElement("<object>", &pObjectElement);
pObjectElement->setAttribute("classid", "clsid:AF0DDB60-76F8-4ADC-BF58-563EB7DF2B9D", 0); // "B" ActiveX control's Clsid
pObjectElement->setAttribute("width", "600");
pObjectElement->setAttribute("height", "400");

and.. attached it to the bodyElement.

m_pDoc2->get_body(&pElement);
pElement->QueryInterface(IID_IHTMLBodyElement, (LPVOID*)&pBody);
pBody->QueryInterface (IID_IHTMLDOMNode, (LPVOID*)&pParent);
pObjectElement->QueryInterface (IID_IHTMLDOMNode, (LPVOID*)&pChild);
pParent->appendChild (pChild, NULL);

It works well.
And.. I created another new element "param" to send "MyValue" to the "B" ActiveX control.

/* I deleted bstr, SysFreeString, VARIANT etc.. to understand easily */
IHTMLElement* pParamElement=NULL;
m_pDoc2->createElement("<param>", &pParamElement);
pParamElement->setAttribute("name", "src");
pParamElement->setAttribute("value", "MyValue");

and... attached it to the object element.

/* I inserted this code before object element is appended to the body element. like this..
* pChild->appendChild (pParam, NULL);
* pParent->appendChild (pChild, NULL);
*/
pParamElement->QueryInterface (IID_IHTMLDOMNode, (LPVOID*)&pParam);
pChild->appendChild (pParam, NULL);

But It doesn't work.
"B" ActiveX control couldn't receive "MyValue".
There are any problems in "B" ActiveX control. It works well in common situation.
so.. I thought it failed to append <param> to <object> element.
so, I appended a code to confirm whether param element is contained or not.
Surprisingly, <param> could find in it.
...I really really... don't know how I can solve this problem.
If anybody knows it, please answer me.
AnswerRe: How to add another activex control to web page dynamically. Pin
pascal9181-Mar-10 16:48
pascal9181-Mar-10 16:48 
QuestionDefine a enum type variable on the Interface (ATL project) ? Pin
iman_kh27-Jun-08 10:31
iman_kh27-Jun-08 10:31 
AnswerRe: Define a enum type variable on the Interface (ATL project) ? Pin
Stephen Hewitt1-Jul-08 15:03
Stephen Hewitt1-Jul-08 15:03 
AnswerRe: Define a enum type variable on the Interface (ATL project) ? Pin
Vi21-Jul-08 17:33
Vi21-Jul-08 17:33 
QuestionPassing an array from an ActiveX class Pin
Hampus@foi26-Jun-08 2:55
Hampus@foi26-Jun-08 2:55 
AnswerRe: Passing an array from an ActiveX class Pin
KarstenK26-Jun-08 3:22
mveKarstenK26-Jun-08 3:22 
GeneralRe: Passing an array from an ActiveX class Pin
Hampus@foi26-Jun-08 3:39
Hampus@foi26-Jun-08 3:39 
AnswerRe: Passing an array from an ActiveX class Pin
Lim Bio Liong26-Jun-08 7:21
Lim Bio Liong26-Jun-08 7:21 
GeneralRe: Passing an array from an ActiveX class Pin
Hampus@foi26-Jun-08 20:40
Hampus@foi26-Jun-08 20:40 
GeneralRe: Passing an array from an ActiveX class Pin
Lim Bio Liong26-Jun-08 21:26
Lim Bio Liong26-Jun-08 21:26 
QuestionAutomation, COM, server destruction Pin
ON_Vlad23-Jun-08 9:07
ON_Vlad23-Jun-08 9:07 
AnswerRe: Automation, COM, server destruction Pin
KarstenK26-Jun-08 3:29
mveKarstenK26-Jun-08 3:29 
GeneralRe: Automation, COM, server destruction Pin
ON_Vlad26-Jun-08 5:19
ON_Vlad26-Jun-08 5:19 
QuestionCOM Addin registery setting on Terminal server Pin
manisghouri23-Jun-08 1:06
manisghouri23-Jun-08 1:06 
Questionhow to export com dll(have created with c#) to .lib type library? Pin
iman_kh20-Jun-08 9:22
iman_kh20-Jun-08 9:22 
QuestionProgrammtically Unregister COM Server Pin
Brady Kelly19-Jun-08 1:59
Brady Kelly19-Jun-08 1:59 
AnswerRe: Programmtically Unregister COM Server Pin
CPallini19-Jun-08 2:09
mveCPallini19-Jun-08 2:09 

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.