⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 proc.cs

📁 windowsmobile 短信接收
💻 CS
字号:
using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using System.Data.SQLite;

namespace sms
{
    public class proc
    {
        static string apppath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
        public static SQLiteConnection conn = new SQLiteConnection("Data Source =" + apppath + "\\sms.db");
        public static string SoundFile = apppath + "\\sms.wav";
        [DllImport("coredll.dll")]
        public static extern bool ExitWindowsEx(int uFlags, int dwReserved);
        [DllImport("coredll.dll")]
        private static extern bool NLedSetDevice(int nID, ref NLED_SETTINGS_INFO pOutput);
        [DllImport("CoreDll.DLL", EntryPoint = "PlaySound")]
        public static extern int WCE_PlaySound(string szSound, IntPtr hMod, int flags);
        [DllImport("coredll.dll")]
        internal static extern IntPtr LoadIcon(IntPtr hInst, string IconName);
        [DllImport("coredll.dll")]
        internal static extern IntPtr GetModuleHandle(String lpModuleName);
        private struct NLED_SETTINGS_INFO
        {
            public UInt32 LedNum;
            public UInt32 OffOnBlink;
            public int TotalCycleTime;
            public int OnTime;
            public int OffTime;
            public int MetaCycleOn;
            public int MetaCycleOff;
        }
        public static void SetLedStatus(int wLed, int wStatus)
        {
            NLED_SETTINGS_INFO nsi = new NLED_SETTINGS_INFO();
            nsi.LedNum = System.Convert.ToUInt32(wLed);
            nsi.OffOnBlink = System.Convert.ToUInt32(wStatus);
            NLedSetDevice(2, ref nsi);
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -