IC Imaging Control C++

InitLibrary Method

InitLibrary Method

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

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.


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


Namespace: DShowLib


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

Get in touch with us

About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us