Live Template |
---|
template | API Function Template |
---|
|
Registers a new component with the host framework. Typically you will call this from within Initialise or InitialiseGUI.
Syntax
Code Block |
---|
|
int RegisterComponent(
HostModuleHandle module,
ComponentEntry* entry
); |
Parameters
Vardef |
---|
Name | module |
---|
TypeMod | * |
---|
Linked | true |
---|
Type | HostModuleHandle |
---|
Style | Parameter |
---|
|
Internally managed handle of the module to register this component under. Calls to Initialise and InitialiseGUI are passed a HostModuleHandle that is created and managed by the framework. Pass this same handle to RegisterComponent. e.g. |
Code Block |
---|
|
static ComponentEntry ourComponent;
extern "C" __declspec(dllexport) int Initialise(HostAPI* pHost, HostModuleHandle hModule, LPCWSTR szRegistryPath)
{
// Initialisation of ourComponent removed for brevity
return RegisterComponent(hModule, &ourComponent);
} |
Vardef |
---|
Name | entry |
---|
TypeMod | * |
---|
Linked | true |
---|
Type | ComponentEntry |
---|
Style | Parameter |
---|
|
Pointer to the ComponentEntry object that you wish to register. |
Returnvalue |
---|
|
Non-zero if the component is registered successfully, or zero if registration failed. |
See Also
ComponentEntry
HostModuleHandle