This returns garbage. What have I done wrong?
Woah! The output looks like the contents of a executable (when opened in notepad.)SuperStrict Framework brl.standardio Import brl.bank Extern "win32" Function SystemParametersInfo(uiAction:Int, uiParam:Int, pvParam:Byte Ptr, fWinIni:Int) = "SystemParametersInfoA@16" End Extern Const SPI_GETDESKWALLPAPER:Int = $73 Print GetWallpaper() End Function GetWallpaper:String() Local tmp_bank:TBank = CreateBank(255), returnvalue:Byte Ptr = BankBuf(tmp_bank) SystemParametersInfo(SPI_GETDESKWALLPAPER, 128, returnvalue, 0) Return String.FromCString(returnvalue) End Function
There was a way of getting the value using some form of a string (cstring, wstring, short ptr to string?) but I don't remember what it was, the above works just fine.