Hello,

I am trying to use cfapi.h/cldapi.dll from golang.
I am able to call some function however for CfConnectSyncRoot I always get 
ERROR_MORE_DATA on the third argument of syscall.Proc.Call().

Cf my code:
func CfConnectSyncRoot(syncRootPath string, callbackTable 
CfCallbackRegistrations, callbackContext []byte, connectFlags 
CfConnectFlag) (*CfConnectionKey, error) {
wstrSyncRootPath, err := syscall.UTF16PtrFromString(syncRootPath)
if err != nil {
return nil, err
}

ct := callbackTable.DllEncode()
cbCtx := uintptr(0)
if len(callbackContext) > 0 {
cbCtx = uintptr(unsafe.Pointer(&callbackContext[0]))
}

cfKey := CfConnectionKey(0)

ret, _, errno := 
inst.hCfConnectSyncRoot.Call(uintptr(unsafe.Pointer(wstrSyncRootPath)), 
uintptr(unsafe.Pointer(&ct[0])), cbCtx, uintptr(connectFlags), uintptr
(unsafe.Pointer(&cfKey)))
fmt.Println(errno)
if ret != S_OK {
return nil, fmt.Errorf("Error CfConnectSyncRoot result %#x", ret)
}
return &cfKey, nil
}


fmt.Println(errno) is throwing the error code.
Do you have any idea ?

Thanks in advance,

Nicolas

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/a9948362-06d4-4581-b04f-c5940cd038edn%40googlegroups.com.

Reply via email to