the code doesn't work either wide string or not.
BUT the second code works !
Code: Select all
UpdateResourceW(update, PWideChar(RT_STRING), MAKEINTRESOURCEW(ResName), MAKELANGID(LANG_JAPANESE,SUBLANG_DEFAULT ), PWideChar(wideString(S)),(Length(S) + 1) * 2);
thanks very much.
BUT I STILL HAVE 2 PROBLEMS LEFT.
1. the first letter (S[0]) isn't written to the string table.
ex) WriteStr('C:\abc.exe',1,'abcdefghijklmno');
writes 0, "bcdefghijklmno"
2. I can't specify wich index to write to.
if i use your code, the string tabel starts from "0".
but when i changed "Length(S) + 1) * 2);" to "Length(S) + 1) * 2 +100);"
and wrote a larger string, it made index "1" too. may be a hint?
ex)
0, "2345678901234567890123456789012345678901234567890"
1, "2345678901234567890123456789012345678901234567890"
it doesn't write "1" due to problem #1
thanks anyway, if you can't figure it out, don't mind.
you've helped me alot.
thanks,
Sigma