Solved

Unable to register com server

Posted on 2002-03-12
5
271 Views
Last Modified: 2013-11-20
Hi,
Iam trying to register a COM server, But the client gives a message CLSID for the Registered ProgID is invalid.
I registered both the CLSID and ProgID.
Can any one of u help me?
Surya
0
Comment
Question by:surya_bh
  • 2
5 Comments
 

Expert Comment

by:Dreadknight
ID: 6858911
If you really want help,give more information about your problem.
0
 

Author Comment

by:surya_bh
ID: 6859360
Infact when i try to Register a server as a local server,
By writing the entiries viz.. progID and CLSID ,they are registered perfectly, but when i try to retrieve the CLSID in a client to open the server using a function CLSIDfromProgID, it returns an error "The Resitered CLSID for the ProgID is invalid.
I think this info is sufficient
0
 

Accepted Solution

by:
Dreadknight earned 50 total points
ID: 6859742
Maybe two things make it:
1:the function CoInitialize(NULL) is not called.
2:the ProgID is UNICODE, not ANSI
the following is some sample code,hope it help:

CLSID clsid;
CoInitialize(NULL);
WCHAR m_WCHAR[100];
MultiByteToWideChar(CP_ACP,0,"DAO.Relation.35",
 -1,m_WCHAR,100);
//here I get clsid of dao.relation
CLSIDFromProgID((const unsigned short*)m_WCHAR
          ,&clsid);
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now