Solved

ProgIDFromCLSID ?

Posted on 2000-02-21
7
791 Views
Last Modified: 2013-11-20
Dear Friends,
Supposing i have a CLSID-->
783CD4E2-9D54-11cf-B8EE-00608CC9A71F
I want to extract the ProgID via the API
******************************
ProgIDFromCLSID(
 REFCLSID clsid,  
//CLSID forwhich the ProgID is requested
  LPOLESTR * lplpszProgID
//Address of output variable that //receives a  pointer to the requested //ProgID string
)
*********************************
How do i load the Parameter CLSID?
Have a Nice Day
Bye
0
Comment
Question by:Monk100
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 1

Expert Comment

by:timop
ID: 2545201
Hi,

The parameter CLSID you can either define as constant
// 783CD4E2-9D54-11cf-B8EE-00608CC9A71F
const CLSID myCLSID = { 0x783CD4E2, 0x9D54, 0x11cf, { 0xB8, 0xEE, 0x0, 0x60, 0x8c, 0xc9, 0xa7, 0x1f} };
LPOLESTR lpszProgID = NULL;  
ProgIDFromCLSID( myCLSID, &lpszProgID );
CoTaskMemFree(lpszProgID);

or
convert string {783CD4E2-9D54-11cf-B8EE-00608CC9A71F} to CLSID
CLSID clsid;
LPOLESTR strCLSID = L"{783CD4E2-9D54-11cf-B8EE-00608CC9A71F}";
CLSIDFromString( strCLSID, &clsid );

LPOLESTR lpszProgID = NULL;  
ProgIDFromCLSID( clsid, &lpszProgID );
CoTaskMemFree(lpszProgID);

Bye.
0
 
LVL 5

Expert Comment

by:Wyn
ID: 2545215
REFCLSID clsID;
LPTSTR  pszProgID;
ProgIDFromCLSID(clsID, &pszProgID);

Here you got the ProgID.
0
 
LVL 5

Expert Comment

by:Wyn
ID: 2545216
Should be a comment.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Monk100
ID: 2545364
It Works.
Thanks a lot Mr Timop for answering the question.
I extracted the value into a CString-->
**************
LPOLESTR lpszProgID = NULL;    
ProgIDFromCLSID( clsid, &lpszProgID );

CString str=lpszProgID;
AfxMessageBox(str);
**************************
Mr Wyn,Thanks to you also for commenting
Bye
Have a Nice Day, Sirs
0
 
LVL 11

Expert Comment

by:mikeblas
ID: 2547586
Looks like timop should submit an answer so this question can be graded and taken from the list of active questions.

..B ekiM
0
 
LVL 1

Accepted Solution

by:
timop earned 50 total points
ID: 2552298
Any points for me :-)?

Thanks,
timop.
0
 

Author Comment

by:Monk100
ID: 2553983
Thanks Mr Timop,
I don't have points else i would have increased my points
Have a Nice Day
Bye
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question