Click here to Skip to main content
15,913,313 members
Home / Discussions / COM
   

COM

 
QuestionHow to send union structures thru rpc in DCOm Pin
Benny M Kurian20-May-04 2:36
Benny M Kurian20-May-04 2:36 
Generalamazon upload need help.... Pin
Sumit Kapoor19-May-04 19:56
Sumit Kapoor19-May-04 19:56 
GeneralUsing a flash ActiveX control in Win32 Pin
Pablo Hernandez Valdes18-May-04 16:58
Pablo Hernandez Valdes18-May-04 16:58 
GeneralRe: Using a flash ActiveX control in Win32 Pin
Andrew Quinn AUS19-May-04 0:54
Andrew Quinn AUS19-May-04 0:54 
GeneralRegistering a COM server dll Pin
Robertcoder18-May-04 7:50
Robertcoder18-May-04 7:50 
GeneralRe: Registering a COM server dll Pin
Giles18-May-04 8:15
Giles18-May-04 8:15 
GeneralRe: Registering a COM server dll Pin
Robertcoder18-May-04 8:23
Robertcoder18-May-04 8:23 
GeneralRe: Registering a COM server dll Pin
Bob Wood19-May-04 1:13
Bob Wood19-May-04 1:13 
In the function DllRegisterServer (which is the function called by regsvr32.exe) you need to create registry entries for each of your "creatable" interfaces (those that you use IClassFactory to create). To do this you need to have the following string values:

* A string representation of the CLSID of the Interface (in the form {000209FF-0000-0000-C000-000000000046})
* A "Friendly" name for the interface
* A version independent program identifier i.e. Word.Application
* A version dependent program identifier i.e. Word.Application.11
* The file pathname of your DLL (you can get this by calling GetModuleFileName Win32 API)

All the enries that you need to create in the registry should be under HKEY_CLASSES_ROOT. In the following I have used "YOURCLSID" for the CLSID of your interface, "FRIENDLY" for the friendly name, "VIPROGID" for the Version Independant ProgID, "VDPROGID" for the Version Dependant ProgID and "PATHNAME" as the path to your DLL:

First create the key using the API call RegCreateKeyEx:
HKEY_CLASSES_ROOT\CLSID\YOURCLSID Default:= FRIENDLY

and then add the following values using the API RegSetValueEx:
HKEY_CLASSES_ROOT\CLSID\YOURCLSID\InProcServer Value := PATHNAME
HKEY_CLASSES_ROOT\CLSID\YOURCLSID\ProgID Value := VDPROGID
HKEY_CLASSES_ROOT\CLSID\YOURCLSID\VersionIndependentProgID Value := VIPROGID

Next create the following key:
HKEY_CLASSES_ROOT\VIPROGID Default := FRIENDLY

and add the following values:
HKEY_CLASSES_ROOT\VIPROGID\CLSID Value := YOURCLSID
HKEY_CLASSES_ROOT\VIPROGID\CurVer Value:= VDPROGID

Next create the following key:
HKEY_CLASSES_ROOT\VDPROGID Default := FRIENDLY

and add the following value:
HKEY_CLASSES_ROOT\VDPROGID\CLSID Value := YOURCLSID

DllUnregisterServer merely involves removing all the keys and values created above.

Hope this helps
GeneralRe: Registering a COM server dll Pin
Robertcoder19-May-04 4:15
Robertcoder19-May-04 4:15 
Generalcall a managed COM object from an unmanaged c++ Pin
SamDav18-May-04 0:14
sussSamDav18-May-04 0:14 
Generali cannot register activeX control on registry. Pin
ekklesia14-May-04 20:01
ekklesia14-May-04 20:01 
GeneralRe: i cannot register activeX control on registry. Pin
Andrew Quinn AUS17-May-04 5:48
Andrew Quinn AUS17-May-04 5:48 
GeneralQueryInterface() Pin
skruss14-May-04 13:40
skruss14-May-04 13:40 
GeneralRe: QueryInterface() Pin
ekklesia15-May-04 5:44
ekklesia15-May-04 5:44 
GeneralRe: QueryInterface() Pin
skruss25-May-04 11:59
skruss25-May-04 11:59 
GeneralRe: QueryInterface() Pin
Jörgen Sigvardsson15-May-04 13:21
Jörgen Sigvardsson15-May-04 13:21 
GeneralBeginning with COM or COM+ Pin
Mekong River13-May-04 15:48
Mekong River13-May-04 15:48 
GeneralUSES_CONVERSION Pin
monrobot1313-May-04 11:35
monrobot1313-May-04 11:35 
GeneralRe: USES_CONVERSION Pin
Andrew Quinn AUS17-May-04 5:22
Andrew Quinn AUS17-May-04 5:22 
GeneralRe: USES_CONVERSION Pin
Roger Stoltz17-May-04 11:35
Roger Stoltz17-May-04 11:35 
GeneralRe: USES_CONVERSION Pin
Steve S17-May-04 23:26
Steve S17-May-04 23:26 
GeneralRe: USES_CONVERSION Pin
Roger Stoltz18-May-04 0:20
Roger Stoltz18-May-04 0:20 
GeneralRe: Thanks Everyone Pin
monrobot1320-May-04 6:49
monrobot1320-May-04 6:49 
GeneralWriting files simultaneously Pin
13-May-04 0:14
suss13-May-04 0:14 
GeneralInterface Methods Pin
monrobot1312-May-04 18:47
monrobot1312-May-04 18:47 

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.