Opening and Closing the Device

INFINICAM UC-1 SDK Opening and Closing the Device

Initializing the library

Initialize the library to use PUCLIB functions.

PUCRESULT result;

result = PUC_Initialize();
if (PUC_CHK_FAILED(result))
{
return 0;
}

※Execute initialization only once within a process. It is not necessary to perform initialization multiple times..

※It is not necessary to explicitly perform termination. All termination operations are automatically performed when a process is terminated.

※Initialization is required even for functions that do not require a connection to the device (decode processing, etc.).

Searching for the device

Search for the device before opening it.

result = PUC_DetectDevice(&detectInfo);
if (PUC_CHK_FAILED(result))
{
return 0;
}
if (detectInfo.nDeviceCount == 0)
{
return 0;
}

Opening the device

Once the device is found, specify the device ID to open it.
The device handle will be returned when the device is successfully opened.
The device handle will be required when using functions.

PUC_HANDLE hDevice = NULL;

result = PUC_OpenDevice(detectInfo.nDeviceNoList[0], &hDevice);
if (PUC_CHK_FAILED(result))
{
return;
}

Closing the device

An opened device must always be closed.

result = PUC_CloseDevice(hDevice);
if (PUC_CHK_FAILED(result))
{
return;
}

> INFINICAM Product page

ハイスピードカメラの選定・販売・レンタルから
撮影・解析までお任せください

お問い合わせは
こちらから

専門知識を持った担当者が
お客様の課題や要件をお伺いします

無償デモ撮影・解析
の申し込み

ハイスピードカメラの動作や
必要性を事前に検証できます

製品価格入り資料を
ダウンロード

製品のカタログや活用事例集を
無料でダウンロードできます

電話でお問い合わせ

平日9:00~18:00

03-3518-6271