Python과 DLL로 연동홍사훈 0건 369회 21-08-23 21:22 |
관련링크
본문
1. dlltest.pb 파일 만들기
ProcedureDLL MyFunction()
MessageRequester("Hello", "This is a PureBasic DLL !", 0)
EndProcedure
2. DLL로 컴파일
3. PureBasic에서 DLL활용
If OpenLibrary(0, "Dlltest.dll")
CallFunction(0, "MyFunction")
CloseLibrary(0)
EndIf
4. python에서 DLL활용
import ctypes as c
mydll = c.WinDLL('E:\\05_PureBasic\\Dlltest.dll')
myfunc = mydll['MyFunction']
myfunc()
등록된 댓글이 없습니다.