go加载dll问题

自己解决了!方法如下!
//bool TdxHq_GetSecurityCount(byte Market, short& Result, char* ErrInfo);

var Result int
ErrInfo := make([]byte, 256)

lib := syscall.MustLoadDLL(“xxx.dll”)
myfunc := lib.MustFindProc(“xxxfunc”)
ret, _, err := myfunc.Call(IntPtr(Market), uintptr(unsafe.Pointer(&Result)), uintptr(unsafe.Pointer(&ErrInfo[0])))

共 1 个回复


xjjrocker

自己解决了!

# 0