Exemplo n.º 1
0
 internal static extern Win32Error TdhEnumerateProviders(
     SafeBuffer pBuffer,
     ref int pBufferSize
     );
Exemplo n.º 2
0
 internal static extern Win32Error ControlTrace(
     long TraceHandle,
     string InstanceName,
     SafeBuffer Properties, // EVENT_TRACE_PROPERTIES
     EventTraceControl ControlCode
     );
 public static extern NtStatus NtQueryDirectoryObject(SafeKernelObjectHandle DirectoryHandle,
                                                      SafeBuffer Buffer, int Length, bool ReturnSingleEntry, bool RestartScan, ref int Context, out int ReturnLength);
Exemplo n.º 4
0
 internal static extern Win32Error GetPackageApplicationIds(
     IntPtr packageInfoReference,
     ref int bufferLength,
     [Out] SafeBuffer buffer,
     out int count
     );
Exemplo n.º 5
0
 public static extern NtStatus NtSetSystemInformation(
     SystemInformationClass SystemInformationClass,
     SafeBuffer SystemInformation,
     int SystemInformationLength
     );
Exemplo n.º 6
0
 internal unsafe MemoryMappedFileBlock(IDisposable accessor, SafeBuffer safeBuffer, long offset, int size)
 {
     _data = new DisposableData(accessor, safeBuffer, offset);
     _size = size;
 }
Exemplo n.º 7
0
 public static extern NtStatus NtSetInformationSymbolicLink(
     SafeKernelObjectHandle LinkHandle,
     SymbolicLinkInformationClass LinkInformationClass,
     SafeBuffer LinkInformation,
     int LinkInformationLength);
 public UnmanagedMemoryAccessor(SafeBuffer buffer, long offset, long capacity, FileAccess access);
 internal static int GetLength(this SafeBuffer buffer)
 {
     return((int)buffer.ByteLength);
 }
 public static extern NtStatus NtSetInformationTransaction(
     SafeKernelObjectHandle TransactionHandle,
     TransactionInformationClass TransactionInformationClass,
     SafeBuffer TransactionInformation,
     int TransactionInformationLength
     );
 protected void Initialize(SafeBuffer buffer, long offset, long length, FileAccess access);
 public UnmanagedMemoryStream(SafeBuffer buffer, long offset, long length, FileAccess access);
 public UnmanagedMemoryStream(SafeBuffer buffer, long offset, long length);
Exemplo n.º 14
0
 internal static extern bool ConvertSecurityDescriptorToStringSecurityDescriptor(
     SafeBuffer SecurityDescriptor,
     int RequestedStringSDRevision,
     SecurityInformation SecurityInformation,
     out SafeLocalAllocBuffer StringSecurityDescriptor,
     out int StringSecurityDescriptorLen);
Exemplo n.º 15
0
 public UnmanagedMemoryStream(SafeBuffer buffer, long offset, long length, FileAccess access)
 {
     Initialize(buffer, offset, length, access);
 }
Exemplo n.º 16
0
 internal static extern bool ChangeServiceConfig2(
     SafeServiceHandle hService,
     int dwInfoLevel,
     SafeBuffer lpInfo
     );
Exemplo n.º 17
0
 public static extern NtStatus NtQuerySection(SafeKernelObjectHandle SectionHandle,
                                              SectionInformationClass SectionInformationClass,
                                              SafeBuffer SectionInformation,
                                              int SectionInformationLength,
                                              out int ResultLength);
Exemplo n.º 18
0
 public static extern NtStatus NtQuerySystemInformation(
     SystemInformationClass SystemInformationClass,
     SafeBuffer SystemInformation,
     int SystemInformationLength,
     out int ReturnLength
     );
Exemplo n.º 19
0
 public static extern NtStatus NtSetInformationEnlistment(
     SafeKernelObjectHandle EnlistmentHandle,
     EnlistmentInformationClass EnlistmentInformationClass,
     SafeBuffer EnlistmentInformation,
     int EnlistmentInformationLength
     );
Exemplo n.º 20
0
 public static extern NtStatus NtEnumerateSystemEnvironmentValuesEx(
     SystemEnvironmentValueInformationClass SystemEnvironmentValueInformationClass,
     SafeBuffer Buffer, ref int BufferLength);
Exemplo n.º 21
0
 /// <summary>
 /// Method to query information for this object type.
 /// </summary>
 /// <param name="info_class">The information class.</param>
 /// <param name="buffer">The buffer to return data in.</param>
 /// <param name="return_length">Return length from the query.</param>
 /// <returns>The NT status code for the query.</returns>
 public override NtStatus QueryInformation(EnlistmentInformationClass info_class, SafeBuffer buffer, out int return_length)
 {
     return(NtSystemCalls.NtQueryInformationEnlistment(Handle, info_class, buffer, buffer.GetLength(), out return_length));
 }
        static string GetNameFromSymbolInfo(SafeBuffer buffer)
        {
            IntPtr ofs = Marshal.OffsetOf(typeof(SYMBOL_INFO), "Name");

            return(Marshal.PtrToStringUni(buffer.DangerousGetHandle() + ofs.ToInt32()));
        }
Exemplo n.º 23
0
 /// <summary>
 /// Method to set information for this object type.
 /// </summary>
 /// <param name="info_class">The information class.</param>
 /// <param name="buffer">The buffer to set data from.</param>
 /// <returns>The NT status code for the set.</returns>
 public override NtStatus SetInformation(EnlistmentInformationClass info_class, SafeBuffer buffer)
 {
     return(NtSystemCalls.NtSetInformationEnlistment(Handle, info_class, buffer, buffer.GetLength()));
 }
Exemplo n.º 24
0
 internal static extern Win32Error PackageIdFromFullName(
     string packageFullName,
     PackageFlags flags,
     ref int bufferLength,
     SafeBuffer buffer
     );
Exemplo n.º 25
0
 /// <summary>
 /// Method to query information for this object type.
 /// </summary>
 /// <param name="info_class">The information class.</param>
 /// <param name="buffer">The buffer to return data in.</param>
 /// <param name="return_length">Return length from the query.</param>
 /// <returns>The NT status code for the query.</returns>
 public override NtStatus QueryInformation(TransactionManagerInformationClass info_class, SafeBuffer buffer, out int return_length)
 {
     return(NtSystemCalls.NtQueryInformationTransactionManager(Handle, info_class, buffer, buffer.GetLength(), out return_length));
 }
Exemplo n.º 26
0
 internal static extern Win32Error EventAccessQuery(
     ref Guid Guid,
     SafeBuffer Buffer,
     ref int BufferSize
     );
Exemplo n.º 27
0
 /// <summary>
 /// Method to set information for this object type.
 /// </summary>
 /// <param name="info_class">The information class.</param>
 /// <param name="buffer">The buffer to set data from.</param>
 /// <returns>The NT status code for the set.</returns>
 public override NtStatus SetInformation(TransactionManagerInformationClass info_class, SafeBuffer buffer)
 {
     return(NtSystemCalls.NtSetInformationTransactionManager(Handle, info_class, buffer, buffer.GetLength()));
 }
Exemplo n.º 28
0
 internal static extern Win32Error StartTrace(
     out long SessionHandle,
     string SessionName,
     SafeBuffer Properties // EVENT_TRACE_PROPERTIES
     );
Exemplo n.º 29
0
 public static extern NtStatus NtSetInformationProcess(
     SafeKernelObjectHandle ProcessHandle,
     ProcessInformationClass ProcessInformationClass,
     SafeBuffer ProcessInformation,
     int ProcessInformationLength);
Exemplo n.º 30
0
 internal static extern bool ImageGetCertificateData(
     SafeKernelObjectHandle FileHandle,
     int CertificateIndex,
     SafeBuffer Certificate,
     ref int RequiredLength
     );
 /// <summary>
 /// Constructor from an unmanged buffer.
 /// </summary>
 /// <param name="sid">A safe buffer containing a valid SID.</param>
 /// <exception cref="NtException">Thrown if the buffer is not valid.</exception>
 public Sid(SafeBuffer sid)
     : this(sid.DangerousGetHandle())
 {
 }
Exemplo n.º 32
0
 internal static extern bool QueryServiceConfig(
     SafeServiceHandle hService,
     SafeBuffer lpServiceConfig,
     int cbBufSize,
     out int pcbBytesNeeded
     );
Exemplo n.º 33
0
 public static extern NtStatus RtlGetNativeSystemInformation(
     SystemInformationClass SystemInformationClass,
     SafeBuffer SystemInformation,
     int SystemInformationLength,
     out int ReturnLength
     );
 /// <summary>
 /// Method to query information for this object type.
 /// </summary>
 /// <param name="info_class">The information class.</param>
 /// <param name="buffer">The buffer to return data in.</param>
 /// <param name="return_length">Return length from the query.</param>
 /// <returns>The NT status code for the query.</returns>
 public override NtStatus QueryInformation(SemaphoreInformationClass info_class, SafeBuffer buffer, out int return_length)
 {
     return(NtSystemCalls.NtQuerySemaphore(Handle, info_class, buffer, (int)buffer.ByteLength, out return_length));
 }
 protected void Initialize(SafeBuffer buffer, long offset, long capacity, FileAccess access);