Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CLSID of the COM server
Message
 
To
21/07/2004 22:07:51
Suhas Hegde
Dental Surgeon
Sirsi, India
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00926434
Message ID:
00928178
Views:
29
>Hi Rick,
>Thanx Got it.
>
>One more thing.
>
>when a com server is built and is to be registered on another system (through regsvr32) does the clsid change to that of the development system or is the same ?

A ClassId is assigned when the server is compiled. From then on that ID stays the same and doesn't change. That's the whole point of a GUID <g>...

+++ Rick ---


>
>Suhas
>
>
>>Suhas,
>>
>>
>>You can COMCLASSINFO:
>>
>>
>>o = CREATEOBJECT("wwHelp.wwhelp")
>>? COMCLASSINFO(o,4)
>>
>>
>>If you don't have a COM reference but you want to do the look up by class ID you can look in the registry by doing something like this (you'll need registry routines to do this which are not included here):
>>
>>
>>**************************************************
>>FUNCTION IsCOMObject
>>*********************
>>*** Function: Checks to see if a COM object
>>***           or ActiveX control exists
>>***   Assume: Uses wwAPI
>>***     Pass: lcProgId   - Prog Id of the Class
>>***           lcClassId  - (Optional) If passed in
>>***                        by reference gets ClassId
>>***           lcClassDescript - (Optional) by ref
>>***   Return: .T. or .F.
>>*****************************************************
>>LPARAMETER lcProgId,lcClassId, lcClassDescript
>>
>>IF EMPTY(lcProgId)
>>   RETURN .F.
>>ENDIF
>>
>>loAPI = CREATE("wwAPI")
>>
>>*** Retrieve ClassId and Server Name
>>lcClassId =  ;
>>   loAPI.ReadRegistryString(HKEY_CLASSES_ROOT,;
>>                            lcProgId + "\CLSID",;
>>                            "")
>>IF ISNULL(lcClassId)
>>   lcClassId = ""
>>   lcClassDescription = ""
>>   RETURN .F.
>>ENDIF
>>
>>lcClassDescript = ;
>>   loAPI.ReadRegistryString(HKEY_CLASSES_ROOT,;
>>                            lcProgId,"")
>>
>>IF ISNULL(lcClassDescript)
>>   lcClassDescript = ""
>>ENDIF
>>
>>RETURN .T.
>>
>>
>>
>>
>>+++ Rick ---
>>
>>>Hi,
>>>
>>>I have created a COM server and works to my satisfaction. I want to know how can I get the CLSID of the same thorugh VFP . I mean how can I store the CLSID into the server and then ask windows to use the same for registration ? OR let the server assign it one but the same must be returned when the property is quiered ?
>>>
>>>ox = createobject("myserver.myserver")
>>>?ox.clsid && must return the CLSID of the server.
>>>
>>>I can check it through Racmgr32.exe but would like to get it from VFP.
>>>
>>>Thanx.
>>>
>>>Suhas.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform