SOL9 2.0 Class: PrinterIC

 SOL9 C++ Class Library  SOL9 Samples  SOL9 Tutorial  SOL9 FAQ  SOL9 ClassTree 

Source code

/*
 * 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));
    }

};

}



Last modified: 1 Feb 2012

Copyright (c) 2009-2012 Antillia.com ALL RIGHTS RESERVED.