Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get an object ref from a process id?
Message
De
24/05/2006 16:28:16
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, États-Unis
 
 
À
24/05/2006 12:41:46
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Divers
Thread ID:
01124512
Message ID:
01124684
Vues:
7
Thanks for the reference. It looks like this might get me what I need if I can figure it out! It's easy to get the AccessibleObject, but I'm not having any luck getting the same object model I'd get from GetObject(). I've used the iDispatch guid and OBJID_NATIVEOM, but no luck yet. I'll keep plugging.

Thanks,

Gary

>Hello,
>
>GETOBJECT() definitly does not work, since each COM class can only be registered once in the system. If you start N instances of MS Word only the first one will be accessible via GETOBJECT() ..
>
>"I can use EnumProcess to get the individual proc ids, but how would one get an object ref from that? Perhaps there is another way?"
>
>just an idea, you might do something like this
>
>API EnumWindows to enumerate all toplevel windows ..
>API GetWindowThreadProcessId to get the process ID of each window
>then check if the process ID of a window is in the list of the process ID's you're interested in.
>API AccessibleObjectFromWindow for each window handle identified like above.
>
>see: http://blogs.msdn.com/calvin_hsia/archive/2005/11/28/497529.aspx
>
>Regards
>Christian
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform