I have a Windows DLL (XA_Session.dll) file but I don't know how to use it in golang.
This is a DLL Viewer picture
ConnectServer
Here is my code
package main
import (
"syscall"
"fmt"
)
var (
mod = syscall.NewLazyDLL("XA_Session.dll")
proc = mod.NewProc("DllGetClassObject")
)
func main() {
var bConnect bool
bConnect = proc.ConnectServer("hts.ebestsec.co.kr", 20001)
if bConnect {
fmt.Println("Success")
} else {
fmt.Println("Fail")
}
}
compile error:
.\main.go:17: proc.ConnectServer undefined (type *syscall.LazyProc has no field or method ConnectServer)