Einzelnen Beitrag anzeigen

Der schöne Günther

Registriert seit: 6. Mär 2013
6.110 Beiträge
 
Delphi 10 Seattle Enterprise
 
#4

AW: UpdateResource (XML)

  Alt 29. Mär 2017, 18:55
Mir sind noch zwei Dinge zu UpdateResource aufgefallen. Sie lösen das Problem zwar nicht, aber vielleicht geht es in die Richtung:

Die Doku zu den letzten beiden Parametern sagt:
Zitat:
lpData [in, optional]
Type: LPVOID

The resource data to be inserted into the file indicated by hUpdate. 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 to be stored in the file indicated by hUpdate, 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 and cbData is 0, the specified resource is deleted from the file indicated by hUpdate.
cbData [in]
Type: DWORD

The size, in bytes, of the resource data at lpData.
1) Strings müssen zwingend Unicode sein. Ich habe es versucht, macht keinen Unterschied.
2) Die Größe des Streams nimmt ein DWORD auf, TStream.Size ist aber ein Int64. Also aufpassen dass du nicht mehr alsa 4GB reinstecken willst

Ich sehe nur dass es mit kleinen Dateien funktioniert, will ich eine 5-10 MB große Textdatei reinstecken, ist die exe kaputt.

Hier brabbelt jemand etwas von einem angeblich sehr kleinen Limit, aber das kann doch nicht sein?
http://stackoverflow.com/q/25748057/2298252
  Mit Zitat antworten Zitat