Imports System.Runtime.InteropServices

Public Module mdlBXLLIB_x86

#Region " DLL API Function "

    Public Declare Function ConnectPrinter_x86 Lib "BXLLIB.dll" Alias "ConnectPrinter" ( _
                                                <MarshalAs(UnmanagedType.LPStr)> ByVal szPrinterName As String) As Boolean

    Public Declare Function DisconnectPrinter_x86 Lib "BXLLIB.dll" Alias "DisconnectPrinter" () As Boolean

    Public Declare Function StartLabel_x86 Lib "BXLLIB.dll" Alias "StartLabel" () As Boolean

    Public Declare Sub EndLabel_x86 Lib "BXLLIB.dll" Alias "EndLabel" ()

    Public Declare Function GetBIXOLON_PrinterList_x86 Lib "BXLLIB.dll" Alias "GetBIXOLON_PrinterList" ( _
                                                ByVal strInstalledPrinter As System.Text.StringBuilder) As Integer

    Public Declare Function GetDllVersion_x86 Lib "BXLLIB.dll" Alias "GetDllVersion" ( _
                                                ByVal strBxlPrtList As System.Text.StringBuilder) As Boolean    '

    Public Declare Function GetPrinterResolution_x86 Lib "BXLLIB.dll" Alias "GetPrinterResolution" () As Integer


    Public Declare Function Print1DBarcode_x86 Lib "BXLLIB.dll" Alias "Print1DBarcode" ( _
                                                ByVal nHorizontalPos As Integer, _
                                                ByVal nVerticalPos As Integer, _
                                                ByVal nBarcodeType As Integer, _
                                                ByVal nNarrowBarWidth As Integer, _
                                                ByVal nWideBarWidth As Integer, _
                                                ByVal nBarcodeHeight As Integer, _
                                                ByVal nRotation As Integer, _
                                                ByVal nHRI As Integer, _
                                                <MarshalAs(UnmanagedType.LPStr)> ByVal pData As String) _
                                                As Boolean


    Public Declare Function PrintDeviceFont_x86 Lib "BXLLIB.dll" Alias "PrintDeviceFont" ( _
                                                ByVal nHorizontalPos As Integer, _
                                                ByVal nVerticalPos As Integer, _
                                                ByVal nFontName As Integer, _
                                                ByVal nHorizontalMulti As Integer, _
                                                ByVal nVerticalMulti As Integer, _
                                                ByVal nRotation As Integer, _
                                                ByVal bBold As Boolean, _
                                                <MarshalAs(UnmanagedType.LPStr)> ByVal szText As String) _
                                                As Boolean

    Public Declare Function PrintDeviceFontW_x86 Lib "BXLLIB.dll" Alias "PrintDeviceFontW" ( _
                                                ByVal nHorizontalPos As Integer, _
                                                ByVal nVerticalPos As Integer, _
                                                ByVal nFontName As Integer, _
                                                ByVal nHorizontalMulti As Integer, _
                                                ByVal nVerticalMulti As Integer, _
                                                ByVal nRotation As Integer, _
                                                ByVal bBold As Boolean, _
                                                <MarshalAs(UnmanagedType.LPStr)> ByVal szText As String, _
                                                ByVal nCodePage As Integer) _
                                                As Boolean


    Public Declare Function SetConfigOfPrinter_x86 Lib "BXLLIB.dll" Alias "SetConfigOfPrinter" ( _
                                                ByVal nSpeed As Integer, _
                                                ByVal nDensity As Integer, _
                                                ByVal nOrientation As Integer, _
                                                ByVal bAutoCut As Integer, _
                                                ByVal nCuttingPeriod As Integer, _
                                                ByVal bBackFeeding As Boolean) _
                                                As Boolean


    Public Declare Function Prints_x86 Lib "BXLLIB.dll" Alias "Prints" ( _
                                                ByVal nLabelSet As Integer, _
                                                ByVal nCopiesOfEachLabel As Integer) _
                                                As Boolean


    Public Declare Function SetPaper_x86 Lib "BXLLIB.dll" Alias "SetPaper" ( _
                                                ByVal nHorizontalMagin As Integer, _
                                                ByVal nVerticalMargin As Integer, _
                                                ByVal nPaperWidth As Integer, _
                                                ByVal nPaperLength As Integer, _
                                                ByVal nMediaType As Integer, _
                                                ByVal nOffSet As Integer, _
                                                ByVal nGapLengthORThicknessOfBlackLine As Integer) _
                                                As Boolean


    Public Declare Function ClearBuffer_x86 Lib "BXLLIB.dll" Alias "ClearBuffer" () As Boolean


    Public Declare Function PrintBlock_x86 Lib "BXLLIB.dll" Alias "PrintBlock" ( _
                                            ByVal nHorizontalStartPos As Integer, _
                                            ByVal nVerticalStartPos As Integer, _
                                            ByVal nHorizontalEndPos As Integer, _
                                            ByVal nVerticalEndPos As Integer, _
                                            ByVal nOption As Integer, _
                                            ByVal nThickness As Integer) _
                                            As Boolean

    '/******************************************************************************/
    ' Circle draw 
    ' int nHorizontalStartPos	: X position
    ' int nVerticalStartPos	    : Y position
    ' int nDiameter			    : 원 Size_x86 Lib "BXLLIB.dll" (반지름) 1~6
    ' int nMulti				: 확대_x86 Lib "BXLLIB.dll" (1~4)
    '/******************************************************************************/

    Public Declare Function PrintCircle_x86 Lib "BXLLIB.dll" Alias "PrintCircle" ( _
                                            ByVal nHorizontalStartPos As Integer, _
                                            ByVal nVerticalStartPos As Integer, _
                                            ByVal nDiameter As Integer, _
                                            ByVal nMulti As Integer) _
                                            As Boolean


    Public Declare Function PrintDirect_x86 Lib "BXLLIB.dll" Alias "PrintDirect" ( _
                                            <MarshalAs(UnmanagedType.LPStr)> ByVal pDirectData As String, _
                                            ByVal bAddCrLf As Boolean) _
                                            As Integer

    Public Declare Function WriteBuffer_x86 Lib "BXLLIB.dll" Alias "WriteBuffer" ( _
                                            <MarshalAs(UnmanagedType.LPStr)> ByVal pDirectData As String, _
                                            ByVal nDataLength As Integer) _
                                            As Boolean

    Public Declare Function PrintTrueFont_x86 Lib "BXLLIB.dll" Alias "PrintTrueFont" ( _
                                            ByVal nXPos As Integer, _
                                            ByVal nYPos As Integer, _
                                            <MarshalAs(UnmanagedType.LPStr)> ByVal strFontName As String, _
                                            ByVal nFontSize As Integer, _
                                            ByVal nRotaion As Integer, _
                                            ByVal bItalic As Boolean, _
                                            ByVal bBold As Boolean, _
                                            ByVal bUnderline As Boolean, _
                                            <MarshalAs(UnmanagedType.LPStr)> ByVal strText As String, _
                                            ByVal bDataCompression As Boolean) _
                                            As Boolean

    Public Declare Function PrintTrueFontW_x86 Lib "BXLLIB.dll" Alias "PrintTrueFontW" ( _
                                            ByVal nXPos As Integer, _
                                            ByVal nYPos As Integer, _
                                            <MarshalAs(UnmanagedType.LPWStr)> ByVal strFontName As String, _
                                            ByVal nFontSize As Integer, _
                                            ByVal nRotaion As Integer, _
                                            ByVal bItalic As Boolean, _
                                            ByVal bBold As Boolean, _
                                            ByVal bUnderline As Boolean, _
                                            <MarshalAs(UnmanagedType.LPWStr)> ByVal strText As String, _
                                            ByVal bDataCompression As Boolean) _
                                            As Boolean

    Public Declare Function PrintTrueFontLib_x86 Lib "BXLLIB.dll" Alias "PrintTrueFontLib" ( _
                                            ByVal nXPos As Integer, _
                                            ByVal nYPos As Integer, _
                                            <MarshalAs(UnmanagedType.LPStr)> ByVal strFontName As String, _
                                            ByVal nFontSize As Integer, _
                                            ByVal nRotaion As Integer, _
                                            ByVal bItalic As Boolean, _
                                            ByVal bBold As Boolean, _
                                            ByVal bUnderline As Boolean, _
                                            <MarshalAs(UnmanagedType.LPStr)> ByVal strText As String, _
                                            ByVal bDataCompression As Boolean) _
                                            As Boolean

    Public Declare Function PrintTrueFontLibW_x86 Lib "BXLLIB.dll" Alias "PrintTrueFontLibW" ( _
                                            ByVal nXPos As Integer, _
                                            ByVal nYPos As Integer, _
                                            <MarshalAs(UnmanagedType.LPWStr)> ByVal strFontName As String, _
                                            ByVal nFontSize As Integer, _
                                            ByVal nRotaion As Integer, _
                                            ByVal bItalic As Boolean, _
                                            ByVal bBold As Boolean, _
                                            ByVal bUnderline As Boolean, _
                                            <MarshalAs(UnmanagedType.LPWStr)> ByVal strText As String, _
                                            ByVal bDataCompression As Boolean) _
                                            As Boolean

    Public Declare Function PrintTrueFontLibWithAlign_x86 Lib "BXLLIB.dll" Alias "PrintTrueFontLibWithAlign" ( _
                                    ByVal nXPos As Integer, _
                                    ByVal nYPos As Integer, _
                                    <MarshalAs(UnmanagedType.LPStr)> ByVal strFontName As String, _
                                    ByVal nFontSize As Integer, _
                                    ByVal nRotaion As Integer, _
                                    ByVal bItalic As Boolean, _
                                    ByVal bBold As Boolean, _
                                    ByVal bUnderline As Boolean, _
                                    <MarshalAs(UnmanagedType.LPStr)> ByVal strText As String, _
                                    ByVal nPrintWidth As Integer, _
                                    ByVal nAlignment As Integer, _
                                    ByVal bDataCompression As Boolean) _
                                    As Boolean

    Public Declare Function PrintTrueFontLibWithAlignW_x86 Lib "BXLLIB.dll" Alias "PrintTrueFontLibWithAlignW" ( _
                                    ByVal nXPos As Integer, _
                                    ByVal nYPos As Integer, _
                                    <MarshalAs(UnmanagedType.LPWStr)> ByVal strFontName As String, _
                                    ByVal nFontSize As Integer, _
                                    ByVal nRotaion As Integer, _
                                    ByVal bItalic As Boolean, _
                                    ByVal bBold As Boolean, _
                                    ByVal bUnderline As Boolean, _
                                    <MarshalAs(UnmanagedType.LPWStr)> ByVal strText As String, _
                                    ByVal nPrintWidth As Integer, _
                                    ByVal nAlignment As Integer, _
                                    ByVal bDataCompression As Boolean) _
                                    As Boolean


    Public Declare Function PrintVectorFont_x86 Lib "BXLLIB.dll" Alias "PrintVectorFont" ( _
                                            ByVal nXPos As Integer, _
                                            ByVal nYPos As Integer, _
                                            <MarshalAs(UnmanagedType.LPStr)> ByVal strFontSelection As String, _
                                            ByVal nFontWidth As Integer, _
                                            ByVal nFontHeight As Integer, _
                                            <MarshalAs(UnmanagedType.LPStr)> ByVal strRightSideCharSpacing As String, _
                                            ByVal bBold As Boolean, _
                                            ByVal bReversePrinting As Boolean, _
                                            ByVal bTextStyle As Boolean, _
                                            ByVal nRotation As Integer, _
                                            <MarshalAs(UnmanagedType.LPStr)> ByVal strTextAlignment As String, _
                                            ByVal nTextDirection As Integer, _
                                            <MarshalAs(UnmanagedType.LPStr)> ByVal pData As String) _
                                            As Boolean

    Public Declare Function PrintVectorFontW_x86 Lib "BXLLIB.dll" Alias "PrintVectorFontW" ( _
                                            ByVal nXPos As Integer, _
                                            ByVal nYPos As Integer, _
                                            <MarshalAs(UnmanagedType.LPStr)> ByVal strFontSelection As String, _
                                            ByVal nFontWidth As Integer, _
                                            ByVal nFontHeight As Integer, _
                                            <MarshalAs(UnmanagedType.LPStr)> ByVal strRightSideCharSpacing As String, _
                                            ByVal bBold As Boolean, _
                                            ByVal bReversePrinting As Boolean, _
                                            ByVal bTextStyle As Boolean, _
                                            ByVal nRotation As Integer, _
                                            <MarshalAs(UnmanagedType.LPStr)> ByVal strTextAlignment As String, _
                                            ByVal nTextDirection As Integer, _
                                            <MarshalAs(UnmanagedType.LPWStr)> ByVal pData As String, _
                                            ByVal nCodePage As Integer) _
                                            As Boolean


    Public Declare Function PrintQRCode_x86 Lib "BXLLIB.dll" Alias "PrintQRCode" ( _
                                            ByVal nXPos As Integer, _
                                            ByVal nYPos As Integer, _
                                            ByVal nModel As Integer, _
                                            ByVal nECCLevel As Integer, _
                                            ByVal nSize As Integer, _
                                            ByVal nRotation As Integer, _
                                            <MarshalAs(UnmanagedType.LPStr)> ByVal pData As String) _
                                            As Boolean

    Public Declare Function PrintImageLib_x86 Lib "BXLLIB.dll" Alias "PrintImageLib" ( _
                                            ByVal nHorizontalStartPos As Integer, _
                                            ByVal nVerticalStartPos As Integer, _
                                            <MarshalAs(UnmanagedType.LPStr)> ByVal pBitmapFilename As String, _
                                            ByVal nDither As Integer, _
                                            ByVal bDataCompression As Boolean) _
                                            As Boolean

    Public Declare Function PrintImageLibW_x86 Lib "BXLLIB.dll" Alias "PrintImageLibW" ( _
                                            ByVal nHorizontalStartPos As Integer, _
                                            ByVal nVerticalStartPos As Integer, _
                                            <MarshalAs(UnmanagedType.LPWStr)> ByVal pBitmapFilename As String, _
                                            ByVal nDither As Integer, _
                                            ByVal bDataCompression As Boolean) _
                                            As Boolean

    Public Declare Function PrintImageLibWithSize_x86 Lib "BXLLIB.dll" Alias "PrintImageLibWithSize" ( _
                                            ByVal nHorizontalStartPos As Integer, _
                                            ByVal nVerticalStartPos As Integer, _
                                            ByVal nNewWidth As Integer, _
                                            ByVal nNewHeight As Integer, _
                                            <MarshalAs(UnmanagedType.LPStr)> ByVal pBitmapFilename As String, _
                                            ByVal nDither As Integer, _
                                            ByVal bDataCompression As Boolean) _
                                            As Boolean

    Public Declare Function SetShowMsgBox_x86 Lib "BXLLIB.dll" Alias "SetShowMsgBox" (ByVal bShowMsgBox As Boolean) As Boolean

    Public Declare Sub DEBUGLOG_ON_x86 Lib "BXLLIB.dll" Alias "DEBUGLOG_ON" ()
    Public Declare Sub DEBUGLOG_OFF_x86 Lib "BXLLIB.dll" Alias "DEBUGLOG_OFF" ()

#End Region

End Module
