SafeMemoryMappedFileHandle Klasa
Definicja
Zapewnia bezpieczne dojście, które reprezentuje plik mapowany na pamięć na potrzeby sekwencyjnego dostępu.Provides a safe handle that represents a memory-mapped file for sequential access.
public ref class SafeMemoryMappedFileHandle sealed : Microsoft::Win32::SafeHandles::SafeHandleZeroOrMinusOneIsInvalid
public ref class SafeMemoryMappedFileHandle sealed : System::Runtime::InteropServices::SafeHandle
public sealed class SafeMemoryMappedFileHandle : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid
public sealed class SafeMemoryMappedFileHandle : System.Runtime.InteropServices.SafeHandle
[System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)]
public sealed class SafeMemoryMappedFileHandle : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid
type SafeMemoryMappedFileHandle = class
inherit SafeHandleZeroOrMinusOneIsInvalid
type SafeMemoryMappedFileHandle = class
inherit SafeHandle
[<System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)>]
type SafeMemoryMappedFileHandle = class
inherit SafeHandleZeroOrMinusOneIsInvalid
Public NotInheritable Class SafeMemoryMappedFileHandle
Inherits SafeHandleZeroOrMinusOneIsInvalid
Public NotInheritable Class SafeMemoryMappedFileHandle
Inherits SafeHandle
- Dziedziczenie
-
SafeMemoryMappedFileHandle
- Dziedziczenie
- Atrybuty
Uwagi
Użyj MemoryMappedFile.SafeMemoryMappedFileHandle właściwości, aby uzyskać bezpieczny uchwyt.Use the MemoryMappedFile.SafeMemoryMappedFileHandle property to obtain the safe handle.
Ważne
Ten typ implementuje IDisposable interfejs.This type implements the IDisposable interface. Po zakończeniu korzystania z typu należy usunąć jego wartość bezpośrednio lub pośrednio.When you have finished using the type, you should dispose of it either directly or indirectly. Aby usunąć typ bezpośrednio, wywołaj jego Dispose metodę w try
/ catch
bloku.To dispose of the type directly, call its Dispose method in a try
/catch
block. Aby usunąć go pośrednio, użyj konstrukcji języka, takiej jak using
(w języku C#) lub Using
(w Visual Basic).To dispose of it indirectly, use a language construct such as using
(in C#) or Using
(in Visual Basic). Aby uzyskać więcej informacji, zobacz sekcję "Używanie obiektu implementującego interfejs IDisposable" w temacie dotyczącym IDisposable interfejsu.For more information, see the "Using an Object that Implements IDisposable" section in the IDisposable interface topic.
Konstruktory
SafeMemoryMappedFileHandle(IntPtr, Boolean) |
Pola
handle |
Określa uchwyt, który ma być opakowany.Specifies the handle to be wrapped. (Odziedziczone po SafeHandle) |
Właściwości
IsClosed |
Pobiera wartość wskazującą, czy dojście jest zamknięte.Gets a value indicating whether the handle is closed. (Odziedziczone po SafeHandle) |
IsInvalid |
Pobiera wartość wskazującą, czy dojście jest nieprawidłowe.Gets a value that indicates whether the handle is invalid. |
IsInvalid |
Pobiera wartość wskazującą, czy dojście jest nieprawidłowe.Gets a value that indicates whether the handle is invalid. (Odziedziczone po SafeHandleZeroOrMinusOneIsInvalid) |
Metody
Close() |
Oznacza dojście do zwalniania i zwalniania zasobów.Marks the handle for releasing and freeing resources. (Odziedziczone po SafeHandle) |
DangerousAddRef(Boolean) |
Ręcznie zwiększa licznik odwołań w SafeHandle wystąpieniach.Manually increments the reference counter on SafeHandle instances. (Odziedziczone po SafeHandle) |
DangerousGetHandle() |
Zwraca wartość handle pola.Returns the value of the handle field. (Odziedziczone po SafeHandle) |
DangerousRelease() |
Ręcznie zmniejsza licznik odwołań do SafeHandle wystąpienia.Manually decrements the reference counter on a SafeHandle instance. (Odziedziczone po SafeHandle) |
Dispose() |
Zwalnia wszystkie zasoby używane przez SafeHandle klasę.Releases all resources used by the SafeHandle class. (Odziedziczone po SafeHandle) |
Dispose(Boolean) |
Zwalnia niezarządzane zasoby używane przez klasę, SafeHandle określając, czy należy wykonać normalną operację Dispose.Releases the unmanaged resources used by the SafeHandle class specifying whether to perform a normal dispose operation. (Odziedziczone po SafeHandle) |
Equals(Object) |
Określa, czy dany obiekt jest taki sam, jak bieżący obiekt.Determines whether the specified object is equal to the current object. (Odziedziczone po Object) |
GetHashCode() |
Służy jako domyślna funkcja skrótu.Serves as the default hash function. (Odziedziczone po Object) |
GetType() |
Pobiera Type bieżące wystąpienie.Gets the Type of the current instance. (Odziedziczone po Object) |
MemberwiseClone() |
Tworzy skróconą kopię bieżącego elementu Object .Creates a shallow copy of the current Object. (Odziedziczone po Object) |
ReleaseHandle() |
Gdy jest zastępowany w klasie pochodnej, wykonuje kod wymagany do zwolnienia dojścia.When overridden in a derived class, executes the code required to free the handle. (Odziedziczone po SafeHandle) |
SetHandle(IntPtr) |
Ustawia dojście do określonego istniejącego już dojścia.Sets the handle to the specified pre-existing handle. (Odziedziczone po SafeHandle) |
SetHandleAsInvalid() |
Oznacza dojście, które nie jest już używane.Marks a handle as no longer used. (Odziedziczone po SafeHandle) |
ToString() |
Zwraca ciąg reprezentujący bieżący obiekt.Returns a string that represents the current object. (Odziedziczone po Object) |