In delphi, how do you write a MemoryStream for a data resource?
procedure StringtoRes (filename:string; Inputstream: TMemoryStream); var hUpdate: THandle; begin hUpdate := BeginUpdateResource(PChar(filename), True); UpdateResource(hUpdate, RT_RCDATA, 'ID', LANG_NEUTRAL,InputStream,InputStream.Size); EndUpdateResource(hUpdate,False); end;
This code gives me an access violation and an intense sense of inadequacy, because I don’t even know where to start fixing it. Is anyone
source share