C#中如何使用API

jamesfay 2004-09-07 09:42:37
请介绍一下C#中如何使用API,如何申明,有API申明工具嘛?给点参考资料也可以

Thanks
...全文
194 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
simonllf 2004-09-10
  • 打赏
  • 举报
回复
MARK
dldl 2004-09-10
  • 打赏
  • 举报
回复
http://custom.programming-in.net/
myweiterry 2004-09-08
  • 打赏
  • 举报
回复
[DllImport("winmm.dll", EntryPoint="waveOutGetNumDevs")]
public static extern int waveOutGetNumDevs ();
社会栋梁 2004-09-08
  • 打赏
  • 举报
回复
http://www.codeguru.com/Csharp/Csharp/cs_graphics/screencaptures/article.php/c6139
kissmett 2004-09-08
  • 打赏
  • 举报
回复
像引用普通的dll一样,比如Kernel32.dll
using System.Runtime.InteropServices;


[DllImport("Kernel32.dll")]
private static void xxx();//<----api里的函数名
BearRui 2004-09-07
  • 打赏
  • 举报
回复
用APIVIEW2004,这个工具支持很多语言,包括C#!!!
jiangfeng999 2004-09-07
  • 打赏
  • 举报
回复
using System;
using System.Runtime.InteropServices;

namespace dll
{
class pinvokeClient
{
[DllImport("user32.dll")]

public static extern int MessageBoxA(int hwnd, string message,
string caption, int type);
//声明Api函数的类型

public static void Main()
{
int result = MessageBoxA(0, "Hello World", "Dll Test", 3);
}
}


}
Firestone2003 2004-09-07
  • 打赏
  • 举报
回复
我有一个API声明的小工具
你的email
我给你传一下
werdcd 2004-09-07
  • 打赏
  • 举报
回复
http://www.ccw.com.cn/htm/app/aprog/01_9_14_4.asp
希望对你有帮助
Su_hibl 2004-09-07
  • 打赏
  • 举报
回复
[System.Runtime.InteropServices.DllImport("Kernel32.dll")]
private static extern uint GetWindowsDirectory(StringBuilder strbuffer,int Size);
[14本经典Android开发教程] 2 Android开发手册 API函数详解 一 TextView的API 1 1 结构 java lang Object android view View android widget TextView 直接子类: Button CheckedTextView Chronometer DigitalClock EditText 间接子类: AutoCompleteTextView CheckBox CompoundButton ExtractEditText MultiAutoCompleteTextView RadioButton ToggleB utton 已上传1本: [14本经典Android开发教程] 1 Android开发从入门到精通 稍后上传剩余12本 http: download csdn net detail cleopard 8355245 @更多@ http: cleopard download csdn net 福利 http: xuemeilaile com @更多@ http: download csdn net user cleopard album 17份软件测试文档 http: download csdn net album detail 1425 13份WPF经典开发教程 http: download csdn net album detail 1115 C#资料合辑二[C#桌面编程入门篇] http: download csdn net album detail 957 C#资料合辑一[C#入门篇] http: download csdn net album detail 669 [Csharp高级编程 第6版 ] 共8压缩卷 http: download csdn net album detail 667 10个[精品资源]Java学习资料合辑[一] http: download csdn net album detail 663 10个C#Socket编程代码示例 http: download csdn net album detail 631 6份GDI+程序设计资源整合[全零分] http: download csdn net album detail 625 2014年移动游戏行业数据分析 http: download csdn net detail cleopard 8340331 一文读懂2014年全球互联网广告新生态 http: download csdn net detail cleopard 8340303">[14本经典Android开发教程] 2 Android开发手册 API函数详解 一 TextView的API 1 1 结构 java lang Object android view View android widget TextView 直接子类: Button CheckedTextView Chronometer DigitalClock EditText 间接子类: AutoCompleteTextView CheckBox CompoundBu [更多]

111,120

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧