Jump to content

Resources RCData Lang ID issue


Recommended Posts

Without the need for third party software like ResourceHacker.

Spoiler

Screenshotrc.png

As you can see in the picture, I want to make lang id value 2057, I tried it but there is no change.

#AutoIt3Wrapper_Res_Language=2057
;~ #AutoIt3Wrapper_Res_File_Add|SCRIPT, rt_rcdata, SCRIPT, 2057

There is an udf here and it is no longer supported, I don't know how to change it.

https://www.autoitscript.com/forum/topic/162499-resourcesex-udf/?do=findComment&comment=1423358

 

Edited by youtuber
Link to comment
Share on other sites

  • Developers

As far as I remember, AutoIt3Wrapper uses the "#AutoIt3Wrapper_Res_Language=2057" for the Version resource only.
The RCDATA language setting is done by AutoIt3 itself and I don't see a #PRAGMA option for it.
Why would the  RCDATA language be changed for this block?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

... but why do you need it to be 2057 for this resource..... In other words: why do you care? 

This resource is the script and doesn't set the language field....  So what?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I did an experiment for this but it doesn't change I have an error in my codes

#Include <WinAPI.au3>

_UpdateResource(@ScriptDir & "\" & "AUTOIT.exe",10 ,"RCData",2057,False,"SCRIPT")

Func _UpdateResource($sFile = "",$lpType = "" ,$lpName = "", _
$wLanguage = "",$bDiscard = False,$InpResFile = "")

$hUpdate =  _BeginUpdateResource($sFile)
Local $result, $hFile, $tSize, $tBuffer, $pBuffer,$bread = 0

$hFile = _WinAPI_CreateFile($InpResFile, 2, 2)
IF @error Then Return 0
$tSize = FileGetSize($InpResFile)
IF @error Then Return 0
$tBuffer = DllStructCreate("char Text[" & $tSize & "]")
IF @error Then Return 0
$pBuffer = DllStructGetPtr($tBuffer)
IF @error Then Return 0
_WinAPI_ReadFile($hFile, $pBuffer, FileGetSize($InpResFile), $bread, 0)
IF @error Then Return 0
_WinAPI_CloseHandle($hFile)
IF @error Then Return 0
$result = DllCall("kernel32.dll","int","UpdateResource","hwnd",$hUpdate,"long",$lpType,"str",$lpName,"short",$wLanguage, _
"ptr",$pBuffer, _
"DWORD",$tSize)
IF @error Then
Return 0
Else
_EndUpdateResource($hUpdate,$bDiscard)
Return 1
EndIf
EndFunc

Func _BeginUpdateResource($sFile)
$aReturn = DllCall("kernel32.dll","int","BeginUpdateResource","str",$sFile,"int",False)
Return $aReturn[0]
EndFunc

Func _EndUpdateResource($hResource,$bDiscard = 0)
$result = DllCall("kernel32.dll", "int", "EndUpdateResource", "int", $hResource, "int", $bDiscard)
EndFunc

 

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...