Tài liệu C Sharp part11 pptx

1 309 0
Tài liệu C Sharp part11 pptx

Đang tải... (xem toàn văn)

Thông tin tài liệu

ví dụ 2 gọi dll từ ngôn ngữ bất kỳ PHP Code: using System; using System.Runtime.InteropServices; namespace AdvancedDotnet { class MainClass { ///Calc.dll chính là tên dll cần gọi ở đây mình gọi dll calculator của window! [DllImport("Calc.dll")] ///Khai báo lại hàm Add của calculator chú ý: hàm Add là hàm khai đã khai báo tron g calculator public static extern int Add(int var1,int var2); public static void Main(string[] args) { int a = Add(15, 20); Console.WriteLine("Result: {0}",a); Console.Read(); } } } ___________ dauden(UDS) . dll calculator c a window! [DllImport("Calc.dll")] ///Khai báo lại hàm Add c a calculator chú ý: hàm Add là hàm khai đã khai báo tron g calculator. bất kỳ PHP Code: using System; using System.Runtime.InteropServices; namespace AdvancedDotnet { class MainClass { ///Calc.dll chính là tên dll c n gọi ở

Ngày đăng: 15/12/2013, 02:15

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan