Próbuję dodać zasoby do jakiegoś pliku wykonywalnego za pomocą funkcji winapi. Studiując Windows SDK doszedłem do takiego czegoś:
uchwyt:=BeginUpdateResource(PChar(open.filename), false);
UpdateResource(uchwyt, RT_RCDATA, 'Zasob', 0, ???, ???);
EndUpdateResource(uchwyt, false);
I teraz nie wiem co dać jako te ostatnie parametry, bo aby załadować np. bitmapę, używa się funkcji loadbitmap(), ikonę-loadicon(), a dowolny plik... [???] Przy okazji chętnie się dowiem, jak zmierzyć wielkość tego zasobu :)
Dwa ostatnie parametry updateresource() to:
<font color="green">lpData
Points to the resource data to be inserted into the executable file. If the resource is one of the predefined types, the data must be valid and properly aligned. Note that this is the raw binary data stored in the executable file, not the data provided by LoadIcon, LoadString, or other resource-specific load functions. All data containing strings or text must be in Unicode format; lpData must not point to ANSI data.
If lpData is NULL, the specified resource is deleted from the executable file.
cbData
Specifies the size, in bytes, of the resource data at lpData. </span>