Intermec 700 Series User Manual page 118

Color mobile computer
Hide thumbs Also See for 700 Series:
Table of Contents

Advertisement

#include <winioctl.h>
#include "sysio.h"
void DoLoad(int nDevice) {
LPTSTR devs[] = { _T("SYI1:"), _T("FWV1:") };
HANDLE hLoaderDev;
DWORD bytesReturned;
hLoaderDev = CreateFile(devs[nDevice], GENERIC_READ|GENERIC_WRITE, 0,
NULL, OPEN_EXISTING, 0, NULL);
if (hLoaderDev != INVALID_HANDLE_VALUE) {
if (!DeviceIoControl( hLoaderDev, IOCTL_LOAD_NDIS_MINIPORT, NULL, -1, NULL, 0,
&bytesReturned, NULL)){
MessageBox(NULL, TEXT("SYSIO IoControl Failed"), TEXT("Network
loader"),MB_ICONHAND);
if (hLoaderDev!=INVALID_HANDLE_VALUE) CloseHandle(hLoaderDev);
hLoaderDev = INVALID_HANDLE_VALUE; // bad handle
}else {
CloseHandle(hLoaderDev);
}
}
}
void DoUnload(int nDevice) {
LPTSTR devs[] = { _T("SYI1:"), _T("FWV1:") };
HANDLE hLoaderDev;
DWORD bytesReturned;
hLoaderDev = CreateFile(devs[nDevice], GENERIC_READ|GENERIC_WRITE, 0,
NULL, OPEN_EXISTING, 0, NULL);
if (hLoaderDev != INVALID_HANDLE_VALUE) {
if (!DeviceIoControl( hLoaderDev, IOCTL_UNLOAD_NDIS_MINIPORT, NULL, -1, NULL, 0,
&bytesReturned, NULL)){
MessageBox(NULL, TEXT("SYSIO IoControl Failed"),TEXT("Network
loader"),MB_ICONHAND);
if (hLoaderDev!=INVALID_HANDLE_VALUE) CloseHandle(hLoaderDev);
hLoaderDev = INVALID_HANDLE_VALUE; // bad handle
}else {
CloseHandle(hLoaderDev);
}
}
}
700 Series Color Mobile Computer User's Manual
Chapter 4
Network Support
99

Advertisement

Table of Contents
loading

Table of Contents