Click here to Skip to main content
15,914,447 members
Home / Discussions / COM
   

COM

 
GeneralRe: activex question... Pin
l a u r e n27-Aug-05 8:29
l a u r e n27-Aug-05 8:29 
GeneralRe: activex question... Pin
Jörgen Sigvardsson27-Aug-05 13:20
Jörgen Sigvardsson27-Aug-05 13:20 
GeneralRe: activex question... Pin
l a u r e n27-Aug-05 16:46
l a u r e n27-Aug-05 16:46 
Questionsocket problem Pin
Ganesh_T25-Aug-05 18:58
Ganesh_T25-Aug-05 18:58 
QuestionDriver interface Pin
Paresh emb25-Aug-05 5:52
Paresh emb25-Aug-05 5:52 
QuestionTopics for DCOM Pin
V.G25-Aug-05 2:55
V.G25-Aug-05 2:55 
QuestionManifest Pin
Alex_Y25-Aug-05 2:37
Alex_Y25-Aug-05 2:37 
QuestionDistinguish IObjectWithSite instance in IOleCommandTarget.Exec? Pin
song88824-Aug-05 23:51
song88824-Aug-05 23:51 
I'm trying to add a button on the standard toolbar of IE. This button can access the HTML Object Model of web page in current IE window. To create a button on IE toolbar, I created a com object which implements IOleCommandTarget. To get access to the IHTMLDocument2, I created a com object which implements IObjectWithSite.

When there are multiple IE instances, I keep all the IObjectWithSite instances in a static ArrayList. So the IOleCommandTarget.Exec function can get access to the IHTMLDocument2 instances for each web page through this static ArrayList.

Each IE window has a added button. When the user clicks the added button in IE, I only want to access the HTML object model in the current IE window (The IE window whose button is clicked) rather than all the HTML object models in every opened IE windows. Now here comes the problem. In IOleCommandTarget.Exec function, I have no way to distinguish which IObjectWithSite instances is associated with the current IE window.

To better explain my problem, I pasted the link of the original code and article that my code tries to simulate. The original code doesn't encounter my problem because it actually process every IObjectWithSite instances through the static ArrayList.

http://www.codeguru.com/Csharp/.NET/net_general/article.php/c4671/#more[^]

I really appreciate it if anyone can point out a solution for my problem. By the way, I'm using C#.
GeneralExchange 2000 - Event Sink receives EVT_SYNC_COMMITTED twice (!!!) Pin
Michael B. Hansen24-Aug-05 23:12
Michael B. Hansen24-Aug-05 23:12 
Generalwhen should i implement interface IExternalConnection Pin
HeartFriend24-Aug-05 19:59
HeartFriend24-Aug-05 19:59 
Generalcomponent registration Pin
Maddie from Dartford24-Aug-05 3:05
Maddie from Dartford24-Aug-05 3:05 
GeneralRe: component registration Pin
User 21559724-Aug-05 17:28
User 21559724-Aug-05 17:28 
GeneralActiveX and OLE server - destroyed! Pin
john john mackey23-Aug-05 8:52
john john mackey23-Aug-05 8:52 
Generaldirectshow avi source filter Pin
villalvilla22-Aug-05 20:22
villalvilla22-Aug-05 20:22 
GeneralAddRef() Error Pin
Logan from Singapore22-Aug-05 18:15
Logan from Singapore22-Aug-05 18:15 
GeneralRe: AddRef() Error Pin
User 21559724-Aug-05 17:24
User 21559724-Aug-05 17:24 
GeneralCopy and pest Pin
dubotz22-Aug-05 3:42
dubotz22-Aug-05 3:42 
GeneralRe: Copy and pest Pin
MohammadAmiry30-Aug-05 9:33
MohammadAmiry30-Aug-05 9:33 
GeneralRe: Copy and pest Pin
dubotz30-Aug-05 22:35
dubotz30-Aug-05 22:35 
GeneralRe: Copy and pest Pin
dubotz31-Aug-05 0:16
dubotz31-Aug-05 0:16 
GeneralRe: Copy and pest Pin
MohammadAmiry2-Sep-05 7:36
MohammadAmiry2-Sep-05 7:36 
GeneralRe: Copy and pest Pin
Anonymous19-Oct-05 20:40
Anonymous19-Oct-05 20:40 
GeneralWindows Management Instrumentation Pin
rajeevktripathi22-Aug-05 1:53
rajeevktripathi22-Aug-05 1:53 
GeneralRe: Windows Management Instrumentation Pin
MailtoGops22-Aug-05 5:57
MailtoGops22-Aug-05 5:57 
GeneralRe: Windows Management Instrumentation Pin
MailtoGops22-Aug-05 5:57
MailtoGops22-Aug-05 5:57 

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.