ResPutFile()

Auto Hotkey

ResPutFile

Updates a resource in executable file (dll or exe).

OutputVar := ResPutFile(FilePath, Executable, Name , Type, Language)
Command  Example: ResPut A_ScriptDir "\MyFile.txt", A_ScriptDir "\MyDll.dll", "MYRESOURCE"
Function Example: Success := ResPut(A_ScriptDir "\MyFile.txt", A_ScriptDir "\MyDll.dll", "MYRESOURCE")

Parameters

OutputVar

The name of the variable in which to store true / 1 if resource was written and false / 0 otherwise.

FilePath

File to be included in resources.

Executable

Path to the executable file (dll or exe).

Name

The name of resource.

Type (optional)

Type of resource. Default is RCDATA (10).
See MSDN for default resource types.

Language (optional)

The language of resource, default 1033.

Remarks

If you wish to compress or encrypt your data you can use ZipFileRaw.

Related

ResGet, ResPutFile, ResExist, ResDelete, ResDllCreate, UnZipRawMemory

Example

FileRead,Data,*c %A_ScriptDir%\MYRES.RES
FileGetSize,sz,%A_ScriptDir%\MYRES.RES
ResPut(Data, sz, A_AhkPath, "MYRES.RES")