NativeMethods.CreateFile, méthode
Ce type a un attribut SecurityCriticalAttribute, qui le limite à un usage interne par la bibliothèque de classes .NET Framework pour Silverlight. Un code d'application qui utilise un membre de ce type lève une exception MethodAccessException.
Espace de noms : Microsoft.TeamFoundation.Common.Internal
Assembly : Microsoft.TeamFoundation.Common (dans Microsoft.TeamFoundation.Common.dll)
Syntaxe
'Déclaration
Public Shared Function CreateFile ( _
lpFileName As String, _
dwDesiredAccess As NativeMethods.FileAccess, _
dwShareMode As NativeMethods.FileShare, _
lpSecurityAttributes As IntPtr, _
dwCreationDisposition As NativeMethods.CreationDisposition, _
dwFlagsAndAttributes As NativeMethods.FileAttributes, _
hTemplateFile As IntPtr _
) As SafeFileHandle
public static SafeFileHandle CreateFile(
string lpFileName,
NativeMethods.FileAccess dwDesiredAccess,
NativeMethods.FileShare dwShareMode,
IntPtr lpSecurityAttributes,
NativeMethods.CreationDisposition dwCreationDisposition,
NativeMethods.FileAttributes dwFlagsAndAttributes,
IntPtr hTemplateFile
)
Paramètres
- lpFileName
Type : System.String
- dwDesiredAccess
Type : Microsoft.TeamFoundation.Common.Internal.NativeMethods.FileAccess
- dwShareMode
Type : Microsoft.TeamFoundation.Common.Internal.NativeMethods.FileShare
- lpSecurityAttributes
Type : System.IntPtr
- dwCreationDisposition
Type : Microsoft.TeamFoundation.Common.Internal.NativeMethods.CreationDisposition
- dwFlagsAndAttributes
Type : Microsoft.TeamFoundation.Common.Internal.NativeMethods.FileAttributes
- hTemplateFile
Type : System.IntPtr
Valeur de retour
Type : Microsoft.Win32.SafeHandles.SafeFileHandle