FAQ
How do you use syscall.SyscallX (not cgo) to call a Windows DLL function that uses floats in it's function parameters? Could someone show a working example?

(I tried using uintptr(math.Float32bits(x)) but it doesn't seem to work...)

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

Search Discussions

  • Daniel Theophanes at Aug 11, 2015 at 1:12 pm
    Hi Daniel,

    Alex has said that supporting floats with syscall is not supported because
    floats are not required for the windows API. In the past he has recommended
    using cgo for such use cases.

    -Daniel

    On Tuesday, August 11, 2015 at 5:35:58 AM UTC-7, Daniel Johansson wrote:

    How do you use syscall.SyscallX (not cgo) to call a Windows DLL function
    that uses floats in it's function parameters? Could someone show a working
    example?

    (I tried using uintptr(math.Float32bits(x)) but it doesn't seem to work...)
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Daniel Johansson at Aug 11, 2015 at 4:53 pm
    Ok thanks!

    /Daniel

    Den tisdag 11 augusti 2015 kl. 15:12:25 UTC+2 skrev Daniel Theophanes:
    Hi Daniel,

    Alex has said that supporting floats with syscall is not supported because
    floats are not required for the windows API. In the past he has recommended
    using cgo for such use cases.

    -Daniel

    On Tuesday, August 11, 2015 at 5:35:58 AM UTC-7, Daniel Johansson wrote:

    How do you use syscall.SyscallX (not cgo) to call a Windows DLL function
    that uses floats in it's function parameters? Could someone show a working
    example?

    (I tried using uintptr(math.Float32bits(x)) but it doesn't seem to
    work...)
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedAug 11, '15 at 12:35p
activeAug 11, '15 at 4:53p
posts3
users2
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase