hUsbLink = CreateFile (
sPipeName,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, // no SECURITY_ATTRIBUTES structure
OPEN_EXISTING, // No special create flags
0,//FILE_FLAG_OVERLAPPED, // No special attributes
NULL // No template file
);
///пропущено
while(1) {
memset(inBuffer, 0, 2);
//bResult = ReadFile(hUsbLink,inBuffer, 512,&readed,&ovl_wht);
bResult = ReadFile(hUsbLink,inBuffer, 512,&readed,NULL);