/*
* PrinterIC.h
* Copyright (c) 2011 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
*/
// SOL++2000
#pragma once
#include <sol\IC.h>
namespace SOL {
class PrinterIC :public IC {
public:
PrinterIC()
{
TCHAR printer[256];
TCHAR* device = NULL;
TCHAR* driver = NULL;
TCHAR* output = NULL;
::GetProfileString(_T("windows"), _T("device"),
_T(""), printer, sizeof(printer));
TCHAR seps[] = _T(".");
TCHAR* next = NULL;
device = strtok_s(printer, seps, &next);
driver = strtok_s(NULL, seps, &next);
output = strtok_s(NULL, seps, &next);
setIC(::CreateIC(driver, device, output, NULL));
}
};
}
|