//***********************************************************************/
//*                                                                     */
//*     IF-60 API Sample Program                                        */
//*                                                      2010/2/22      */
//*     Copyright(c) 2012  TEXIO TECHNOLOGY CORPORATION                 */
//***********************************************************************/

#pragma once

using namespace System;
using namespace System::Text;
using namespace System::Runtime::InteropServices;

extern "C" {

    /// Device Open
    [DllImport("if_60.dll")]
    extern int USB488_DeviceOpen(int addr);

    /// Device Close
    [DllImport("if_60.dll")]
    extern int USB488_DeviceClose(int addr);

    /// Set Timeout
    [DllImport("if_60.dll")]
    extern int USB488_SetTimeout(int addr, int sec);

    /// Set Remote
    [DllImport("if_60.dll")]
    extern int USB488_SetRemote(int addr, int rMode);

    /// Get Remote
    [DllImport("if_60.dll")]
    extern int USB488_GetRemote(int addr);

    /// Device Clear
    [DllImport("if_60.dll")]
    extern int USB488_DevClear(int addr);

    /// Get Status Byte
    [DllImport("if_60.dll")]
    extern int USB488_GetSTBQuery(int addr);

    /// Clear Status Byte
    [DllImport("if_60.dll")]
    extern int USB488_ClearSTB(int addr);

    /// Send Message
    [DllImport("if_60.dll")]
    extern int USB488_Send(int addr, String^ strBuf);

    /// Send Message
    [DllImport("if_60.dll")]
    extern int USB488_SendBinary(int addr, [In] array<unsigned char>^ pmsg, int count, int nullMode);

    /// Receive Message
    [DllImport("if_60.dll")]
    extern int USB488_Receive(int addr, int cnt, StringBuilder^ pmsg);
}
