﻿

{"id":15831,"date":"2023-10-11T16:02:31","date_gmt":"2023-10-11T07:02:31","guid":{"rendered":"https:\/\/www.bitstrong.com\/jp\/?p=15831"},"modified":"2023-12-13T09:52:34","modified_gmt":"2023-12-13T00:52:34","slug":"card-based-access-control-enabling-capture-linkage","status":"publish","type":"post","link":"https:\/\/www.bitstrong.com\/jp\/card-based-access-control-enabling-capture-linkage\/","title":{"rendered":"\u3010Card-Based Access Control\u3011Enabling Capture Linkage"},"content":{"rendered":"<p><strong><span style=\"font-size: 18pt;\">\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0<\/span><\/strong><\/p>\n<p>\/\/<br \/>\n\/\/ Device Network SDK (Card-Based Access Control)<br \/>\n\/\/ Alarm and Event Receiving<br \/>\n\/\/ Configure Access Control Event<br \/>\n\/\/ Sample Code for Enabling Capture Linkage<br \/>\n\/\/<br \/>\n#include &lt;stdio.h&gt;<br \/>\n#include &lt;iostream&gt;<br \/>\n#include &#8220;Windows.h&#8221;<br \/>\n#include &#8220;HCNetSDK.h&#8221;<br \/>\nusing namespace std;<\/p>\n<p>BOOL CALLBACK MSesGCallback(LONG lCommand, NET_DVR_ALARMER *pAlarmer, char *pAlarmInfo, DWORD dwBufLen, void* pUser)<br \/>\n{<br \/>\n\/\/As the operations with long time comsumption are not allowed in the callback function,<br \/>\n\/\/do not call the API of HCNetSDK.DLL in the callback function.<br \/>\n\/\/The following code is for reference only, actually, processing data in the callback function is not suggested.<br \/>\n\/\/for example, process in the message response function as PostMessage<br \/>\nswitch (lCommand)<br \/>\n{<br \/>\ncase COMM_ALARM_ACS:\/\/Alarm information of access controller<br \/>\n{<br \/>\nNET_DVR_ACS_ALARM_INFO struAcsAlarmInfo = {0};<br \/>\nmemcpy(&amp;struAcsAlarmInfo, pAlarmInfo, sizeof(struAcsAlarmInfo));<\/p>\n<p>char szTime[50] = {0};\/\/Alarm time<br \/>\nsprintf(szTime, &#8220;%4d-%2d-%2d %2d:%2d:%2d&#8221;, struAcsAlarmInfo.struTime.dwYear,<br \/>\nstruAcsAlarmInfo.struTime.dwMonth, struAcsAlarmInfo.struTime.dwDay, struAcsAlarmInfo.struTime.dwHour,<br \/>\nstruAcsAlarmInfo.struTime.dwMinute, struAcsAlarmInfo.struTime.dwSecond);<\/p>\n<p>char szCardNo[50] = {0};\/\/Card No.<br \/>\nsprintf(szCardNo, &#8220;CardNo:%s&#8221;, (char *)struAcsAlarmInfo.struAcsEventInfo.byCardNo);<br \/>\nBYTE byCardType = struAcsAlarmInfo.struAcsEventInfo.byCardType;\/\/Card type<br \/>\nDWORD dwCardReaderNo = struAcsAlarmInfo.struAcsEventInfo.dwCardReaderNo;\/\/Card reader No.<br \/>\nDWORD dwDoorNo = struAcsAlarmInfo.struAcsEventInfo.dwDoorNo;\/\/Door No.<\/p>\n<p>if (struAcsAlarmInfo.dwPicDataLen &gt; 0 &amp;&amp; struAcsAlarmInfo.pPicData != NULL)<br \/>\n{<br \/>\nchar filename[128];<br \/>\nFILE *fSnapPic=NULL;<br \/>\nSYSTEMTIME t;<br \/>\nGetLocalTime(&amp;t);<br \/>\nchar chTime[128];<br \/>\nsprintf(filename,&#8221;%4.4d%2.2d%2.2d%2.2d%2.2d%2.2d%3.3d&#8221;,t.wYear,t.wMonth,t.wDay,<br \/>\nt.wHour,t.wMinute,t.wSecond,t.wMilliseconds);<\/p>\n<p>\/\/Save picture<\/p>\n","protected":false},"excerpt":{"rendered":"\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0 \/\/ \/\/ Device Network SDK (Card-Based Access Control) \/\/ Alarm and Event Receiving \/\/ Configure Access Control Event \/\/ Sample Code for Enabling ...","protected":false},"author":2,"featured_media":15936,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","footnotes":""},"categories":[107],"tags":[],"class_list":["post-15831","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-camera-connection"],"_links":{"self":[{"href":"https:\/\/www.bitstrong.com\/jp\/wp-json\/wp\/v2\/posts\/15831","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bitstrong.com\/jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bitstrong.com\/jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bitstrong.com\/jp\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bitstrong.com\/jp\/wp-json\/wp\/v2\/comments?post=15831"}],"version-history":[{"count":6,"href":"https:\/\/www.bitstrong.com\/jp\/wp-json\/wp\/v2\/posts\/15831\/revisions"}],"predecessor-version":[{"id":15837,"href":"https:\/\/www.bitstrong.com\/jp\/wp-json\/wp\/v2\/posts\/15831\/revisions\/15837"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bitstrong.com\/jp\/wp-json\/wp\/v2\/media\/15936"}],"wp:attachment":[{"href":"https:\/\/www.bitstrong.com\/jp\/wp-json\/wp\/v2\/media?parent=15831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bitstrong.com\/jp\/wp-json\/wp\/v2\/categories?post=15831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bitstrong.com\/jp\/wp-json\/wp\/v2\/tags?post=15831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}