函数参考


_WinAPI_LoadIndirectString

Extracts the string from the specified resource when given an indirect string.

#Include <WinAPIEx.au3>
_WinAPI_LoadIndirectString ( $sStrIn )

参数

$sStrIn The input indirect string.

返回值

Success The output string.
Failure Empty string and sets the @error flag to non-zero, @extended flag may contain the system error code.

注意/说明

If the string is an indirect string (a string beginning with the "@" symbol), it is in the following form.

@filename,resource

The string is extracted from the file named, using the resource value as a locator. If the resource value is
zero or greater, the number becomes the index of the string in the binary file. If the number is negative,
it becomes a resource ID. An indirect string can be appended with a version modifier, as shown here:

@filename,resourcev2

This form can be used when a string is changed but still uses the same index or resource ID as the old string.
Without a version modifier, the Multilingual User Interface (MUI) cache would not recognize that the string had
changed and would continue to use the old value. By appending the version modifier, the value is seen as a
new resource and is added to the cache. Note that it is recommended that you use a new resource ID or index
for a new string, and use a version modifier only when that is not possible.

If the input string is not an indirect string, the function returns an input string unchanged.

相关

详情参考

在MSDN中搜索


示例/演示


#Include <WinAPIEx.au3>

Opt('MustDeclareVars', 1)

ConsoleWrite(_WinAPI_LoadIndirectString('@"' & @AutoItExe & '",-122') & @CR)