[This is preliminary documentation and subject to change.]
The StiCreateInstance function is used to obtain a pointer to the IStillImage interface. All other Still Image functions are called through the pointer obtained from this function. Calling this function can be done instead of calling CoCreateInstance and Initialize.
HRESULT StiCreateInstance(
HINSTANCE hinst,
DWORD dwVer,
PSTI *ppSti,
LPUNKNOWN punkOuter
);
STI uses this value to determine whether the application or DLL has been certified.
Note If aggregation is requested, the object returned in *ppSti is a pointer to an IUnknown rather than an ISti, as required by COM aggregation.
If the function succeeds, the return value is S_OK.
If the function fails, the return value is the appropriate COM error.
Calling this function with punkOuter = NULL is equivalent to creating the object with CoCreateInstance(&CLSID_Sti, punkOuter, CLSCTX_INPROC_SERVER, &IID_ISti, ppSti); then initializing it with Initialize.
Calling this function with punkOuter != NULL is equivalent to creating the object with CoCreateInstance(&CLSID_Sti, punkOuter, CLSCTX_INPROC_SERVER, &IID_IUnknown, ppSti). The aggregated object must be initialized manually.
Windows NT: Requires version 5.0 or later.
Windows: Requires Windows 98.
Windows CE: Unsupported.
Header: Declared in sti.h.
Import Library: Included as a resource in sti.dll.
Still Image Overview, Making An Application Still Image-Aware