Roman
02/14/2019, 11:47 AMDominaezzz
02/14/2019, 12:30 PMAtomicReference<String>
?Roman
02/14/2019, 1:54 PMDominaezzz
02/14/2019, 1:59 PM@kotlin.native.SharedImmutable var lang = AtomicReference("")
.Dominaezzz
02/14/2019, 1:59 PMlang.value = "Thread"
.Dominaezzz
02/14/2019, 2:00 PMRoman
02/14/2019, 2:04 PMsvyatoslav.scherbina
02/14/2019, 2:07 PMval
instead.Roman
02/14/2019, 2:20 PMDominaezzz
02/14/2019, 3:23 PMsvyatoslav.scherbina
02/15/2019, 7:14 AMGetKeyboardLayoutName
documentation.Roman
02/16/2019, 12:18 PMGetKeyboardLayoutName
function?same C # code works without problemsRoman
02/16/2019, 12:20 PMflow collapses
- it means the program ends. And try -catch
does not catch errorsDominaezzz
02/16/2019, 12:24 PMval Input = allocArray<WCHARVar>(KL_NAMELENGTH)
instead.Dominaezzz
02/16/2019, 12:25 PMInput.ptr
to just Input
.Dominaezzz
02/16/2019, 12:26 PMGetKeyboardLayoutName
before calling toKString()
. https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getkeyboardlayoutnamewRoman
02/16/2019, 12:36 PMallocArray <WCHARVar>
instead of alloc <WCHARVar>
?
In val Input
, a value equal to" 00000409 "is written, why is an array allocated for it?
What phrase in the documentation is understandable?Thanks a lot, it made the code work, but it didn't make me understand.Dominaezzz
02/16/2019, 12:39 PMThe buffer (of at least KL_NAMELENGTH characters in length) that receives the name of the input locale identifier, including the terminating null character. This will be a copy of the string provided to the LoadKeyboardLayout function, unless layout substitution took place.
Dominaezzz
02/16/2019, 12:40 PMRoman
02/16/2019, 12:43 PMRoman
02/16/2019, 12:50 PMmemScoped
block, and therefore it must be able to write the value a second time, no?Dominaezzz
02/16/2019, 12:53 PMRoman
02/16/2019, 12:55 PMalloc <WCHARVar>
, did I understand you correctly?Dominaezzz
02/16/2019, 12:58 PMRoman
02/16/2019, 1:04 PMWCHARVar
is it not an array or is it a single cell array?
There is an example that shows that you can write a long value int main ()
{
const wchar_t * s = L "Hello, World!";
std :: wcout << s << std :: endl;
}
And I get to write the value, but only once.Dominaezzz
02/16/2019, 1:10 PMRoman
02/16/2019, 1:14 PM