CameraAgentPlugIn

under construction...

CameraAgentPlugIn class

variable

std::string strDeviceName_

device name or information

this member var. is loaded from dll after calling "OnInit" method automatically.

std::string strDllFilename_

dll's filename

if you use "Open" method that has no argument ver, you have to set this variable before your calling "Open" method.

Or not; you use "Open" method with filename, you don't need to care about this var.

HINSTANCE hLib_ [private]

handle of DLL

you don't need to care about this var.

public methods

CameraAgentPlugIn()

constructor

~CameraAgentPlugIn()

destructor

automatically calling "Close" method.

bool Open( LPCTSTR szDllFilename )

opens a dll file by specifying the filename of dll.

if succeeded the operation, it returns true. or not, returns false.

bool Open()

opens a dll file.

the filename of dll is supplied by the member variable "strDllFilename_" before calling. so you must set the var before calling.

if succeeded the operation, it returns true. or not, returns false.

bool isOpen()

returns the dll is already opened or not.

bool Close()

close the dll(device)

if you don't call this method, the destructor will call this method automatically.

so you'll no need to care of this method in almost cases.

bool OnInit( HWND hwndParent )

issue an initialization command to dll.

YOU MUST CALL THIS METHOD AFTER CALLING "Open" METHOD.

remember to check the return value is true or not. it's an important information. if the value is false, you can't use this dll currently.

HWND of parent window.

some type of dll (mainly "VfwReader.dll") has to be supplied the parent window handle. but almost DLLs don't need HWND, you specify it as NULL simply.

if succeeded the operation, it returns true. or not, returns false.

bool Capture( KImageRGB& a_image )

capture an image of the connected device.

the size of captured image is depends on the settings from option dialog or last calling of "SetResolution" method.

if succeeded the operation, it returns true. or not, returns false.

bool DoModalOptionDlg()

show an option dialog.

each dll has own option dialog for setting some parameters like resolution.

if succeeded the operation, it returns true. or not, returns false.

bool SetResolution( int width_, int height_ )

set a resolution of the device.

if succeeded the operation, it returns true. or not, returns false.

bool GetResolution( long* width_, long* height_ )

retrieve a resolution of the device.

if succeeded the operation, it returns true. or not, returns false.

private methods

bool OnDestroy()

notify the "finish" signal to the device.

this method is called by "Close" method automatically.

if succeeded the operation, it returns true. or not, returns false.

bool GetDllName()

retrieve an information for dll or device (it depends on dll).

this method is called by "Open" method automatically.

if succeeded the operation, it returns true. or not, returns false.

DLL Level Interface of CameraAgentPlugIn suit

All CameraAgentPlugIn DLLs have to implement some public functions.

This section describes how to implement the functions.

Under construction...

WDM Reader PlugIn

VfW Reader PlugIn

HTTP/JPEG Reader PlugIn

潟若若菴遵

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2021-09-21 (火) 10:42:09