#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include "ack_w32.h"

#define DBG_READ	if(AcksysReadDebug)fprintf

int
AcksysRead(HANDLE hfd,char *str,int len)
{
	DWORD count;

	count=12345;
	//printf("Read: len=%d count=%d\n",len,count);
	if( !ReadFile(hfd,str,len,&count,NULL) )
	{
		DBG_READ(stderr,"Read '%s' failed, code %d\n",
			AcksysFile,GetLastError());
	}
	else if(count > len) {
		DBG_READ(stderr,"Read: len=%d count=%d\n",len,count);
	}
	else {
	}
	return count;
}
