User manual - DT-5100カシオライブラリマニュアル for.NET【概要編】ver.3.00(2004年3月8日)
DT-5100 .NET ライブラリマニュアル
【概要編】
ClbsysCs.cs の内容
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace ClbsysCs
{
/// <summary>
/// Summary description for ClbsysCs.
/// </summary>
public class ClbsysCs
{
public Clbsys()
{
// TODO: Add constructor logic here
}
/* Constant definition to import */
// Bootable Buttons - DWORD dwBootableButtons
public const uint CLB_BUTTON_LEFTTRIGGER = 0x1000;
public const uint CLB_BUTTON_RIGHTTRIGGER = 0x0800;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/* Definition description of a Wrapper function */
// Wakeup 要因による電源 ON 許可禁止
public static bool CLBSetBootableButtons( uint dwBootableButtons )
{
bool ret = new bool();
try
{
ret = ClbSys.CLBSetBootableButtons( dwBootableButtons );
}
catch(Exception exc)
{
MessageBox.Show( exc.ToString(), "Info CLBSetBootableButtons()" );
}
return ret;
}
// カードのアクセス終了を待って電源 OFF
public static void CLBPowerOff( )
{
try
{
ret = ClbSys.CLBPowerOff( );
}
catch(Exception exc)
{
MessageBox.Show( exc.ToString(), "Info CLBPowerOff()" );
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
public class ClbSys
{
/* Description of the function to import */
[DllImport("ClbSys.dll")]
public static extern bool CLBSetBootableButtons( uint dwBootableButtons );
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[DllImport("ClbSys.dll")]
public static extern void CLBPowerOff( );
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
}
9