Why does `SystemTimeToFileTime` return 0, I messed...
# kotlin-native
r
Why does
SystemTimeToFileTime
return 0, I messed up with types? For the structure, should I do
alloc
or` allocArray`?
Copy code
val systemTime = alloc<_SYSTEMTIME>()
            systemTime.wDay=1u
            systemTime.wHour=11u
            systemTime.wMinute=11u
            systemTime.wSecond=11u
            systemTime.wMonth=11u
            systemTime.wYear=11u
        val fileTime = alloc<_FILETIME>()

        println(SystemTimeToFileTime(systemTime.ptr, fileTime.ptr))
s
r
systemTime.wYear=11u replaced by systemTime.wYear=2011u. Documentation nothing to do with
s
This replacement helps because you’ve provided incorrect data to
SystemTimeToFileTime
. Reading the documentation might have helped to find this out. And this issue has nothing to do with Kotlin/Native.