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
匿名用户不能发表回复!
其他相关推荐
ini文件读写类
public class Ini     {         // 声明INI文件的写操作函数 WritePrivateProfileString()         [System.Runtime.InteropServices.DllImport("kernel32")]         private static extern long WritePrivatePr
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 ) ;
无标题窗体的拖动程序[DllImport("user32.dll")]
无标题窗体的拖动程序[DllImport("user32.dll")] public static extern bool ReleaseCapture(); [DllImport("user32.dll")] public static extern bool SendMessage(IntPtr hwnd,int wMsg,int wParam,int lParam); public const int WM_SYSCOMMAND=0x0112; public const int SC_MOVE=0xF010; private Button button1; public const int HTCAPTION=0x0002;(C#源代码编写)
C# 关键字extern用法
修饰符用于声明在外部实现的方法。extern 修饰符的常见用法是在使用 Interop 服务调入非托管代码时与 DllImport 属性一起使用;在这种情况下,该方法还必须声明为 static,如下面的示例所示:[DllImport("avifil32.dll")]private static extern void AVIFileInit();注意 extern 关键字还可以定义外部程序集别
网络访问海康硬盘录像机简单事例
网络访问海康硬盘录像机简单事例 [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)
进程间的通信以及发送消息
背景:公司一个程序(C++程序)启动另一个程序(C# 程序),启动时会有两三秒的空白时间,所以就需要先预先启动子程序渲染窗体(启动时隐藏窗体窗体),还有部分数据不确定所以要在正真启动的时候再向子程序发消息。
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]; }
关闭