Click here to Skip to main content
15,886,542 members
Articles / Desktop Programming / ATL
Article

cowhere - display COM component location and details, given a ProgID

Rate me:
Please Sign up or sign in to vote.
4.23/5 (6 votes)
17 Feb 20021 min read 90.9K   1K   21   8
Utility to display location and other details of a COM component, given a CLSID in either ProgID or GUID form.

Sample Image - cowhere.gif

About cowhere

I have been wanting a utility to display the path of a COM component given a ProgID. I was spelunking for something else and I ran across Hugh Brown's CoWhereIs utility. I didn't find the source, so I whipped a quick version of a similar utility, cowhere. 'cowhere' will display information in the registry about the COM component represented by the CLSID. It will also check to see if the file containing the component is present.

Usage

cowhere <clsid> [/create]

where <clsid> can be either a ProgID or a CLSID GUID and /create attempts to instantiate the component.

Examples:

C:\>cowhere word.application
CLSID: {000209FF-0000-0000-C000-000000000046} "Microsoft Word"
  InprocHandler32: "ole32.dll"
  InProcServer32: 
   "E:\Program Files\Common Files\Symantec Shared\Script Blocking\scrblock.dll"
  LocalServer32: "E:\PROGRA~1\MICROS~3\Office\WINWORD.EXE  
    /Automation" ("E:\Program Files\Microsoft Office\Office\WINWORD.EXE  ")
      [LocalServer32]: (value type not supported)
  ProgID: "Word.Application.9"
  VersionIndependentProgID: "Word.Application"


C:\>cowhere {00000293-0000-0010-8000-00AA006D2EA4}
CLSID: {00000293-0000-0010-8000-00AA006D2EA4} "ADODB.Connection"
  InprocServer32: "E:\Program Files\Common Files\System\ADO\msado10.dll"
      [ThreadingModel]: "Apartment"
  ProgID: "ADODB.Connection.1"

Current limitations

This should work under 95/98/ME/W2K/XP, but has only been tested under NT/W2K/XP. If anyone else could test it under 95/98/ME and give me feedback, I would appreciate it. I updated the problem with GetLongPathName so that it works on NT, where this kernel32 proc is not available.

Disclaimer

THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR HIS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Terms and conditions of use

cowhere is free for non-commercial use.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralThe return of CoWhereIs Pin
bearskin30-Aug-09 12:47
bearskin30-Aug-09 12:47 
GeneralRe: The return of CoWhereIs Pin
Glenn Carr20-Oct-09 4:55
Glenn Carr20-Oct-09 4:55 
GeneralAmazing! Pin
manglani_Romil24-Aug-05 19:33
manglani_Romil24-Aug-05 19:33 
General[Suggestion] Support typelib id lookup Pin
16-Jun-02 21:25
suss16-Jun-02 21:25 
GeneralWINNT Pin
13-Feb-02 5:03
suss13-Feb-02 5:03 
GeneralRe: WINNT Pin
Glenn Carr13-Feb-02 9:05
Glenn Carr13-Feb-02 9:05 
GeneralRe: WINNT Pin
Franz R.13-Feb-02 21:24
professionalFranz R.13-Feb-02 21:24 
GeneralRe: WINNT (fixed) Pin
Glenn Carr14-Feb-02 3:15
Glenn Carr14-Feb-02 3:15 

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.