网站首页  词典首页

请输入您要查询的函数:

 

术语 openfilemapping
释义 OpenFileMapping
语法:
C++
HANDLE WINAPI OpenFileMapping(
__in DWORD dwDesiredAccess,
__in BOOL bInheritHandle,
__in LPCTSTR lpName
);
OpenFileMapping函数
打开一个命名的文件映射对象。
参数
dwDesiredAccess [in]
到文件映射对象的访问。这是核对访问上的任何目标文件映射对象的安全描述符。对于一个值列表,请参阅文件映射安全和访问权限。
bInheritHandle [in]
如果此参数为TRUE,由CreateProcess函数创建一个进程可以继承处理,否则,处理不能被继承。
lpName [in]
该文件映射对象的名称被打开。如果有一个公开处理这个名字和安全描述符文件映射对象的映射对象不符合dwDesiredAccess参数冲突,开放手术成功。
终端服务:名称可以有一个“全球\\”或“Local \\”前缀显式打开一个对象,在全球或会话名称空间。名称的其余部分可以包含以外的任何字符反斜杠字符(\\)。有关更多信息,请参见内核对象名称空间。
Windows XP: Fast user switching is implemented using Terminal Services sessions.第一个用户对使用记录会话0,下一个用户登录使用会话1,依此类推。内核对象名称必须遵循概述了终端服务,使应用程序能够支持多个用户的指导方针。
窗口2000:如果终端服务没有运行,“全球\\”和“地方\\”前缀将被忽略。名称的其余部分可以包含反斜杠以外的任何字符的字符。
返回值
如果函数成功,返回值是一个开放的句柄指定的文件映射对象。
如果函数失败,返回值为NULL。为了获得更多错误信息,调用GetLastError。
备注
该句柄OpenFileMapping返回可与任何函数,需要一个句柄文件映射对象使用。
实例
有关示例,请参阅创建命名共享内存。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesOpenFileMappingW(Unicode)和OpenFileMappingA(ANSI)的
参见
CreateFileMapping
文件映射函数
内存管理功能
共享文件和内存
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==OpenFileMapping Function
Opens a named file mapping object.
Syntax
C++
HANDLE WINAPI OpenFileMapping(
__in DWORD dwDesiredAccess,
__in BOOL bInheritHandle,
__in LPCTSTR lpName
);
Parameters
dwDesiredAccess [in]
The access to the file mapping object. This access is checked against any security descriptor on the target file mapping object. For a list of values, see File Mapping Security and Access Rights .
bInheritHandle [in]
If this parameter is TRUE, a process created by the CreateProcess function can inherit the handle; otherwise, the handle cannot be inherited.
lpName [in]
The name of the file mapping object to be opened. If there is an open handle to a file mapping object by this name and the security descriptor on the mapping object does not conflict with the dwDesiredAccess parameter, the open operation succeeds.
Terminal Services: The name can have a "Global\\" or "Local\\" prefix to explicitly open an object in the global or session name space. The remainder of the name can contain any character except the backslash character (\\). For more information, see Kernel Object Name Spaces .
Windows XP: Fast user switching is implemented using Terminal Services sessions. The first user to log on uses session 0, the next user to log on uses session 1, and so on. Kernel object names must follow the guidelines outlined for Terminal Services so that applications can support multiple users.
Windows 2000: If Terminal Services is not running, the "Global\\" and "Local\\" prefixes are ignored. The remainder of the name can contain any character except the backslash character.
Return Value
If the function succeeds, the return value is an open handle to the specified file mapping object.
If the function fails, the return value is NULL. To get extended error information, call GetLastError .
Remarks
The handle that OpenFileMapping returns can be used with any function that requires a handle to a file mapping object.
Examples
For an example, see Creating Named Shared Memory .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesOpenFileMappingW (Unicode) and OpenFileMappingA (ANSI)
See Also
CreateFileMapping
File Mapping Functions
Memory Management Functions
Sharing Files and Memory
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa366791(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 13:19:04