now i got this function describe like this
int ReadCard(char *room,char *gate,char *stime, char *guestname, char *guestid, char *lift, char *track1, char *track2, long *cardno, int *st, int *Breakfast);`
and this is what i do
room := ""
gate := ""
stime := ""
guestname := ""
guestid := ""
lift := ""
track1 := ""
track2 := ""
cardno := int64(0)
st := int64(0)
Breakfast := int64(0)
MAINDLL, _ := syscall.LoadLibrary("xxxxx.dll")
defer syscall.FreeLibrary(MAINDLL)
readCard, _ := syscall.GetProcAddress(MAINDLL, "ReadCard")
r1, r2, errno := syscall.Syscall12(readCard,
11,
uintptr(unsafe.Pointer(&room)),
uintptr(unsafe.Pointer(&gate)),
uintptr(unsafe.Pointer(&stime)),
uintptr(unsafe.Pointer(&guestname)),
uintptr(unsafe.Pointer(&guestid)),
uintptr(unsafe.Pointer(&lift)),
uintptr(unsafe.Pointer(&track1)),
uintptr(unsafe.Pointer(&track2)),
uintptr(cardno),
uintptr(st),
uintptr(Breakfast),
0)
fmt.Println(r1, "
", r2, "
", errno)`
when i run this code , i got
r1:0 r2:917452 errno:<nil>
but when i print room or other param , it's value doesn't change, this function in dll file will change the param i send , how can i got those value?