?? sim.cs
字號:
?using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace Sim_CS
{
static class SimWrap
{
/// <summary>
/// The main entry point for the application.
/// </summary>
///
public const int SIM_CAPSTYPE_ALL = 0x3F; // All device cabability types
public const int SIM_PBSTORAGE_SIM = 0x10; // General SIM Storage
public const int SIM_SMSSTORAGE_SIM = 0x2; // SIM storage location
//public const int SIM_NUMLOCKFACILITIES = 10; // Number of locking facilities
[StructLayout(LayoutKind.Sequential)]
public struct SimLockingPwdLength
{
public uint dwFacility; // The locking facility
public uint dwPasswordLength; // The minimum password length
}
[StructLayout(LayoutKind.Sequential)]
public struct SimCaps
{
public uint cbSize;
public uint dwParams;
public uint dwPBStorages;
public uint dwMinPBIndex;
public uint dwMaxPBIndex;
public uint dwMaxPBEAddressLength;
public uint dwMaxPBETextLength;
public uint dwLockFacilities;
public uint dwReadMsgStorages;
public uint dwWriteMsgStorages;
public uint dwNumLockingPwdLengths;
//[MarshalAs(UnmanagedType.ByValArray, SizeConst=10)]
//public SimLockingPwdLength[] rgLockingPwdLengths;
public SimLockingPwdLength rgLockingPwdLengths0;
public SimLockingPwdLength rgLockingPwdLengths1;
public SimLockingPwdLength rgLockingPwdLengths2;
public SimLockingPwdLength rgLockingPwdLengths3;
public SimLockingPwdLength rgLockingPwdLengths4;
public SimLockingPwdLength rgLockingPwdLengths5;
public SimLockingPwdLength rgLockingPwdLengths6;
public SimLockingPwdLength rgLockingPwdLengths7;
public SimLockingPwdLength rgLockingPwdLengths8;
public SimLockingPwdLength rgLockingPwdLengths9;
}
[DllImport("cellcore.dll")]
public static extern int SimInitialize(uint dwFlags, int lpfnCallBack, uint dwParam, ref int lphSim);
[DllImport("cellcore.dll")]
public static extern int SimDeinitialize(int hSim);
[DllImport("cellcore.dll")]
public static extern int SimGetPhonebookStatus(int hSim, uint dwLocation, ref uint lpdwUsed, ref uint lpdwTotal);
[DllImport("cellcore.dll")]
public static extern int SimGetDevCaps(int hSim, uint dwCapsType, ref SimCaps lpSimCaps);
[DllImport("cellcore.dll")]
public static extern int SimGetSmsStorageStatus(int hSim, uint dwStorage, ref uint lpdwUsed, ref uint lpdwTotal );
[MTAThread]
static void Main()
{
Application.Run(new Form1());
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -