Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Queries whether a component is ready to have its ComponentEntry.InitInterfaces function called to initialise it's interfaces.

Syntax

Code Block
languagecpp
bool QueryInitInterfaces(
ComponentEntry* Entry, 
bool bLastChance
);

 

Parameters

Vardef
NameEntry
TypeMod*
Linkedtrue
TypeComponentEntry
StyleParameter

Pointer to the ComponentEntry that is being queried for its interface initialisation status.

Vardef
NamebLastChance
Typebool
StyleParameter

Whether this is the last chance the ComponentEntry has to respond. QueryInitInterfaces will no longer be called you return from this invocation.

Returnvalue
Typebool

Whether the specified component is ready to have its interfaces initialised via a call to InitInterfaces 

 

Remarks

QueryInitInterfaces is typically used to return TRUE once a module has bound to every other interface that it depends on. For example, you might create a module that requires Events and Data for it to function so you would continue to return FALSE from QueryInitInterfaces until you have been notified that both of those interfaces have been published.

QueryInitInterfaces may be called numerous times at various points during initialisation of WinGate modules and components.

Examples

Code Block
bool QueryInitInterfaces(ComponentEntry* entry, bool bLastChance)
{
	return (bBoundToDataComponent && bBoundToEventsComponent) || bLastChance;
}

 

Requirements

See Also

QueryInitInterfacesFunc

Live Template
templateAPI Function