作者Attilax 艾龙, EMAIL:1466519819@qq.com
来源:attilax的专栏
地址:http://blog.csdn.net/attilax
java jna
反观.NET阵营,其P/Invoke技术调用原生函数非常方便,不需要编写一行C代码,只需要写Annotation就可以快速调用原生函数。因此,与硬件有关的很多开发领域都被.NET所占据
在PHP 4.2.0 至 4.2.3中,可以使用w32api_register_function
python
print(‘xxx world‘)
#import ctypes
#dll = ctypes.WinDll( ‘test.dll‘ )
from ctypes import *
dll = CDLL("User32.dll")
#dll.MessageBoxW(0,‘msg‘,‘title‘,4)
dllx = WinDLL(r"D:\pythonWKSPC\focucommclient.dll")
iResult = dllx.COMM_Initialize(11,"pAppName","192.168.0.203",1989,"",0,0,0,0,0,0,0);
print(" ------result:"+str (iResult))
#//#WhichButton := DllCall("MessageBox", "int", "0", "str", "Press Yes or No", "str", "Title of box", "int", 4)
///////////////需要留意的地张儿.
CDLL 还是WinDLL??
载遵循cdecl标准函数调用约定的链接库;
windll()用于加载遵循stdcall标准函数调用约定的链接库;
paip.java c# .net php python调用c++ c dll so windows api 总结,布布扣,bubuko.com