Created
May 20, 2018 07:05
-
-
Save FGFW/9463de49a9fd6025bb7bd5ee0c72545a to your computer and use it in GitHub Desktop.
nim GetSystemDirectory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proc GetSystemDirectory(lptstr:WideCString, usize:int):int32 {.stdcall, | |
dynlib: "kernel32", importc: "GetSystemDirectoryW".} | |
proc GetSystemDirectory():string = | |
var sysdir = newWideCString("",128) | |
echo GetSystemDirectory(sysdir,128) | |
result = $sysdir | |
echo result | |
discard GetSystemDirectory() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment