I am trying to call a DLL from go and I get an error "The parameter is 
incorrect" error when I try to call this function 

HANDLE  Myopen(const char *filter, LAYER layer, INT16 priority, UINT64 
flags)

is my signature in the C file 

I call from golang using this 

Open(lazyP*syscall.LazyProc, filter string, layer int16, priority uint16, 
flags uint64) error {
 r1, r2, lastError := 
lazyP.Call(uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(filter))),
  uintptr(layer),
  uintptr(priority),
  uintptr(flags),
 )

 fmt.Println("LastError", lastError)

 fmt.Println("R1", r1)

 fmt.Println("R2", r2)

 return nil
}

What am I missing here. This is the first time I am trying to load windows 
dlls so a little confused about what am I missing here 


Regards
Amit


-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to