Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "NtStatus" in [All]

advapi32

.

If the function fails, the return value is an NTSTATUS code, which can be the following value or one of the LSA Policy Function Return Values.

.

You can use the LsaNtStatusToWinError function to convert the NTSTATUS code to a Windows error code.

.

        Throw New Win32Exception(LsaNtStatusToWinError(ret))

.

        Throw New Win32Exception(LsaNtStatusToWinError(ret))

.

// NTSTATUS LsaEnumerateAccountRights(

.

NTSTATUS can be converted to a Windows error using LsaNtStatusToWinError

.

    'NTSTATUS LsaEnumerateAccountsWithUserRight(

.

    internal static extern int LsaNtStatusToWinError(int NTSTATUS);

.

        throw new Win32Exception(Win32Sec.LsaNtStatusToWinError((int)ret));

.

        throw new Win32Exception(Win32Sec.LsaNtStatusToWinError((int)ret));

.

        Throw New Win32Exception(LsaNtStatusToWinError(ret))

.

        Throw New Win32Exception(LsaNtStatusToWinError(ret))

.

    'NTSTATUS LsaFreeMemory(

.

    internal static extern int LsaNtStatusToWinError(int NTSTATUS);

.

        throw new Win32Exception(Win32Sec.LsaNtStatusToWinError((int)ret));

.

        throw new Win32Exception(Win32Sec.LsaNtStatusToWinError((int)ret));

.

        throw new Win32Exception(Win32Sec.LsaNtStatusToWinError((int)ret));

.

        throw new Win32Exception(Win32Sec.LsaNtStatusToWinError((int)ret));

.

        throw new Win32Exception(Win32Sec.LsaNtStatusToWinError((int)ret));

.

        throw new Win32Exception(Win32Sec.LsaNtStatusToWinError(ret));

.

static extern uint LsaNtStatusToWinError(uint status);

.

Declare Function LsaNtStatusToWinError Lib "advapi32.dll" (TODO) As TODO

.
Documentation
[LsaNtStatusToWinError] on MSDN
.

        aWinErrorCode = LsaNtStatusToWinError( aOpenPolicyResult );

.

            aWinErrorCode = LsaNtStatusToWinError( aLSAResult );

.

            UInt32 winErrorCode = LsaNtStatusToWinError(resultPolicy);

.

            UInt32 ntstatus = LsaRetrievePrivateData(policy, key, ref result);

.

            UInt32 winErrorCode = LsaNtStatusToWinError(ntstatus);

.

            UInt32 ntstatus = LsaStorePrivateData(policy, key, value);

.

            UInt32 winErrorCode = LsaNtStatusToWinError(ntstatus);

.

        private static extern UInt32 LsaNtStatusToWinError(UInt32 status);

.

        Throw New Win32Exception(LsaNtStatusToWinError(ret))

.

        Throw New Win32Exception(LsaNtStatusToWinError(ret))

.

    'NTSTATUS LsaRemoveAccountRights(

.

        Throw New Win32Exception(LsaNtStatusToWinError(ret))

.

        Throw New Win32Exception(LsaNtStatusToWinError(ret))

.

    private static extern uint LsaNtStatusToWinError(

.

        uint winErrorCode = LsaNtStatusToWinError(ntsResult);

.

        uint winErrorCode = LsaNtStatusToWinError(ntsResult);

.

        uint winErrorCode = LsaNtStatusToWinError(ntsResult);

.

        uint winErrorCode = LsaNtStatusToWinError(result);

.

        uint winErrorCode = LsaNtStatusToWinError(ntsResult);

Enums

.

public enum NtStatus : uint

.

    MaximumNtStatus = 0xffffffff

.

Many kernel-mode standard driver routines and driver support routines use the NTSTATUS type for return values. Additionally, drivers provide an NTSTATUS-typed value in an IRP's IO_STATUS_BLOCK structure when completing IRPS.

.

    /// an NTSTATUS code of STATUS_OBJECT_NAME_COLLISION. </summary>

.

    StorageDeviceManagementStatus      = 56,

ntdll

.

static extern NTSTATUS NtAllocateVirtualMemory(IntPtr ProcessHandle, ref IntPtr BaseAddress, UInt32 ZeroBits, ref UInt32 RegionSize, UInt32 AllocationType, UInt32 Protect);

.

def NtAllocateVirtualMemory(ProcessHandle as IntPtr, ref BaseAddress as IntPtr, ZeroBits as UInt32, ref RegionSize as UInt32, AllocationType as UInt32, Protect as UInt32) as NTSTATUS:

.

static extern NTSTATUS NtCreateThreadEx(ref IntPtr threadHandle, UInt32 desiredAccess, IntPtr objectAttributes, IntPtr processHandle, IntPtr startAddress, IntPtr parameter, bool inCreateSuspended, Int32 stackZeroBits, Int32 sizeOfStack, Int32 maximumStackSize, IntPtr attributeList);

.

static extern NTSTATUS NtOpenProcess(ref IntPtr ProcessHandle, UInt32 AccessMask, ref OBJECT_ATTRIBUTES ObjectAttributes, ref CLIENT_ID ClientId);

.

static extern NTSTATUS NtProtectVirtualMemory(IntPtr ProcessHandle, ref IntPtr BaseAddress, ref UInt32 NumberOfBytesToProtect, UInt32 NewAccessProtection, ref UInt32 OldAccessProtection);

.

public static extern NtStatus NtQueryObject(IntPtr objectHandle, OBJECT_INFORMATION_CLASS informationClass, IntPtr informationPtr, uint informationLength, ref uint returnLength);

.

NtStatus, OBJECT_INFORMATION_CLASS

.

    NtStatus result;

.

        if (result == NtStatus.InfoLengthMismatch || result == NtStatus.BufferOverflow || result == NtStatus.BufferTooSmall)

.

        else if (result == NtStatus.Success || tries > 5)

.

            //throw new Exception("Unhandled NtStatus " + result);

.

    if (result == NtStatus.Success)

.

public static extern NtStatus NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS SystemInformationClass, IntPtr SystemInformation, uint SystemInformationLength, out uint ReturnLength);

.

NtStatus, SYSTEM_INFORMATION_CLASS

.

        if (result == NtStatus.Success)

.

        if (result != NtStatus.InfoLengthMismatch && result != NtStatus.BufferOverflow && result != NtStatus.BufferTooSmall)

.

            //throw new Exception("Unhandled NtStatus " + result);

.

            throw new System.ComponentModel.Win32Exception(((NativeMethods.NtStatus)result).ToString());

.

    NtStatus ErrorStatus,

.

http://deusexmachina.uk/ntstatus.html

.

http://pinvoke.net/default.aspx/Enums/NTStatus.html

.

static extern NtStatus NtReadVirtualMemory(IntPtr ProcessHandle, IntPtr BaseAddress, byte[] Buffer, UInt32 NumberOfBytesToRead, ref UInt32 NumberOfBytesRead);

.

public enum NtStatus : uint {

.

        MaximumNtStatus = 0xffffffff

.

static extern NTSTATUS NtWriteVirtualMemory(IntPtr ProcessHandle, IntPtr BaseAddress, byte[] Buffer, UInt32 NumberOfBytesToWrite, ref UInt32 NumberOfBytesWritten);

.
Summary
Return Type is NTSTATUS but too long type definition to wrote this page
.

NTSTATUS RtlAdjustPrivilege

.
Failure
NTSTATUS code.
.

public static extern uint RtlNtStatusToDosError(int Status);

.

Declare Function RtlNtStatusToDosError Lib "ntdll.dll" (ByVal status as Integer) As UInteger

.
Documentation
[RtlNtStatusToDosError] on MSDN
.

            throw new System.ComponentModel.Win32Exception(((NativeMethods.NtStatus)result).ToString());

Constants

.

    public static PropertyKey PKEY_ContentStatus = new PropertyKey( 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 27);

Structures

.

  public NtStatus ExitStatus;

.

    Public ExitStatus As NtStatus

.

NtStatus

hid

.

static extern NTSTATUS HidP_GetCaps(

secur32

.

    /// If the function fails, the return value is an NTSTATUS code. The following are possible error codes.

.

    internal static extern NtStatus LsaCallAuthenticationPackage(

.

        out NtStatus ProtocolStatus

.

private static extern NtStatus LsaEnumerateLogonSessions(out uint LogonSessionCount, out IntPtr LogonSessionList);

.

public static extern NtStatus LsaFreeReturnBuffer([In] IntPtr buffer);

.

                public static extern WinErrors LsaNtStatusToWinError(WinStatusCodes status);

.

                            throw new System.ComponentModel.Win32Exception((int)OSCalls.LsaNtStatusToWinError(status));

.

                                    throw new System.ComponentModel.Win32Exception((int)OSCalls.LsaNtStatusToWinError(status));

.

                                    throw new System.ComponentModel.Win32Exception((int)OSCalls.LsaNtStatusToWinError(status));

.

    public static extern NtStatus LsaRegisterLogonProcess(

kernel32

.

     ChangerGetElementStatus = (EFileDevice.Changer << 16) | (0x0005 << 2) | EMethod.Buffered | (FileAccess.ReadWrite << 14),

.

     ChangerInitializeElementStatus = (EFileDevice.Changer << 16) | (0x0006 << 2) | EMethod.Buffered | (FileAccess.Read << 14),


 
Access PInvoke.net directly from VS: