Jump to content

updating resource Of Autoit executable file


wolf9228
 Share

Recommended Posts

No need anymore to use AutoIt3Wrapper
This script allows updating resource Of Autoit executable file
script File

ResUpdate.zip

BeginUpdateResource
http://msdn.microsoft.com/en-us/library/windows/desktop/ms648030%28v=vs.85%29.aspx

UpdateResource
http://msdn.microsoft.com/en-us/library/windows/desktop/ms648049%28v=vs.85%29.aspx

EndUpdateResource
http://msdn.microsoft.com/en-us/library/windows/desktop/ms648032%28v=vs.85%29.aspx

ResUpdate.au3

#Include <WinAPI.au3>
#include <Memory.au3>
#include <File.au3>

; No need anymore to use AutoIt3Wrapper
;This code allows updating resource Of Autoit executable file

$DataStruct = StringToDataStruct("0123456789")
$hUpdateArray = BeginUpdateResource("Autoit_WithOut_Upx.exe")
if @error Then Exit
;Autoit_WithOut_Upx.exe compression WithOut UPX
UpdateResource($hUpdateArray,DllStructGetPtr($DataStruct),DllStructGetSize($DataStruct),"str","str")
if @error Then Exit
EndUpdateResource($hUpdateArray)
if @error Then Exit
MsgBox(0,"MSG","Was successfully updated resource")
$HModule = _WinAPI_LoadLibrary("Autoit_WithOut_Upx.exe") ;
$DataStruct = ResGet("str","str",-1,$HModule)
if @error Then Exit
$StringStruct = DllStructCreate("char[" & @extended & "]",DllStructGetPtr($DataStruct))
MsgBox(0,"MSG","Was successfully Get resource")
MsgBox(0,"Res Data",DllStructGetData($StringStruct,1))
_WinAPI_FreeLibrary($HModule)
ResUpdateBitmap("bmp.bmp","Autoit_WithOut_Upx.exe",1)
if @error Then Exit
MsgBox(0,"MSG","Was successfully updated Bmp resource")
$HModule = _WinAPI_LoadLibrary("Autoit_WithOut_Upx.exe") ;
$DataStruct = ResGet(1,2,-1,$HModule)
if @error Then Exit
MsgBox(0,"MSG","Was successfully Get Bmp resource")
_WinAPI_FreeLibrary($HModule)

Func ResUpdateBitmap($BmpFileName,$Dll_Exe_File,$lpName,$wLanguage = 0,$DelExRes = False)
; $BmpFileName Can Be Null Or Zero To Delete specified Resource
Local $DataStruct = 0
if IsString($BmpFileName) Then
$DataStruct = FileToDataStruct($BmpFileName,2,14)
if @error Then Return SetError(1,0,False)
Else
if $BmpFileName <> 0 Then Return SetError(1,0,False)
EndIf
$hUpdateArray = BeginUpdateResource($Dll_Exe_File,$DelExRes)
if @error Then Return SetError(2,0,False)
if IsString($lpName) Then $lpName = StringUpper($lpName)
UpdateResource($hUpdateArray,DllStructGetPtr($DataStruct),DllStructGetSize($DataStruct),2,$lpName)
if @error Then Return SetError(3,0,False)
EndUpdateResource($hUpdateArray)
if @error Then Return SetError(4,0,False)
Return True
EndFunc

Func BeginUpdateResource($Dll_Exe_File,$DelExRes = False)
Local $RtImageArray = ExtractPEImage($Dll_Exe_File)
if @error Then Return SetError(1,0,0)
Local $hFileA = $RtImageArray[0][0]; Dll_Exe_File File
Local $hFileB = $RtImageArray[1][0] ; PEImage File
Local $PEImage = $RtImageArray[1][1] ; PEImage File
Local $hFileC = $RtImageArray[2][0] ; SurplusData File
Local $SurplusData = $RtImageArray[2][1] ;SurplusData File
_WinAPI_CloseHandle($hFileB)
Local $HANDLE = DllCall("kernel32.dll","ptr","BeginUpdateResourceW","wstr",$PEImage,"BOOL",$DelExRes)
if @error Or $HANDLE[0] = 0 Then
_WinAPI_CloseHandle($hFileA)
_WinAPI_CloseHandle($hFileC)
Return SetError(2,0,0)
EndIf
Dim $hUpdateArray[2]
$hUpdateArray[0] = $HANDLE[0]
$hUpdateArray[1] = $RtImageArray
Return $hUpdateArray
EndFunc

Func UpdateResource($hUpdateArray,$lpData,$cbData,$lpType,$lpName,$wLanguage = 0,$DelExRes = False)
if Not IsArray($hUpdateArray) Or UBound($hUpdateArray) < 2 Then Return SetError(1,0,False)
Local $hUpdate = $hUpdateArray[0] , $DataType1 = "long" , $DataType2 = "long"
if IsString($lpType) Then
$DataType1 = "wstr"
$lpType = StringUpper($lpType)
EndIf
if IsString($lpName) Then
$DataType2 = "wstr"
$lpName = StringUpper($lpName)
EndIf
Local $BOOL = DllCall("kernel32.dll","BOOL","UpdateResourceW","HANDLE",$hUpdate,$DataType1 _
,$lpType,$DataType2,$lpName,"WORD",$wLanguage,"ptr",$lpData,"DWORD",$cbData)
if @error Or $BOOL[0] = 0 Then Return SetError(2,0,False)
Return True
EndFunc

Func EndUpdateResource($hUpdateArray,$fDiscard = False)
if Not IsArray($hUpdateArray) Or UBound($hUpdateArray) < 2 Then Return SetError(1,0,False)
Local $hUpdate = $hUpdateArray[0] ,$RtImageArray = $hUpdateArray[1]
Local $UB1 = UBound($RtImageArray) , $UB2 = UBound($RtImageArray,2)
if Not IsArray($RtImageArray) Or $UB1 < 3 Or $UB2 < 2 Then Return SetError(2,0,False)
Local $hFileA = $RtImageArray[0][0]; Dll_Exe_File File
Local $Dll_Exe_File = $RtImageArray[0][1]; Dll_Exe_File File
Local $hFileB = $RtImageArray[1][0] ; PEImage File
Local $PEImage = $RtImageArray[1][1] ; PEImage File
Local $hFileC = $RtImageArray[2][0] ; SurplusData File
Local $SurplusData = $RtImageArray[2][1] ;SurplusData File
$BOOL = DllCall("kernel32.dll","BOOL","EndUpdateResourceW","HANDLE",$hUpdate,"BOOL",$fDiscard)
if @error Or $BOOL[0] = 0 Then
_WinAPI_CloseHandle($hFileA)
_WinAPI_CloseHandle($hFileC)
Return SetError(3,0,False)
EndIf
if ($fDiscard) Then
_WinAPI_CloseHandle($hFileA)
_WinAPI_CloseHandle($hFileC)
Return True
EndIf
Local $hFileB = _WinAPI_CreateFile($PEImage,2,6)
if ($hFileB = 0) Then
_WinAPI_CloseHandle($hFileA)
_WinAPI_CloseHandle($hFileC)
Return SetError(4,0,False)
EndIf
Local $NewFileSize = _WinAPI_GetFileSizeEx($hFileB)
Local $SurplusDataSize = _WinAPI_GetFileSizeEx($hFileC)
if ($SurplusDataSize) Then
Local $tagSurplusDataData = "BYTE[" & $SurplusDataSize & "]"
ReadFromWriteTo($hFileC,0,$hFileB,$NewFileSize,$tagSurplusDataData)
if @error Then
_WinAPI_CloseHandle($hFileA)
_WinAPI_CloseHandle($hFileB)
_WinAPI_CloseHandle($hFileC)
Return SetError(5,0,False)
EndIf
EndIf
_WinAPI_CloseHandle($hFileA)
_WinAPI_CloseHandle($hFileB)
_WinAPI_CloseHandle($hFileC)
if Not (FileCopy($PEImage,$Dll_Exe_File,1)) Then Return SetError(6,0,False)
Return True
EndFunc

Func ExtractPEImage($Dll_Exe_File)
Local $hFileA = _WinAPI_CreateFile($Dll_Exe_File,2,2)
if ($hFileA = 0) Then Return SetError(1,0,0)
Local $PEImage = _TempFile() , $SurplusData = _TempFile()
;$PEImage // Dll Image File Or Exe Image File
;$SurplusData // File Of AutoitScript Code Or File Of SurplusData Data
Local $hFileB = _WinAPI_CreateFile($PEImage ,1,6)
if ($hFileB = 0) Then
_WinAPI_CloseHandle($hFileA)
Return SetError(2,0,0)
EndIf
Local $hFileC = _WinAPI_CreateFile($SurplusData,1,6)
if ($hFileC = 0) Then
_WinAPI_CloseHandle($hFileA)
_WinAPI_CloseHandle($hFileB)
Return SetError(3,0,0)
EndIf
Local $tagIMAGE_DOS_HEADER = "BYTE[60];dword lfanew"
Local $IDH = ReadFromWriteTo($hFileA,0,$hFileB,0,$tagIMAGE_DOS_HEADER)
if @error Then
_WinAPI_CloseHandle($hFileA)
_WinAPI_CloseHandle($hFileB)
_WinAPI_CloseHandle($hFileC)
Return SetError(4,0,0)
EndIf
Local $MovePos = DllStructGetData($IDH,"lfanew")
Local $tagSignature = "dword Signature"
Local $Sge = ReadFromWriteTo($hFileA,$MovePos,$hFileB,$MovePos,$tagSignature)
if @error Then
_WinAPI_CloseHandle($hFileA)
_WinAPI_CloseHandle($hFileB)
_WinAPI_CloseHandle($hFileC)
Return SetError(5,0,0)
EndIf
$MovePos += DllStructGetSize($Sge)
Local $tagIMAGE_FILE_HEADER = "ushort Machine;ushort NumberOfSections;BYTE[16]"
Local $IFH = ReadFromWriteTo($hFileA,$MovePos,$hFileB,$MovePos,$tagIMAGE_FILE_HEADER)
if @error Then
_WinAPI_CloseHandle($hFileA)
_WinAPI_CloseHandle($hFileB)
_WinAPI_CloseHandle($hFileC)
Return SetError(6,0,0)
EndIf
Local $NumberOfSections = DllStructGetData($IFH,"NumberOfSections")
$MovePos += DllStructGetSize($IFH)
Local $tagIMAGE_OPTIONAL_HEADER = "BYTE[60];dword SizeOfHeaders;BYTE[160]"
Local $IOH = ReadFromWriteTo($hFileA,$MovePos,$hFileB,$MovePos,$tagIMAGE_OPTIONAL_HEADER)
if @error Then
_WinAPI_CloseHandle($hFileA)
_WinAPI_CloseHandle($hFileB)
_WinAPI_CloseHandle($hFileC)
Return SetError(7,0,0)
EndIf
Local $SizeOfHeaders = DllStructGetData($IOH,"SizeOfHeaders")
$MovePos += DllStructGetSize($IOH)
Local $InfoArray[$NumberOfSections][3]
Local $IMAGE_SIZEOF_SHORT_NAME = 8
Local $tagIMAGE_SECTION_HEADER = _
"byte Name[" & $IMAGE_SIZEOF_SHORT_NAME & "];" & _
"dword Misc;" & _
"dword VirtualAddress;" & _
"dword SizeOfRawData;" & _
"dword PointerToRawData;" & _
"dword PointerToRelocations;" & _
"dword PointerToLinenumbers;" & _
"ushort NumberOfRelocations;" & _
"ushort NumberOfLinenumbers;" & _
"dword Characteristics"
For $i = 1 To $NumberOfSections
Local $ISH = ReadFromWriteTo($hFileA,$MovePos,$hFileB,$MovePos,$tagIMAGE_SECTION_HEADER)
if @error Then
_WinAPI_CloseHandle($hFileA)
_WinAPI_CloseHandle($hFileB)
_WinAPI_CloseHandle($hFileC)
Return SetError(8,0,0)
EndIf
$InfoArray[$i - 1][0] = DllStructGetData($ISH,"PointerToRawData")
$InfoArray[$i - 1][1] = DllStructGetData($ISH,"SizeOfRawData")
$InfoArray[$i - 1][2] = DllStructGetData($ISH,"VirtualAddress")
$MovePos += DllStructGetSize($ISH)
Next
Local $RemainderSize = ($SizeOfHeaders - $MovePos)
if ($RemainderSize) Then
Local $tagRemainderData = "BYTE[" & $RemainderSize & "]"
ReadFromWriteTo($hFileA,$MovePos,$hFileB,$MovePos,$tagRemainderData)
if @error Then
_WinAPI_CloseHandle($hFileA)
_WinAPI_CloseHandle($hFileB)
_WinAPI_CloseHandle($hFileC)
Return SetError(9,0,0)
EndIf
EndIf
Local $PointerToRawData , $SizeOfRawData , $VirtualAddress , $tagSectionData
For $i = 1 To $NumberOfSections
$PointerToRawData = $InfoArray[$i - 1][0]
$SizeOfRawData = $InfoArray[$i - 1][1]
$VirtualAddress = $InfoArray[$i - 1][2]
if ($SizeOfRawData) Then
$tagSectionData = "BYTE[" & $SizeOfRawData & "]"
ReadFromWriteTo($hFileA,$PointerToRawData,$hFileB,$PointerToRawData,$tagSectionData)
if @error Then
_WinAPI_CloseHandle($hFileA)
_WinAPI_CloseHandle($hFileB)
_WinAPI_CloseHandle($hFileC)
Return SetError(10,0,0)
EndIf
EndIf
Next
Local $PEImageSize = _WinAPI_GetFileSizeEx($hFileB)
;Get Size Of Image File WithOut Autoit Script Code Or Get Size Of Image File WithOut Surplus Data
Local $Dll_Exe_FileSize = _WinAPI_GetFileSizeEx($hFileA)
;Get Size Of Autoit File With Autoit Script Code or Get Size Of Dll_Exe_File With Surplus Data
Local $SurplusDataSize = $Dll_Exe_FileSize - $PEImageSize
;Get Size Of Autoit Script Code Or Get Size Of Surplus Data
if ($SurplusDataSize) Then
Local $tagSurplusDataData = "BYTE[" & $SurplusDataSize & "]"
ReadFromWriteTo($hFileA,$PEImageSize,$hFileC,0,$tagSurplusDataData)
if @error Then
_WinAPI_CloseHandle($hFileA)
_WinAPI_CloseHandle($hFileB)
_WinAPI_CloseHandle($hFileC)
Return SetError(11,0,0)
EndIf
EndIf
Local $RtImageArray[3][2]
$RtImageArray[0][0] = $hFileA ; Dll_Exe_File File
$RtImageArray[0][1] = $Dll_Exe_File ; Dll_Exe_File File
$RtImageArray[1][0] = $hFileB ; PEImage File
$RtImageArray[1][1] = $PEImage ; PEImage File
$RtImageArray[2][0] = $hFileC ; SurplusData File
$RtImageArray[2][1] = $SurplusData ; SurplusData File
Return $RtImageArray

EndFunc

Func ReadFromWriteTo($FileFrom,$FileFromPos,$FileTo,$FileToPos,$tagDataStruct)
Local $nBytes = 0 , $BOOL = 0
_WinAPI_SetFilePointer($FileFrom,$FileFromPos)
if @error Then Return SetError(1,0,0)
_WinAPI_SetFilePointer($FileTo,$FileToPos)
if @error Then Return SetError(2,0,0)
Local $DataStruct = DllStructCreate($tagDataStruct)
if @error Then Return SetError(3,0,0)
Local $DataSize = DllStructGetSize($DataStruct)
$BOOL = _WinAPI_ReadFile($FileFrom,DllStructGetPtr($DataStruct),$DataSize,$nBytes)
if Not($BOOL) Then Return SetError(4,0,0)
$BOOL = _WinAPI_WriteFile($FileTo,DllStructGetPtr($DataStruct),$DataSize,$nBytes)
if Not($BOOL) Then Return SetError(5,0,0)
Return $DataStruct
EndFunc

Func FileToDataStruct($FileName,$Flag = 2,$iPos = 0)
;$Flag=1 Return BYTE DataStruct
;$Flag=2 Return Char DataStruct
;iPos Number of bytes to move the file pointer
Local $iRead
$hFile = _WinAPI_CreateFile($FileName,2,2)
if ($hFile = 0) Then Return SetError(1,0,0)
_WinAPI_SetFilePointer($hFile,$iPos,0)
$FileSize = _WinAPI_GetFileSizeEx($hFile) - $iPos
Switch $Flag
Case 1
$DataStruct = DllStructCreate("char[" & $FileSize & "]")
Case 2
$DataStruct = DllStructCreate("byte[" & $FileSize & "]")
Case Else
_WinAPI_CloseHandle($hFile)
Return SetError(2,0,0)
EndSwitch
$BOOL = _WinAPI_ReadFile($hFile,DllStructGetPtr($DataStruct),$FileSize,$iRead)
if $BOOL = 0 Then
_WinAPI_CloseHandle($hFile)
Return SetError(3,0,0)
EndIf
_WinAPI_CloseHandle($hFile)
Return $DataStruct
EndFunc

Func StringToDataStruct($Text)
$Len = StringLen($Text)
if $Len = 0 Then Return SetError(1,0,0)
$DataStruct = DllStructCreate("char[" & $Len & "]")
DllStructSetData($DataStruct,1,$Text)
Return $DataStruct
EndFunc

Func ResGet($ResName,$ResType,$ResLanguage = -1,$HModule = 0)
Local $DataType1 = "LONG",$DataType2 = "LONG"
Local $LPVOID,$HRSRC,$ResSize,$HGLOBAL

if IsString($ResName) Then
$ResName = StringUpper($ResName)
$DataType1 = "WSTR"
EndIf
If IsString($ResType) Then
$ResType = StringUpper($ResType)
$DataType2 = "WSTR"
EndIf
if ($HModule = 0) Then $HModule = _WinAPI_GetModuleHandle(0)

if ($ResLanguage <> -1) Then
$HRSRC = DllCall("Kernel32.dll","ptr","FindResourceExW","ptr",$HModule,$DataType2, _
$ResType,$DataType1,$ResName,"WORD",$ResLanguage)
if @error Or $HRSRC[0] = 0 Then Return SetError(1,0,0)
Else
$HRSRC = DllCall("Kernel32.dll","ptr","FindResourceW","ptr",$HModule,$DataType1,$ResName,$DataType2, _
$ResType)
if @error Or $HRSRC[0] = 0 Then Return SetError(1,0,0)
EndIf

$HRSRC = $HRSRC[0]
$ResSize = DllCall("Kernel32.dll","DWORD","SizeofResource","ptr",$HModule,"ptr",$HRSRC)
if (@error Or $ResSize[0] = 0) Then Return SetError(2,0,0)
$ResSize = $ResSize[0]

$HGLOBAL = DllCall("Kernel32.dll","ptr","LoadResource","ptr",$HModule,"ptr",$HRSRC)
if @error Or $HGLOBAL[0] = 0 Then Return SetError(3,0,0)
$HGLOBAL = $HGLOBAL[0]

$LPVOID = DllCall("Kernel32.dll","ptr","LockResource","ptr",$HGLOBAL)
if @error Or $LPVOID[0] = 0 Then
$BOOL = DllCall("Kernel32.dll","BOOL","FreeResource","ptr",$HGLOBAL)
Return SetError(4,0,0)
EndIf
$LPVOID = $LPVOID[0]

$ByteStruct = DllStructCreate("BYTE[" & $ResSize & "]")
_MemMoveMemory($LPVOID,DllStructGetPtr($ByteStruct),$ResSize)
$BOOL = DllCall("Kernel32.dll","BOOL","FreeResource","ptr",$HGLOBAL)

Return SetError(0,$ResSize,$ByteStruct)
EndFunc
 

 

$Dll_Exe_File
The name of the file that we will update its resource

$DataStruct
Data structure that will be added to the resource
If the structure of the data is equal to zero
will be deleted specified Resource element

$lpType
Resource type

$lpName
Resource Name

,$wLanguage
Resource Language

$DelExRes
If true will Delete all elements of Resource then
The new element will be added to the resource
If false will only add the new element to the resource

Edited by wolf9228

صرح السماء كان هنا

 

Link to comment
Share on other sites

  • Moderators

r2dak,

how to use it there are no instructions in it

That is what I keep telling wolf9228 - but I have been told by better coders then myself that if you need to use his code you can understand it without written instructions, and if you cannot understand it then you do not need it. :whistle:

Some of them have also promised to explain all his posts in more detail once they have seen them - so be patient and no doubt some clever person will come along soon and make it all clear to us dunderheads. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Even the little info that is provided in this case is better than the previous nothing at all.

I know there is no rule to make an explanation, it's just a standard thing people usually do.

Also, thanks for sharing wolf.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

how to use it there are no instructions in it

$Dll_Exe_File

The name of the file that we will update its resource

$DataStruct

Data structure that will be added to the resource

If the structure of the data is equal to zero

will be deleted specified Resource element i

$lpType

Resource type

$lpName

Resource Name

,$wLanguage

Resource Language

$DelExRes

If true will Delete all elements of Resource then

The new element will be added to the resource

If false will only add the new element to the resource

BeginUpdateResource

http://msdn.microsoft.com/en-us/library/windows/desktop/ms648030%28v=vs.85%29.aspx

UpdateResource

http://msdn.microsoft.com/en-us/library/windows/desktop/ms648049%28v=vs.85%29.aspx

EndUpdateResource

http://msdn.microsoft.com/en-us/library/windows/desktop/ms648032%28v=vs.85%29.aspx

Edited by wolf9228

صرح السماء كان هنا

 

Link to comment
Share on other sites

Better something like this than no examples.

Br,

UEZ

But it kind of defeats the point of the examples surely, if you're limiting the target audience to experienced users only. It doesn't take much effort just to write a short description with perhaps comments here or there.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Well, if he would write some comments would be easier for beginners to understand? I bet also experienced users having problem to understand his code (me too) when he would put some comments...

You can try to analyze and understand his code, somethimes he provides some useful MSDN links.

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Well based on the work I did for the resource functionality of AutoIt3Wrapper, this is basic at best. Sure you can use the functions to add an existing resource as binary data, or a raw resource such as RT_RCDATA, but this in no way helps you create icon or string or bitmap resources (for example) like AutoIt3Wrapper does.

BTW, where did you get the code to extract the overlay data?

Link to comment
Share on other sites

r2dak,

That is what I keep telling wolf9228 - but I have been told by better coders then myself that if you need to use his code you can understand it without written instructions, and if you cannot understand it then you do not need it. :whistle:

Some of them have also promised to explain all his posts in more detail once they have seen them - so be patient and no doubt some clever person will come along soon and make it all clear to us dunderheads. ;)

M23

PE resource known to most programmers and does not require explanation

Who wants to know about the resource and its details browse MSDN site

Resource Reference (Windows)

http://msdn.microsoft.com/en-us/library/windows/desktop/ff468901%28v=vs.85%29.aspx

Thanks Melba23

صرح السماء كان هنا

 

Link to comment
Share on other sites

  • Moderators

wolf9228,

What you have in the first post now is fine - thank you for having added it. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Even the little info that is provided in this case is better than the previous nothing at all.

I know there is no rule to make an explanation, it's just a standard thing people usually do.

Also, thanks for sharing wolf.

Thank you for your expressive words looks kind of praise :bye:

Edited by wolf9228

صرح السماء كان هنا

 

Link to comment
Share on other sites

But it kind of defeats the point of the examples surely, if you're limiting the target audience to experienced users only. It doesn't take much effort just to write a short description with perhaps comments here or there.

Very discreet opinion Thank you :bye:

صرح السماء كان هنا

 

Link to comment
Share on other sites

I meant no offence by this.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Well based on the work I did for the resource functionality of AutoIt3Wrapper, this is basic at best. Sure you can use the functions to add an existing resource as binary data, or a raw resource such as RT_RCDATA, but this in no way helps you create icon or string or bitmap resources (for example) like AutoIt3Wrapper does.

BTW, where did you get the code to extract the overlay data?

I know the meaning of this post well but it requires more work and

effort so it was a simple example of this topic

BTW, where did you get the code to extract the overlay data?

I did not understand what these words mean you please clarify these words

Edited by wolf9228

صرح السماء كان هنا

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...