資源簡介
接口函數說明
/*=============================================================================
函數名: TP_Configuration
;
功 能:動態庫初始化配置, 完成門鎖類型選擇/發卡器連接等
輸 入:lock_type -- 門鎖類型(也就是使用的卡片類型): 4-RF57門鎖; 5-RF50門鎖
輸 出: 無
返回值:錯誤類型
=============================================================================*/
int __stdcall TP_Configuration(int lock_type);
/*=============================================================================
函數名: TP_MakeGuestCardEx
;
功 能:制作賓客卡
輸 入:room_no -- 門鎖號: 字符串, 例如 "1.2.8102"等
checkin_time -- 入住時間: 預留. 制卡時入住時間被強制為當前時間!!!
checkout_time -- 預離時間: 年月日時分秒, 字符串格式 "YYYY-MM-DD hh:mm:ss"
iflags -- 賓客卡選項, 一般置0. iflags的各種賦值解釋如下:
1: 表示允許開反鎖
8: 表示復制卡, 不頂替前卡(可以跟之前發的卡片一起用, 允許一個房間發多張卡片)
32: 表示一次性開門, 開門后失效
128: 表示檢測卡片的入住時間(如果卡片入住時間 > 門鎖當前時間, 則不能開門, 不建議用這個選項)
上述各屬性值可以相加進行組合.
如果iflags ==0, 表示會頂替前卡,刷卡后之前的卡片失效; 不是一次性開門卡; 不檢測卡片的入住時間
輸 出: card_snr -- 卡號: 字符串, 至少預分配20字節
例 子1: room_no="1.2.8102", SDateTime="", EDateTime="2008-06-07 12:00:00"
iFlags=8 !!!!!!!!(復制卡)
返回值:錯誤類型
說明: Room要輸入 門鎖號!! 其格式視門鎖管理軟件而定, 請查看門鎖管理軟件的"客房設置"界面. 如果門鎖管理軟件中沒有門鎖號,
則請輸入房號.
=============================================================================*/
int __stdcall TP_MakeGuestCardEx(char *card_snr, char *room_no, char *checkin_time,char *checkout_time, int iflags);
/*=============================================================================
函數名: TP_ReadGuestCardEx
;
功 能:讀賓客卡信息
輸 入:無。
輸 出: card_snr -- 卡號: 字符串, 至少預分配20字節
room_no -- 房號: 字符串, 至少預分配20字節
checkin_time -- 入住時間: 年月日時分秒, 字符串格式 "YYYY-MM-DD hh:mm:ss", 至少預分配30字節
checkout_time -- 預離時間: 年月日時分秒, 字符串格式 "YYYY-MM-DD hh:mm:ss", 至少預分配30字節
iFlags -- 卡片標志字節
返回值:錯誤類型
=========================================
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?System.Runtime.InteropServices;
namespace?CSharpDemo
{
????public?partial?class?IDD102?:?Form
????{
????????public?IDD102()
????????{
????????????InitializeComponent();
????????}
????????int?st?=?0;
????????#region?調用動態庫函數
????????[DllImport(“LockSDK.dll“?EntryPoint?=?“TP_Configuration“)]
????????public?static?extern?int?TP_Configuration(Int16?LockType);
????????[DllImport(“LockSDK.dll“?EntryPoint?=?“TP_MakeGuestCard“)]
????????public?static?extern?int?TP_MakeGuestCard(StringBuilder?card_snrstring?room_nostring?checkin_timestring?checkout_timeInt16?iflags);
????????[DllImport(“LockSDK.dll“?EntryPoint?=?“TP_ReadGuestCard“)]
????????public?static?extern?int?TP_ReadGuestCard(StringBuilder?card_snrStringBuilder?room_noStringBuilder?checkin_timeStringBuilder?checkout_time);
????????[DllImport(“LockSDK.dll“?EntryPoint?=?“TP_CancelCard“)]
????????public?static?extern?int?TP_CancelCard(StringBuilder?card_snr);
????????[DllImport(“LockSDK.dll“?EntryPoint?=?“TP_GetCardSnr“)]
????????public?static?extern?int?TP_GetCardSnr(StringBuilder?card_snr);
????????#endregion
????????private?void?LockSDK_Demo_Load(object?sender?EventArgs?e)
????????{
????????????
????????????Language.g_SetFormStrings_Ex(this);
????????????this.txtRoomNo.Text?=?“001.002.00028“;
????????????this.txtInTime.Text?=?DateTime.Now.ToString(“yyyy-MM-dd?HH:mm:ss“);
????????????this.txtOutTime.Text?=?DateTime.Now.AddDays(1).ToString(“yyyy-MM-dd“)?+?“?12:00:00“;
????????}
????????#region?公共方法
????????private?void?CheckErr(int?iret)
????????{
????????????switch(iret)
????????????{
????????????????case?1:
????????????????????MessageBox.Show(Language.g_LoadString_Ex(“IDS_STRING_SUCCESS“)?Language.g_LoadString_Ex(“IDS_STRING_MSG“)MessageBoxButtons.OK?MessageBoxIcon.Information);
????????????????????break;
????????????????case?-1:
????????????????????MessageBox.Show(Language.g_LoadString_Ex(“IDS_STRING_ERROR_NOCARD“)?Language.g_LoadString_Ex(“IDS_STRING_MSG“)?MessageBoxButtons.OK?MessageBoxIcon.Information);
????????????????????break;
????????????????case?-2:
????????????????????MessageBox.Show(Language.g_LoadString_Ex(“IDS_STRING_ERROR_NOREADE“)?Language.g_LoadString_Ex(“IDS_STRING_MSG“)?MessageBoxButtons.OK?MessageBoxIcon.Information);
????????????????????break;
????????????????case?-3:
????????????????????MessageBox.Show(Language.g_LoadString_Ex(“IDS_STRING_ERROR_INVALIDCARD“)?Language.g_LoadString_Ex(“IDS_STRING_MSG“)?MessageBoxButtons.OK?MessageBoxIcon.Information);
????????????????????break;
????????????????case?-4:
????????????????????MessageBox.Show(Language.g_LoadString_Ex(“IDS_STRING_ERROR_CARDTYPE“)?Language.g_LoadString_Ex(“IDS_STRING_MSG“)?MessageBoxButtons.OK?MessageBoxIcon.Information);
????????????????????break;
????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????4227??2012-12-04?09:46??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\Backup\CSharpDemo\CSharpDemo.csproj
?????文件????????557??2012-12-03?15:06??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\Backup\CSharpDemo\CSharpDemo.csproj.user
?????文件???????7394??2012-12-28?09:33??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\Backup\CSharpDemo\IDD102.cs
?????文件??????10678??2012-12-28?09:33??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\Backup\CSharpDemo\IDD102.Designer.cs
?????文件??????11772??2012-12-28?09:33??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\Backup\CSharpDemo\IDD102.resx
?????文件???????4840??2012-12-24?15:47??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\Backup\CSharpDemo\Language.cs
?????文件????????470??2012-11-29?09:30??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\Backup\CSharpDemo\Program.cs
?????文件???????1176??2012-06-22?16:10??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\Backup\CSharpDemo\Properties\AssemblyInfo.cs
?????文件???????2876??2012-06-22?16:10??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\Backup\CSharpDemo\Properties\Resources.Designer.cs
?????文件???????5612??2012-06-22?16:10??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\Backup\CSharpDemo\Properties\Resources.resx
?????文件???????1095??2012-06-22?16:10??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\Backup\CSharpDemo\Properties\Settings.Designer.cs
?????文件????????249??2012-06-22?16:10??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\Backup\CSharpDemo\Properties\Settings.settings
?????文件???????3774??2012-06-26?16:36??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\Backup\CSharpDemo\sn.ico
?????文件????????919??2012-06-22?16:10??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\Backup\CSharpDemo.sln
????..A..H.?????25088??2012-12-28?09:33??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\Backup\CSharpDemo.suo
?????文件????????396??2016-03-01?09:30??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\CSharpDemo\bin\Debug\cardRecord.ini
?????文件??????90112??2010-09-03?07:25??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\CSharpDemo\bin\Debug\DataReader.dll
?????文件??????11932??2015-11-02?19:42??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\CSharpDemo\bin\Debug\Defines.h
?????文件??????32768??2010-09-03?07:25??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\CSharpDemo\bin\Debug\des.dll
?????文件??????32768??2010-09-03?07:25??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\CSharpDemo\bin\Debug\EasyD12_500.dll
?????文件??????53248??2010-09-03?07:25??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\CSharpDemo\bin\Debug\EasyZUSBMulti.dll
?????文件?????102400??2013-03-18?19:28??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\CSharpDemo\bin\Debug\ExtensionTools.exe
?????文件??????45056??2012-12-21?20:00??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\CSharpDemo\bin\Debug\HOOKS_M1.dll
?????文件??????49152??2016-02-01?11:31??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\CSharpDemo\bin\Debug\HSDApp.dll
?????文件??????11943??2016-02-17?17:47??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\CSharpDemo\bin\Debug\Languages(RMC)\Chinese.INI
?????文件??????12290??2016-02-18?08:21??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\CSharpDemo\bin\Debug\Languages(RMC)\English.INI
?????文件????????712??2016-03-01?09:30??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\CSharpDemo\bin\Debug\LockCard.dll
?????文件????????621??2016-03-01?09:30??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\CSharpDemo\bin\Debug\LockInfo.dll
?????文件?????217088??2012-12-28?14:42??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\CSharpDemo\bin\Debug\LockReg.exe
?????文件??????98304??2016-02-16?09:00??LockSDK?V3.3酒管軟件接口_160301\C#?2008?Demo_V3.3\CSharpDemo\bin\Debug\LockSDK.dll
............此處省略615個文件信息
- 上一篇:高等代數考研教案北大3版
- 下一篇:北大青鳥 accp S1結業考試試題答案及試題2
評論
共有 條評論