InitLibrary Method

This function initializes the IC Imaging Control class library.
Syntax:
bool    InitLibrary( COINIT coinitmode = COINIT_MULTITHREADED );
Parameter Description
coinitmode

Specifies the parameter to pass to CoInitializeEx. If you want to initialize the library without initializing COM use InitLibraryWithoutCOM When you do not specify this parameter COINIT_MULTITHREADED is used.

Return value:

The method returns true on success, otherwise it returns false.

Remarks:

InitLibrary or InitLibraryWithoutCOM must be called at the start of an application. It must be called once before any other classes of IC Imaging Control can be used. When you do not specify the coinitmode parameter, COM is initialized with COINIT_MULTITHREADED. For every call to InitLibrary there should be a corresponding call to ExitLibrary

Information:

Namespace: DShowLib

Sample:

This example demonstrates how to use InitLibrary.

if( !DShowLib::InitLibrary() )
{
    return false;
}

This example demonstrates how to use InitLibrary when you already called CoInitialize

OleInitialize(); // or  CoInitialize( 0 );

// ...

if( !DShowLib::InitLibraryWithoutCOM() )
{
    return false;
}

See also: InitLibrary, InitLibraryWithoutCOM

<< Functions