CSDN论坛 > .NET技术 > C#

public string extern int MessageBox (int hWnd,String text, [问题点数:20分,结帖人zhengjianping]

Bbs1
本版专家分:3
结帖率 100%
CSDN今日推荐
Bbs8
本版专家分:34398
Blank
蓝花 2003年9月 .NET技术大版内专家分月排行榜第三
Bbs1
本版专家分:3
匿名用户不能发表回复!
其他相关推荐
C# 关键字extern用法
修饰符用于声明在外部实现的方法。extern 修饰符的常见用法是在使用 Interop 服务调入非托管代码时与 DllImport 属性一起使用;在这种情况下,该方法还必须声明为 static,如下面的示例所示:[DllImport("avifil32.dll")]private static extern void AVIFileInit();注意 extern 关键字还可以定义外部程序集别
1750板卡dll文件
1750板卡dll文件,控制IO、 using System; namespace AdvanIO { public class IO { public byte[] bdi; public byte[] bdo; public string di; public string Infra1; public string Infra2; public int iodev; public string ioOut; public IO(); public int closeIO(); public int Infrared(int no); public int Led(string color); public int openio(int DeviceNum); public void ReadDiPorts(int PortStart); public int WriteDoPort(int Port, string Data); } }
C#读写INT文档
一://写INI文件   [ DllImport ( \"kernel32\" ) ]   private static extern bool WritePrivateProfileString ( string section ,string key , string val , string filePath ) ;   //读ini文件(字符   [ DllImport ( \"kernel32\" ) ]   private static extern int GetPrivateProfileString ( string section ,string key , string def , StringBuilder retVal ,int size , string filePath ) ;   //读ini文件(数字   [ DllImport ( \"kernel32\" ) ]   private static extern int GetPrivateProfileInt 的( string section ,string key , int def , string filePath ) ;
ini文件读写类
public class Ini     {         // 声明INI文件的写操作函数 WritePrivateProfileString()         [System.Runtime.InteropServices.DllImport("kernel32")]         private static extern long WritePrivatePr
仓库管理系统源代码
一份Java开发的仓库管理系统源代码 ublic class Goods { private int id; private String goodsname; private String goodsstyle; private int goodsnumber; private String storageID; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getGoodsname() { return goodsname; } public void setGoodsname(String goodsname) { this.goodsname = goodsname; } public String getGoodsstyle() { return goodsstyle; } public void setGoodsstyle(String goodsstyle) { this.goodsstyle = goodsstyle; } public int getGoodsnumber() { return goodsnumber; } public void setGoodsnumber(int goodsnumber) { this.goodsnumber = goodsnumber; } public String getStorageID() { return storageID; } public void setStorageID(String storageID) { this.storageID = storageID; } }
C#中使用FindWindow函数详解
 FindWindow 用来根据类名和窗口名来得到窗口句柄的。但是这个函数不能查找子窗口,也不区分大小写。如果要从一个窗口的子窗口中查找需要使用FindWindowEX。1.在C#中使用方法如下:[DllImport("User32.dll", EntryPoint = "FindWindow")] private static extern IntPtr FindW
网络访问海康硬盘录像机简单事例
网络访问海康硬盘录像机简单事例 [DllImport("HCNetSDK.dll")] public static extern bool NET_DVR_Init(); //初始化SDK //用户注册 [DllImport("HCNetSDK.dll")] public static extern int NET_DVR_Login(string sDVRIP,UInt16 wDVRPort,string sUserName,string sPassword ,ref DEVICEINFO lpDeviceInfo); //图像预览 [DllImport("HCNetSDK.dll", CharSet = CharSet.Auto)] public static extern int NET_DVR_RealPlay(int lUserID,ref CLIENTINFO lpClientInfo);
Asprise OCR 5.01 破解
Asprise OCR 5.01,去除试用对话框,aocr.dll 使用: private const string OCR_DLL_NAME_32 = "aocr.dll"; [DllImport(OCR_DLL_NAME_32, CharSet = CharSet.Ansi)] public static extern int com_asprise_ocr_setup(int queryOnly); [DllImport(OCR_DLL_NAME_32, CharSet = CharSet.Ansi)] public static extern IntPtr com_asprise_ocr_start(string lang, string speed); [DllImport(OCR_DLL_NAME_32, EntryPoint = "com_asprise_ocr_recognize")] public static extern IntPtr com_asprise_ocr_recognize(Int64 handle, string imgFiles, int pageIndex, int startX, int startY, int width, int height, string recognizeType, string outputFormat, string propSpec, string propSeparator, string propKeyValueSpeparator); [DllImport(OCR_DLL_NAME_32, CharSet = CharSet.Ansi)] public static extern void com_asprise_ocr_util_delete(Int64 handle, bool isArray); com_asprise_ocr_setup(0); IntPtr _handle = com_asprise_ocr_start("eng", "fastest"); IntPtr ptr = com_asprise_ocr_recognize(_handle.ToInt64(), [图片路径], -1, -1, -1, -1, -1, "all", "text", "", "|", "="); string s = Marshal.PtrToStringAnsi(ptr).Replace("\n", ""); ============ 官方下载:http://asprise.com/royalty-free-library/ocr-api-for-java-csharp-vb.net.html
C#调用PComm.dll
C#调用MOXA公司的PComm.dll类库PComm(线程安全) 接口函数: 1、public int InitComm(Hashtable Ht_CommParam) 2、 public int SendFrame(string Str_SendFrame, ref string Str_RecFrame, int i_NewBaudrate = 0) 3、public int CloseComm() 4、public string GetCommErrMsg(int i_ErrCode)
java实现MINIDVD
java语言实现MINIdvd管理系统 public class DvdSet { String[] name=new String[50]; int[] state=new int[50]; String[] date=new String[50]; int[] count=new int[50]; }
关闭
关闭