?? mydll.cpp
字號:
#include "stdafx.h"
#include "mydll.h"
#include "USB.H"
static USBDevice JLJC;
/*
temp = Device_Report[7] - 0x30;
temp = temp * 10 + Device_Report[8] - 0x30;
temp = temp * 10 + Device_Report[9] - 0x30;
temp = temp * 10 + Device_Report[10] - 0x30;
temp = temp * 10 + Device_Report[11] - 0x30;
TempID = temp;
temp = Device_Report[4] - 0x41;
temp = temp * 100 + Device_Report[5] - 0x41;
temp = temp * 100 + Device_Report[6] - 0x41;
CloseHandle(DeviceHandler);
*/
extern "C"__declspec(dllexport) bool GetReport(unsigned char report[])
{
int temp;
if(JLJC.GetDeviceHandler())
{
//temp = temp * 10 + Device_Report[8] - 0x30;
JLJC.WriteCommandToDevice(4);
Sleep(10);
return true;
}
else
return false;
}
extern "C"__declspec(dllexport) unsigned long GetDeviceID0(void)
{
unsigned long TempID;
if(JLJC.GetDeviceHandler())
{
JLJC.WriteCommandToDevice(4);
Sleep(10);
TempID = JLJC.ReadIDData0();
return(TempID);
}
else
return 0;
}
extern "C"__declspec(dllexport) unsigned long WriteID0(void)
{
if(JLJC.GetDeviceHandler())
{
JLJC.WriteCommandToDevice(6);
Sleep(10);
return 1;
}
else
return 0;
}
extern "C"__declspec(dllexport) void WritePara(unsigned long x)
{
JLJC.TempID = x;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -