nwh
07/06/2018, 9:17 PMDWORD
- how can I construct this?olonho
07/06/2018, 10:20 PM<http://kotlin.Int|kotlin.Int>
nwh
07/07/2018, 3:07 AMC:\Users\N\AppData\Local\Temp\konan_temp2440511256202047371\combined.o:(.text+0x231af): undefined reference to `__imp_SetupDiGetClassDevsA'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
error: c:\Users\N\.konan\dependencies\msys2-mingw-w64-x86_64-gcc-7.2.0-clang-llvm-5.0.0-windows-x86-64/bin/clang++ invocation reported errors
I've adjusted my ddk.def
to include Setupapi.h
in the headers, and this is my new code:
import ddk.*
import platform.posix.GUID
import kotlinx.cinterop.*
fun main(args: Array<String>): Unit = memScoped {
val guid = alloc<GUID>()
HidD_GetHidGuid(guid.ptr)
SetupDiGetClassDevsA(guid.ptr, null, null, 2)
}
msink
07/07/2018, 3:58 AM