HRESULT CreateInstance(IWizardPageContainer *pContainer, LPCTSTR type, I **ppObject)

This function is defined in IWizardPageContainer.h and provides a type-safe wrapper over the IWizardPageContainer->CreateInstance method—for example:

CreateInstance<IDirectory>(Container(), ID_Directory, &pDirectory);

This code creates a new ID_Directory component to retrieve the IDirectory interface of that component.

Related Topics

Helper Functions