Click here to Skip to main content
15,921,884 members
Home / Discussions / COM
   

COM

 
GeneralRe: query interface in VB? Pin
Milton Karimbekallil15-Jul-04 2:08
Milton Karimbekallil15-Jul-04 2:08 
GeneralRe: query interface in VB? Pin
darkbyte17-Jul-04 4:44
darkbyte17-Jul-04 4:44 
GeneralRe: query interface in VB? Pin
Milton Karimbekallil18-Jul-04 17:53
Milton Karimbekallil18-Jul-04 17:53 
GeneralRe: query interface in VB? Pin
darkbyte19-Jul-04 0:44
darkbyte19-Jul-04 0:44 
GeneralRe: query interface in VB? Pin
Milton Karimbekallil19-Jul-04 19:44
Milton Karimbekallil19-Jul-04 19:44 
GeneralNeed to connect to correct instance of application Pin
Sara Burns5-Jul-04 19:44
Sara Burns5-Jul-04 19:44 
GeneralRe: Need to connect to correct instance of application Pin
darkbyte17-Jul-04 4:48
darkbyte17-Jul-04 4:48 
GeneralRe: Need to connect to correct instance of application Pin
darkbyte30-Jul-04 14:39
darkbyte30-Jul-04 14:39 
I've been thinking again about your problem and i might have some pointers that could lead you to a solution, i'm not assuming my solution is right but could help get the right solution.

Instead of using GetObject(, "MyProg.Document") which will take the first (or last) active instance. Create a new CoClass that can return either an "MyProg.ProdDocument" or "MyProg.TrainDocument" .. then from any of these, get the pointer to the Document.

When you start the application as Prod, have it RegisterActiveObject(<classid of="" proddocument=""> ... etc) and if you start it as Train, have it RegisterActiveObject(<classid of="" traindocument=""> ... etc)

Then, have both ProdDocument and TrainDocument interfaces containing a method getter for the Active document that would be returned if you used "MyProg.Document"

Well, not sure if this is Clear .. but i hope it helps.

[edit]That is assuming that you have access to source, or at least can get source modified for "MyProg"[/edit]
GeneralGetting Number of Sub-storage count from a structured storage file Pin
bhave_subodh2-Jul-04 6:39
bhave_subodh2-Jul-04 6:39 
GeneralRe: Getting Number of Sub-storage count from a structured storage file Pin
darkbyte6-Jul-04 1:36
darkbyte6-Jul-04 1:36 
GeneralIOleObject Advise Pin
Anonymous2-Jul-04 6:24
Anonymous2-Jul-04 6:24 
GeneralMakiing Plugin for Windows Media Encoder Pin
Asim Saleh1-Jul-04 7:04
Asim Saleh1-Jul-04 7:04 
GeneralGot &#8220;Type mismatch&#8221; box when running a default Add-n project I VB 6.0 Pin
anderslundsgard1-Jul-04 4:46
anderslundsgard1-Jul-04 4:46 
QuestionCreating a simple add-in for e.g. MS Outlook&#8230; ? Pin
anderslundsgard1-Jul-04 3:00
anderslundsgard1-Jul-04 3:00 
AnswerRe: Creating a simple add-in for e.g. MS Outlook&#8230; ? Pin
Jörgen Sigvardsson1-Jul-04 11:35
Jörgen Sigvardsson1-Jul-04 11:35 
GeneralStrange ROT behavior question Pin
vipsy28-Jun-04 5:43
vipsy28-Jun-04 5:43 
GeneralRe: Strange ROT behavior question Pin
Jörgen Sigvardsson1-Jul-04 11:50
Jörgen Sigvardsson1-Jul-04 11:50 
GeneralBig trouble Pin
El'Cachubrey28-Jun-04 3:01
El'Cachubrey28-Jun-04 3:01 
GeneralRe: Big trouble Pin
darkbyte28-Jun-04 7:35
darkbyte28-Jun-04 7:35 
GeneralRe: Big trouble Pin
El'Cachubrey29-Jun-04 1:36
El'Cachubrey29-Jun-04 1:36 
GeneralactiveX in Matlab Pin
ffredoux28-Jun-04 2:32
ffredoux28-Jun-04 2:32 
GeneralRe: activeX in Matlab Pin
darkbyte28-Jun-04 7:30
darkbyte28-Jun-04 7:30 
GeneralRe: activeX in Matlab Pin
ffredoux28-Jun-04 21:45
ffredoux28-Jun-04 21:45 
GeneralRe: activeX in Matlab Pin
darkbyte29-Jun-04 1:45
darkbyte29-Jun-04 1:45 
GeneralRe: activeX in Matlab Pin
ffredoux29-Jun-04 21:22
ffredoux29-Jun-04 21:22 

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.