View Single Post
Old 29th April 2005, 12:19   #260
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
The problem is quite tough. I havent actually seen an app which handles it too well. Being a single document interface app, with the possiblity of being launched in either single instance or multiple instance mode makes it even trickier.

Coupled with the fact the COM server is handled in a .DLL which is part of an EXE which actually itself isn't a COM server doesn't help. Ive been thinking about making the COM server another .exe which actually launches winamp.exe (possible with a /class param), or just have the /class included as a param for the com server.

Knowing which instance of winamp AW is controlling isn't really much of an issue, as it can just control the in-process instance. The trouble is the way AW grabs this instance is by registering, then getting, the active object. Its the 'active object' problem that is causing issues, and seems to cause issues for many com servers.

Feel free to checkout the source and have a go at implementing it. You will want to look into monikers too probably. And make sure it works with 'createobject' and 'getobject', in both single instance and multiple instance mode. And when winamp isn't and is already running.

Anyway, its complicated...
shaneh is offline   Reply With Quote