Solved

ProgIDFromCLSID ?

Posted on 2000-02-21
7
751 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
  • 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Separate files macro - Errors on larger data set 18 69
dog bark java program 15 94
while loop over for loop 7 101
difference between String.subString() and String.subSequence() 6 193
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

806 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