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