beautypg.com

Rockwell Automation 2711P Software Development Kit User Manual User Manual

Page 96

background image

Publication 2711P-UM005A-EN-P - March 2007

96 Device Drivers

//

/////////////////////////////////////////////////////////////////////

DWORD WINAPI

IstThreadProc(

LPVOID lpParameter

)

{

PDRV_DATA pDrvData = (PDRV_DATA)lpParameter;

DWORD dwRet;

DEBUGMSG(ZONE_FUNC, (TEXT("IstThreadProc+\r\n")));

while ((dwRet = WaitForSingleObject(pDrvData->hEvent,INFINITE)) != WAIT_FAILED)

{

if (dwRet == WAIT_OBJECT_0)

{ if (pDrvData->bExitThread)

break;

RETAILMSG(1,(_T("IstThreadProc: IST HAS FIRED!\r\n")));

InterruptDone(pDrvData->Gii.SysIntr);

}

}

DEBUGMSG(ZONE_FUNC,(_T("IstThreadProc-\r\n")));

return (TRUE);

}

For a detailed explanation of the stream driver interface and how to
load a stream driver refer to the Microsoft documentation for stream
driver development.