利用短信远程关闭计算机 请问:GMS.GSMModemGetDevice();的命名空间是什么?如何实现用短信远程关闭计算机? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 (2)GSMModemGetDevice函数该函数获取当前的通讯端口,代码如下: [DllImport("dllforvc.dll", EntryPoint = "GSMModemGetDevice", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern string GSMModemGetDevice(); 如何实现用短信远程关闭计算机?判断短信里的关键字来调用 progress shut down命令来关机 class GMS { [DllImport("dllforvc.dll", EntryPoint = "GSMModemInitNew", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern bool GSMModemInitNew( string device, string baudrate, string initstring, string charset, bool swHandshake, string sn); [DllImport("dllforvc.dll", EntryPoint = "GSMModemGetSnInfoNew", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern string GSMModemGetSnInfoNew(string device, string baudrate); [DllImport("dllforvc.dll", EntryPoint = "GSMModemGetDevice", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern string GSMModemGetDevice(); [DllImport("dllforvc.dll", EntryPoint = "GSMModemGetBaudrate", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern string GSMModemGetBaudrate(); [DllImport("dllforvc.dll", EntryPoint = "GSMModemRelease", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern void GSMModemRelease(); [DllImport("dllforvc.dll", EntryPoint = "GSMModemGetErrorMsg", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern string GSMModemGetErrorMsg(); [DllImport("dllforvc.dll", EntryPoint = "GSMModemSMSsend", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern bool GSMModemSMSsend( string serviceCenterAddress, int encodeval, string text, int textlen, string phonenumber, bool requestStatusReport); [DllImport("dllforvc.dll", EntryPoint = "GSMModemSMSReadAll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern string GSMModemSMSReadAll(int RD_opt); } 参考 继承的问题,基础的东西好像忘了 提问个关于内容显示问题,老提示匹配的重载方法具有一些无效参数 PrimaryKey 义务讨论贴:大家看过的关于.NET的比较不错的书... 100>value>0那代码怎么写啊 对接口技术威力的理解,看看理解的对吗? 请问如何在系统中查寻一个web项目的安装路径? 状态机工作流的回退(撤销)问题 为什么书上的例子出现"操作必须使用一个可更新的查询"的错误? 根据坐标求出1000公里内的所有省,市的名称 C#如何验证一个邮箱是否真实存在 不是格式是否正确 c# webservice调用dll
{
[DllImport("dllforvc.dll",
EntryPoint = "GSMModemInitNew",
CharSet = CharSet.Ansi,
CallingConvention = CallingConvention.StdCall)]
public static extern bool GSMModemInitNew(
string device,
string baudrate,
string initstring,
string charset,
bool swHandshake,
string sn); [DllImport("dllforvc.dll",
EntryPoint = "GSMModemGetSnInfoNew",
CharSet = CharSet.Ansi,
CallingConvention = CallingConvention.StdCall)]
public static extern string GSMModemGetSnInfoNew(string device, string baudrate); [DllImport("dllforvc.dll",
EntryPoint = "GSMModemGetDevice",
CharSet = CharSet.Ansi,
CallingConvention = CallingConvention.StdCall)]
public static extern string GSMModemGetDevice(); [DllImport("dllforvc.dll",
EntryPoint = "GSMModemGetBaudrate",
CharSet = CharSet.Ansi,
CallingConvention = CallingConvention.StdCall)]
public static extern string GSMModemGetBaudrate(); [DllImport("dllforvc.dll",
EntryPoint = "GSMModemRelease",
CharSet = CharSet.Ansi,
CallingConvention = CallingConvention.StdCall)]
public static extern void GSMModemRelease(); [DllImport("dllforvc.dll",
EntryPoint = "GSMModemGetErrorMsg",
CharSet = CharSet.Ansi,
CallingConvention = CallingConvention.StdCall)]
public static extern string GSMModemGetErrorMsg();
[DllImport("dllforvc.dll",
EntryPoint = "GSMModemSMSsend",
CharSet = CharSet.Ansi,
CallingConvention = CallingConvention.StdCall)]
public static extern bool GSMModemSMSsend(
string serviceCenterAddress,
int encodeval,
string text,
int textlen,
string phonenumber,
bool requestStatusReport);
[DllImport("dllforvc.dll",
EntryPoint = "GSMModemSMSReadAll",
CharSet = CharSet.Ansi,
CallingConvention = CallingConvention.StdCall)]
public static extern string GSMModemSMSReadAll(int RD_opt);
}
参考