MemoryMappedFile.CreateOrOpen 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
시스템 메모리에 메모리 매핑된 파일을 만들거나 엽니다.
오버로드
| CreateOrOpen(String, Int64, MemoryMappedFileAccess, MemoryMappedFileOptions, MemoryMappedFileSecurity, HandleInheritability) |
시스템 메모리에서 지정된 이름, 용량, 액세스 형식, 메모리 할당, 보안 권한 및 상속 가능성을 가진 메모리 매핑된 파일을 만들거나 엽니다. |
| CreateOrOpen(String, Int64, MemoryMappedFileAccess, MemoryMappedFileOptions, HandleInheritability) |
동일한 이름의 파일이 있는 경우 비어 있는 새 메모리 매핑된 파일을 만들거나 기존의 메모리 매핑된 파일을 엽니다. 기존 파일을 여는 경우 용량, 옵션 및 메모리 인수가 무시됩니다. |
| CreateOrOpen(String, Int64) |
시스템 메모리에서 지정된 이름 및 용량을 가진 메모리 매핑된 파일을 만들거나 엽니다. |
| CreateOrOpen(String, Int64, MemoryMappedFileAccess) |
시스템 메모리에서 지정된 이름, 용량 및 액세스 형식을 가진 메모리 매핑된 파일을 만들거나 엽니다. |
CreateOrOpen(String, Int64, MemoryMappedFileAccess, MemoryMappedFileOptions, MemoryMappedFileSecurity, HandleInheritability)
시스템 메모리에서 지정된 이름, 용량, 액세스 형식, 메모리 할당, 보안 권한 및 상속 가능성을 가진 메모리 매핑된 파일을 만들거나 엽니다.
public:
static System::IO::MemoryMappedFiles::MemoryMappedFile ^ CreateOrOpen(System::String ^ mapName, long capacity, System::IO::MemoryMappedFiles::MemoryMappedFileAccess access, System::IO::MemoryMappedFiles::MemoryMappedFileOptions options, System::IO::MemoryMappedFiles::MemoryMappedFileSecurity ^ memoryMappedFileSecurity, System::IO::HandleInheritability inheritability);
[System.Security.SecurityCritical]
public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateOrOpen (string mapName, long capacity, System.IO.MemoryMappedFiles.MemoryMappedFileAccess access, System.IO.MemoryMappedFiles.MemoryMappedFileOptions options, System.IO.MemoryMappedFiles.MemoryMappedFileSecurity memoryMappedFileSecurity, System.IO.HandleInheritability inheritability);
[<System.Security.SecurityCritical>]
static member CreateOrOpen : string * int64 * System.IO.MemoryMappedFiles.MemoryMappedFileAccess * System.IO.MemoryMappedFiles.MemoryMappedFileOptions * System.IO.MemoryMappedFiles.MemoryMappedFileSecurity * System.IO.HandleInheritability -> System.IO.MemoryMappedFiles.MemoryMappedFile
Public Shared Function CreateOrOpen (mapName As String, capacity As Long, access As MemoryMappedFileAccess, options As MemoryMappedFileOptions, memoryMappedFileSecurity As MemoryMappedFileSecurity, inheritability As HandleInheritability) As MemoryMappedFile
매개 변수
- mapName
- String
메모리 매핑된 파일의 이름입니다.
- capacity
- Int64
메모리 매핑된 파일에 할당할 최대 크기(바이트)입니다.
- access
- MemoryMappedFileAccess
메모리 매핑된 파일에 허용되는 액세스 형식을 지정하는 열거형 값 중 하나입니다. 기본값은 ReadWrite입니다.
- options
- MemoryMappedFileOptions
메모리 매핑된 파일에 대한 메모리 할당 옵션을 지정하는 열거형 값의 비트 조합입니다.
- memoryMappedFileSecurity
- MemoryMappedFileSecurity
메모리 매핑된 파일에 대한 파일 액세스 및 작업에 부여할 수 있는 권한입니다.
이 매개 변수는 null일 수 있습니다.
- inheritability
- HandleInheritability
메모리 매핑된 파일의 핸들을 자식 프로세스가 상속할 수 있는지 여부를 지정하는 열거형 값 중 하나입니다. 기본값은 None입니다.
반환
지정된 특성을 가진 메모리 매핑된 파일입니다.
- 특성
예외
mapName이(가) null인 경우
capacity는 논리 주소 공간의 크기보다 큽니다.
또는
capacity가 0보다 작거나 같습니다.
또는
access가 유효한 MemoryMappedFileAccess 열거형 값이 아닙니다.
또는
inheritability가 유효한 HandleInheritability 열거형 값이 아닙니다.
운영 체제에서 파일에 지정된 access 권한을 거부했습니다. 예를 들어, access 권한이 Write 또는 ReadWrite로 설정되어 있지만 파일 또는 디렉터리가 읽기 전용입니다.
설명
이 메서드를 사용하여 프로세스 간에 데이터를 공유하는 데 사용할 수 있는 유지되지 않는 메모리 매핑 파일(즉, 디스크의 파일과 연결되지 않음)을 만들거나 엽니다.
추가 정보
적용 대상
CreateOrOpen(String, Int64, MemoryMappedFileAccess, MemoryMappedFileOptions, HandleInheritability)
- Source:
- MemoryMappedFile.cs
- Source:
- MemoryMappedFile.cs
- Source:
- MemoryMappedFile.cs
동일한 이름의 파일이 있는 경우 비어 있는 새 메모리 매핑된 파일을 만들거나 기존의 메모리 매핑된 파일을 엽니다. 기존 파일을 여는 경우 용량, 옵션 및 메모리 인수가 무시됩니다.
public:
static System::IO::MemoryMappedFiles::MemoryMappedFile ^ CreateOrOpen(System::String ^ mapName, long capacity, System::IO::MemoryMappedFiles::MemoryMappedFileAccess access, System::IO::MemoryMappedFiles::MemoryMappedFileOptions options, System::IO::HandleInheritability inheritability);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateOrOpen (string mapName, long capacity, System.IO.MemoryMappedFiles.MemoryMappedFileAccess access, System.IO.MemoryMappedFiles.MemoryMappedFileOptions options, System.IO.HandleInheritability inheritability);
public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateOrOpen (string mapName, long capacity, System.IO.MemoryMappedFiles.MemoryMappedFileAccess access, System.IO.MemoryMappedFiles.MemoryMappedFileOptions options, System.IO.HandleInheritability inheritability);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member CreateOrOpen : string * int64 * System.IO.MemoryMappedFiles.MemoryMappedFileAccess * System.IO.MemoryMappedFiles.MemoryMappedFileOptions * System.IO.HandleInheritability -> System.IO.MemoryMappedFiles.MemoryMappedFile
static member CreateOrOpen : string * int64 * System.IO.MemoryMappedFiles.MemoryMappedFileAccess * System.IO.MemoryMappedFiles.MemoryMappedFileOptions * System.IO.HandleInheritability -> System.IO.MemoryMappedFiles.MemoryMappedFile
Public Shared Function CreateOrOpen (mapName As String, capacity As Long, access As MemoryMappedFileAccess, options As MemoryMappedFileOptions, inheritability As HandleInheritability) As MemoryMappedFile
매개 변수
- mapName
- String
메모리 매핑된 파일의 이름입니다.
- capacity
- Int64
메모리 매핑된 파일에 할당할 최대 크기(바이트)입니다.
- access
- MemoryMappedFileAccess
메모리 매핑된 파일에 허용되는 액세스 형식을 지정하는 열거형 값 중 하나입니다. 기본값은 ReadWrite입니다.
- options
- MemoryMappedFileOptions
파일에 적용할 메모리 할당 옵션을 나타내는 값의 비트 조합입니다.
- inheritability
- HandleInheritability
메모리 매핑된 파일의 핸들을 자식 프로세스가 상속할 수 있는지 여부를 지정하는 값입니다. 기본값은 None입니다.
반환
지정된 특성을 가진 메모리 매핑된 파일입니다.
- 특성
예외
mapName이(가) null인 경우
capacity는 논리 주소 공간의 크기보다 큽니다.
또는
capacity가 0보다 작거나 같습니다.
또는
access가 유효한 MemoryMappedFileAccess 열거형 값이 아닙니다.
또는
inheritability가 유효한 HandleInheritability 열거형 값이 아닙니다.
적용 대상
CreateOrOpen(String, Int64)
- Source:
- MemoryMappedFile.cs
- Source:
- MemoryMappedFile.cs
- Source:
- MemoryMappedFile.cs
시스템 메모리에서 지정된 이름 및 용량을 가진 메모리 매핑된 파일을 만들거나 엽니다.
public:
static System::IO::MemoryMappedFiles::MemoryMappedFile ^ CreateOrOpen(System::String ^ mapName, long capacity);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateOrOpen (string mapName, long capacity);
public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateOrOpen (string mapName, long capacity);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member CreateOrOpen : string * int64 -> System.IO.MemoryMappedFiles.MemoryMappedFile
static member CreateOrOpen : string * int64 -> System.IO.MemoryMappedFiles.MemoryMappedFile
Public Shared Function CreateOrOpen (mapName As String, capacity As Long) As MemoryMappedFile
매개 변수
- mapName
- String
메모리 매핑된 파일의 이름입니다.
- capacity
- Int64
메모리 매핑된 파일에 할당할 최대 크기(바이트)입니다.
반환
지정된 이름과 크기를 가진 메모리 매핑된 파일입니다.
- 특성
예외
mapName이 빈 문자열인 경우
설명
이 메서드를 사용하여 프로세스 간에 데이터를 공유하는 데 사용할 수 있는 유지되지 않는 메모리 매핑 파일(즉, 디스크의 파일과 연결되지 않음)을 만들거나 엽니다.
추가 정보
적용 대상
CreateOrOpen(String, Int64, MemoryMappedFileAccess)
- Source:
- MemoryMappedFile.cs
- Source:
- MemoryMappedFile.cs
- Source:
- MemoryMappedFile.cs
시스템 메모리에서 지정된 이름, 용량 및 액세스 형식을 가진 메모리 매핑된 파일을 만들거나 엽니다.
public:
static System::IO::MemoryMappedFiles::MemoryMappedFile ^ CreateOrOpen(System::String ^ mapName, long capacity, System::IO::MemoryMappedFiles::MemoryMappedFileAccess access);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateOrOpen (string mapName, long capacity, System.IO.MemoryMappedFiles.MemoryMappedFileAccess access);
public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateOrOpen (string mapName, long capacity, System.IO.MemoryMappedFiles.MemoryMappedFileAccess access);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member CreateOrOpen : string * int64 * System.IO.MemoryMappedFiles.MemoryMappedFileAccess -> System.IO.MemoryMappedFiles.MemoryMappedFile
static member CreateOrOpen : string * int64 * System.IO.MemoryMappedFiles.MemoryMappedFileAccess -> System.IO.MemoryMappedFiles.MemoryMappedFile
Public Shared Function CreateOrOpen (mapName As String, capacity As Long, access As MemoryMappedFileAccess) As MemoryMappedFile
매개 변수
- mapName
- String
메모리 매핑된 파일의 이름입니다.
- capacity
- Int64
메모리 매핑된 파일에 할당할 최대 크기(바이트)입니다.
- access
- MemoryMappedFileAccess
메모리 매핑된 파일에 허용되는 액세스 형식을 지정하는 열거형 값 중 하나입니다. 기본값은 ReadWrite입니다.
반환
지정된 특성을 가진 메모리 매핑된 파일입니다.
- 특성
예외
mapName이(가) null인 경우
capacity는 논리 주소 공간의 크기보다 큽니다.
또는
capacity가 0보다 작거나 같습니다.
또는
access가 유효한 MemoryMappedFileAccess 열거형 값이 아닙니다.
설명
이 메서드를 사용하여 프로세스 간에 데이터를 공유하는 데 사용할 수 있는 유지되지 않는 메모리 매핑 파일(즉, 디스크의 파일과 연결되지 않음)을 만들거나 엽니다.