?
hi flenders!
ich habe gerade den code hier ausprobiert:
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevIsntance, PSTR szCmdine, int iCmdShow)
{
HANDLE h;
int Anz;
BOOL res;
WCHAR* buffw;
char buff[] ="Neue String";
buffw = new WCHAR[256];
// ASCII-String in Unicode-String umwandeln
Anz = MultiByteToWideChar(CP_ACP, 0, buff, lstrlen(buff), NULL, 0);
MultiByteToWideChar( CP_ACP, 0, buff, lstrlen(buff), buffw, Anz);
h = BeginUpdateResource("C:\\eineexe.exe", TRUE);
res = UpdateResource(h, RT_STRING, "1", MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), buffw, 512);
EndUpdateResource(h, FALSE);
return 0;
}
...Wenn ich jetzt aber die Anwendung "eineexe" mit dem ResourceHacker
öffne und mir den Stringinhalt ansehen will, kommt die Fehlermeldung
"Access violation at adress 77E5AB08 in module 'kernel32.dll'. Read of address 00A1C000"
ich hoffe mal, dass das "experiment" jetzt keine bleibenden schäden in windows
hinterlassen hat...
könnt ihr mir noch einmal helfen?