资源简介
数据采集卡(ISA)驱动程序源代码,仅供参考

代码片段和文件信息
// Test_ISAINT.cpp
//
// Generated by DriverWizard version DriverStudio 3.0.0 (Build 1126)
//
// This console application demonstrates how to open a handle
// to a device in your driver and communicate with the driver
// using Read Write and DeviceIoControl calls as appropriate.
//
// This test program attempts to open the device with link name
// ISAINTDevice which corresponds to Unit 0 of the
// ISAINTDevice device class in the driver.
//
// You can build this application using the command line compiler with
// the following command:
//
// cl Test_ISAINT.cpp
//
#include
#include
#include
#include
#include “..\ISAINTioctl.h“
typedef void VOIDFUNC();
// Prototypes
void Usage(void);
void ShowIoctlValues(void);
// TODO:
// You can redefine the IOCTL handler prototypes as needed adding
// appropriate parameters that can be collected from the command line.
// To do this you must modify the command line parsing logic. An
// example of this is shown in comments throughout the test application.
//
//=== Parameterized IOCTL Example ===
// void Test_IOCTL_PARAMETERIZED(int nVal ULONG dwVal);
void Test_ISAINT_IOCTL_READ_PORT(void);
void Test_ISAINT_IOCTL_WRITE_PORT(void);
void Test_ISAINT_IOCTL_INTEVENT(void);
void CloseIfOpen(void);
void doRead(int i);
void doWrite(int i);
// Global data
#define N_IOCODES 3
// Names of IOCTL codes
//
char *IOnames[N_IOCODES+1] =
{
//=== Parameterized IOCTL Example ===
// “IOCTL_PARAMETERIZED“
“ISAINT_IOCTL_READ_PORT“
“ISAINT_IOCTL_WRITE_PORT“
“ISAINT_IOCTL_INTEVENT“
““
};
// IOCTL codes
//
int IOcodes[N_IOCODES+1] =
{
//=== Parameterized IOCTL Example ===
// IOCTL_PARAMETERIZED
ISAINT_IOCTL_READ_PORT
ISAINT_IOCTL_WRITE_PORT
ISAINT_IOCTL_INTEVENT
0
};
// Handle to device opened in driver.
//
HANDLE hDevice = INVALID_HANDLE_VALUE;
// Name used to open device
//
char *slinkName = “\\\\.\\ISAINTDevice0“;
////////////////////////////////////////////////////////////////////////
// OpenByName
//
// Open a handle to the requested device
//
HANDLE OpenByName(void)
{
// Create a handle to the driver
return CreateFile(slinkName
GENERIC_READ | GENERIC_WRITE
FILE_SHARE_READ
NULL
OPEN_EXISTING
0
NULL);
}
////////////////////////////////////////////////////////////////////////
// Exit
//
// Print a message and exit
//
void Exit(int res)
{
printf(“Exiting...\n\n“);
CloseIfOpen();
exit(res);
}
////////////////////////////////////////////////////////////////////////
// Main entry point
//
//
int __cdecl main(int argc char *argv[])
{
int nArgIndex; // Walk through command line arguments
int nArgIncrement = 0;
int val;
//=== Parameterized IOCTL Example ===
// int nVal;
// ULONG dwVal;
printf(“Test application Test_ISAINT starting...\n“);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 15 2004-06-10 17:14 ISAINT\dirs
文件 290 2004-06-10 17:14 ISAINT\exe\makefile
文件 885 2004-06-10 17:14 ISAINT\exe\sources
文件 11835 2004-06-10 17:14 ISAINT\exe\Test_ISAINT.cpp
文件 3827 2004-06-10 17:14 ISAINT\exe\Test_ISAINT.dsp
文件 432 2004-06-10 17:14 ISAINT\ISAINT.dsw
文件 4598 2004-06-10 15:53 ISAINT\ISAINT.inf
文件 41984 2004-06-10 17:18 ISAINT\ISAINT.ncb
文件 58880 2004-06-10 17:18 ISAINT\ISAINT.opt
文件 444 2004-06-10 17:14 ISAINT\ISAINTioctl.h
文件 1440 2004-06-10 17:14 ISAINT\readme.txt
文件 509 2004-06-10 17:14 ISAINT\sys\function.h
文件 4068 2004-06-10 17:14 ISAINT\sys\ISAINT.cpp
文件 6909 2004-06-10 17:14 ISAINT\sys\ISAINT.dsp
文件 588 2004-06-10 17:14 ISAINT\sys\ISAINT.h
文件 4223 2004-06-10 17:14 ISAINT\sys\ISAINT.inf
文件 2002 2004-06-10 17:14 ISAINT\sys\ISAINT.rc
文件 27033 2004-06-10 17:14 ISAINT\sys\ISAINTDevice.cpp
文件 2741 2004-06-10 17:14 ISAINT\sys\ISAINTDevice.h
文件 290 2004-06-10 17:14 ISAINT\sys\makefile
文件 970 2004-06-10 17:14 ISAINT\sys\sources
文件 6656 2011-05-17 12:47 ISAINT\sys\ISAINT.suo
文件 76800 2011-05-17 12:47 ISAINT\sys\ISAINT.ncb
目录 0 2004-06-10 17:15 ISAINT\Checked
目录 0 2004-06-10 17:14 ISAINT\exe
目录 0 2004-06-10 17:14 ISAINT\sys
目录 0 2004-06-10 17:19 ISAINT
----------- --------- ---------- ----- ----
257419 27
............此处省略0个文件信息
- 上一篇:采购中心子系统 供货商供货情况查询
- 下一篇:mac drcom校园网登录
相关资源
- x86 Disassembly
- [免费]ISAR单特显点法相位补偿
- LSISAS3041X-R 产品手册
- LSISAS3080X-R 产品手册
- LSISAS3800X 产品手册
- CISAW风险管理课件pdf全
- Telmisartan延缓血管内皮细胞衰老及p2
- antisamy策略文件
- 《黑客攻防技术宝典第2版系统实战篇
- ENISA云计算安全风险评估
- vue高仿知乎日报单页面应用技术栈v
- ISAR成像原理
- labview VISA串口驱动引擎
- 基于ISA_95的离散制造生产能力建模
- isa88 GBT 19892 IEC61512.rar
- hikvision-isapi
- Polarisation:ApplicationsinRemoteSensing
- ni-visa_19.0_online.exe
- ISA95翻译,MES开发相关学习资料
- CISA题库-1
- Trading Systems A new approach to system devel
- CISA考题-700题-中文-汇总
- CISA学习笔记
- PowerISA (IBM powerpc Book 123E)
- MES标准ISA95
- ISA95 全五部分资料
- 《MatrixAnalysisandAppliedLinearAlgebra》Car
- ISAR成像仿真程序和算法说明
- ISA95 第一、三部分中文翻译
- CISA认证讲解及备考辅导
评论
共有 条评论