Accessing the LZNV COM Object
8.2.1.1 Accessing the LZNV COM Object
8.2.1.1 Using the LZNV COM Object
This sample source code is available in function wmain from LZNV_COM_Obj_Client_Tester.cpp [Project VC++CmdLineClient_for_LZNV_COM Client Project files]
int wmain(int argc, wchar_t **argv)
{
CoInitialize(NULL);
// [...]
pLZNV_COM_Object_obj.CreateInstance(L"LZNV.SDK.COM.Obj");
if (!pLZNV_COM_Object_obj)
{
MessageBox(0, L"COM Object registered? LZNV.COM.Object interface not found!", L"Error! Interface not found! ", MB_OK);
return 1;
}
// [...]
if (encode)
{
_process_encode_file(pLZNV_COM_Object_obj, _lz_method, _lz_memory, _wchr_file_in, _wchr_file_out);
}
if (decode)
{
_process_decode_file(pLZNV_COM_Object_obj, _wchr_file_in, _wchr_file_out);
}
// [...]
}