网站首页  词典首页

请输入您要查询的函数:

 

术语 beginupdateresource
释义 BeginUpdateResource
语法:
HANDLE BeginUpdateResource( LPCTSTR pFileName,
BOOL bDeleteExistingResources
);
BeginUpdateResource功能
返回的句柄,无论是语言中立的便携式可执行文件(文件号法律公告)或一个特定语言的资源文件(。mui文件),可以由UpdateResource函数用来添加,删除或替换二进制模块资源。
参数
pFileName
[in]指向一个空结束的字符串,指定二进制文件中,以更新的资源。应用程序必须能够获得写访问此文件,由pFileName引用的文件不能被正在执行。如果pFileName没有指定完整的路径,在当前目录中的文件系统搜索。
bDeleteExistingResources
[in]指定是否要删除pFileName参数的现有资源。如果此参数为TRUE,现有的资源将被删除,更新后的文件只包含资源,再加上使用UpdateResource功能。如果此参数为FALSE,更新后的文件包括现有的,除非他们明确地删除或使用UpdateResource接替资源。
返回值
如果函数成功,返回值是一个句柄,可以由UpdateResource和EndUpdateResource函数中使用。返回值为NULL如果指定的文件不是移植可执行(PE),该文件不存在,或文件不能打开写。为了获得更多错误信息,调用GetLastError。
备注
我们建议该资源文件未加载之前调用此函数。但是,如果该文件已经加载,它不会导致错误将返回。
有一些关于档案资源更新的限制,包括资源配置(区局配置)数据:法律公告文件和关联的。MUI文件。哪些类型的资源,允许在这些文件的更新的详情是在为UpdateResource功能备注部分。
在Windows 95/98/Me:BeginUpdateResourceW是支持的Unicode(MSLU)微软层。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
此功能模块内可更新资源,同时包含代码和资源。如上所述,有关于法律公告档案资源更新和限制。MUI文件,都包含了钢筋混凝土配置数据,详细的限制,在功能的UpdateResource参考。
例如
有关示例见,更新资源。
功能信息
最低DLL版本 kernel32.dll
在Winbase.h HeaderDeclared,头文件:winuser.h
import libraryKernel32.lib
最低经营systemsWindows新台币3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
资源概况,EndUpdateResource,UpdateResource
==英文原文==BeginUpdateResource Function
Returns a handle to either a language-neutral portable executable file (LN file) or a language-specific resource file (.mui file) that can be used by the UpdateResource function to add, delete, or replace resources in a binary module.
Syntax
HANDLE BeginUpdateResource( LPCTSTR pFileName,
BOOL bDeleteExistingResources
);
Parameters
pFileName
[in] Pointer to a null-terminated string that specifies the binary file in which to update resources. An application must be able to obtain write-access to this file; the file referenced by pFileName cannot be currently executing. If pFileName does not specify a full path, the system searches for the file in the current directory.
bDeleteExistingResources
[in] Specifies whether to delete the pFileName parameter's existing resources. If this parameter is TRUE, existing resources are deleted and the updated file includes only resources added with the UpdateResource function. If this parameter is FALSE, the updated file includes existing resources unless they are explicitly deleted or replaced by using UpdateResource.
Return Value
If the function succeeds, the return value is a handle that can be used by the UpdateResource and EndUpdateResource functions. The return value is NULL if the specified file is not a portable executable (PE), the file does not exist, or the file cannot be opened for writing. To get extended error information, call GetLastError .
Remarks
It is recommended that the resource file is not loaded before this function is called. However, if that file is already loaded, it will not cause an error to be returned.
There are some restrictions on resource updates in files that contain Resource Configuration (RC Config) data: LN files and the associated .mui files. Details on which types of resources are allowed to be updated in these files are in the Remarks section for the UpdateResource function.
Windows 95/98/Me: BeginUpdateResourceW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .
This function can update resources within modules that contain both code and resources. As noted above, there are restrictions on resource updates in LN files and .mui files, both of which contain RC Config data; details of the restrictions are in the reference for the UpdateResource function.
Example
For an example see, Updating Resources .
Function Information
Minimum DLL Versionkernel32.dll
HeaderDeclared in Winbase.h, include Windows.h
Import libraryKernel32.lib
Minimum operating systemsWindows NT 3.1
UnicodeImplemented as ANSI and Unicode versions.
See Also
Resources Overview , EndUpdateResource , UpdateResource
==原始网址==http://msdn.microsoft.com/en-us/library/ms648030(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:28:56