How do you register a COM Component?

All COM Components (COM Servers) must be listed in the system registry.  A variety of information is kept there, but the most important is the definition of the PROGID and the CLSID.  These are the terms used to uniquely identify the component, so that the operating system can locate them for a client program that wants to use their services.  PowerBASIC COM DLL's provide self-registration and unregistration services by automatically exporting two Subs:

Declare Function DllRegisterServer   alias "DllRegisterServer"   as long
Declare Function DllUnregisterServer alias "DllUnregisterServer" as long

You could write a small executable program to call these registration functions, or use the Microsoft registration utility (REGSVR32.EXE) for that purpose.  REGSVR32.EXE is included with Windows.

 

See Also

What is an object, anyway?

Just what is COM?

What is a COM component?

How do you publish an object?

What is a Class Method?