
static void SerialWriteString(const char *Data, int Length)
{
DWORD dwError, NumBytesWritten;
unsigned int BytesToPrint;
if (Length == -1)
{
BytesToPrint = strlen(Data);
}
else
{
BytesToPrint = Length;
}
if (!WriteFile (SerialChannel, Data, BytesToPrint, &NumBytesWritten, NULL))
// Must be NULL for Windows CE
{
// WriteFile failed. Report error.
dwError = GetLastError();
}
}
// --------------------------------------------------------------------------------------
static int ClosePort(void)
{
if (SerialChannel != INVALID_HANDLE_VALUE)
{
// Close the communication port.
if (!CloseHandle (SerialChannel))
{
return FALSE;
}
else
{
SerialChannel = INVALID_HANDLE_VALUE;
return TRUE;
}
}
return FALSE;
}
// ---------------------------------------------------------------------------
static void PrintCharSet(void)
{
char Buffer[16];
unsigned int Line = 2;
// Print the 'printable' chars
while (Line < 16)
{
unsigned int Row = 0;
while (Row < 16)
{
Buffer[Row] = (Line * 16) + Row;
Row++;
}
SerialWriteString(Buffer, 16);
SerialWriteString("\x0d", 1);
Line++;
}
}
// ---------------------------------------------------------------------------
BOOL DataToPrinter(HWND ParentWindowHandle)
{
const char TextStr0[] = "Hello, Printer! This is a whole load of text which doesn't
Summary of Contents for Pro60
Page 1: ...Blackroc Pro60 Thermal Printer Programming Manual March 2007 V1 4 ...
Page 21: ...DeleteObject BitmapHandle return TRUE ...
Page 24: ...Windows Mobile 2003 ...
Page 25: ......
Page 26: ...Alphabetical Index ...