Einzelnen Beitrag anzeigen

WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#1

How to delete resource? - code don't working

  Alt 17. Mär 2011, 16:02
I have this:

Delphi-Quellcode:
var
  hResource: THandle;
  lpData: array [0..255] of Char;
  B: Boolean;
begin
  lpData := '';
  hResource := BeginUpdateResource(PChar(Edit1.Text), False);
  B := UpdateResource(hResource, 'RCDATA', 'DVCLAL', 0, @lpData[1], Length(lpData));
  EndUpdateResource(hResource, False);

  lpData := '';
  hResource := BeginUpdateResource(PChar(Edit1.Text), False);
  UpdateResource(hResource, 'RCDATA', 'PACKAGEINFO', MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), @lpData[1], Length(lpData));
  EndUpdateResource(hResource,False);
end;
File updated, but resource still inside I tried also with RT_RCDATA, but don't working too
  Mit Zitat antworten Zitat