术语 | lockresource |
释义 | LockResource 语法: LPVOID LockResource( HGLOBAL hResData ); LockResource Function 锁在内存中指定的资源。 参数 hResData [in]句柄资源被锁定。该LoadResource函数返回此句柄。请注意,此参数只列出一个HGLOBAL向后兼容的变量。没有通过任何一个参数,从LoadResource函数成功返回值的其他值。 返回值 如果加载的资源被锁定,则返回值是对资源的第一个字节的指针,否则为NULL。 备注 由LockResource返回的指针有效期至模块包含的资源被卸载。没有必要解锁资源,因为系统会自动删除这些程序时创建它们的终止。 不要试图通过使用锁定处理由FindResource或FindResourceEx函数返回的资源。这样的处理点,随机数据。 例如 有关示例,请参见更新资源。 功能信息 最低DLL版本 kernel32.dll 在Winbase.h HeaderDeclared,头文件:winuser.h import libraryKernel32.lib 最低操作系统Windows 95,Windows NT 3.1 UnicodeImplemented为Unicode版本。 参见 资源概况,FindResource,FindResourceEx,LoadResource ==英文原文==LockResource Function Locks the specified resource in memory. Syntax LPVOID LockResource( HGLOBAL hResData ); Parameters hResData [in] Handle to the resource to be locked. The LoadResource function returns this handle. Note that this parameter is listed as an HGLOBAL variable only for backward compatibility. Do not pass any value as a parameter other than a successful return value from the LoadResource function. Return Value If the loaded resource is locked, the return value is a pointer to the first byte of the resource; otherwise, it is NULL. Remarks The pointer returned by LockResource is valid until the module containing the resource is unloaded. It is not necessary to unlock resources because the system automatically deletes them when the process that created them terminates. Do not try to lock a resource by using the handle returned by the FindResource or FindResourceEx function. Such a handle points to random data. 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 95, Windows NT 3.1 UnicodeImplemented as Unicode version. See Also Resources Overview , FindResource , FindResourceEx , LoadResource ==原始网址==http://msdn.microsoft.com/en-us/library/ms648047(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。