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
Download Visual Studio Add-In

Search Results for "_stat" in [All]

rasapi32

.

static extern uint RasGetConnectionStatistics(IntPtr hRasConn, ref RAS_STATS lpStatistics);

.

     ByRef lpStatistics As RAS_STATS) As UInt32

.

RAS_STATS.

.

RAS_STATS statistics = new RAS_STATS();

iphlpapi

.

    public enum IF_OPER_STATUS : uint

.

    public enum IP_DAD_STATE : uint

.

        public IP_DAD_STATE DadState;

.

        public IF_OPER_STATUS OperStatus;

.

      public enum MIB_TCP_STATE {

.

      MIB_TCP_STATE_CLOSED,

.

      MIB_TCP_STATE_LISTEN,

.

      MIB_TCP_STATE_SYN_SENT,

.

      MIB_TCP_STATE_SYN_RCVD,

.

      MIB_TCP_STATE_ESTAB,

.

      MIB_TCP_STATE_FIN_WAIT1,

.

      MIB_TCP_STATE_FIN_WAIT2,

.

      MIB_TCP_STATE_CLOSE_WAIT,

.

      MIB_TCP_STATE_CLOSING,

.

      MIB_TCP_STATE_LAST_ACK,

.

      MIB_TCP_STATE_TIME_WAIT,

.

      MIB_TCP_STATE_DELETE_TCB

Interfaces

.

    ,BINDSTATUS_COOKIE_STATE_UNKNOWN

.

    ,BINDSTATUS_COOKIE_STATE_ACCEPT

.

    ,BINDSTATUS_COOKIE_STATE_REJECT

.

    ,BINDSTATUS_COOKIE_STATE_PROMPT

.

    ,BINDSTATUS_COOKIE_STATE_LEASH

.

    ,BINDSTATUS_COOKIE_STATE_DOWNGRADE

.

    int GetStatus(                      out uint       hrStatus);  //uses WORK_ITEM_STATUS

.

    public enum WORK_ITEM_STATUS

netapi32

.

    [DllImport("Netapi32.dll", CharSet = CharSet.Auto/*, SetLastError=true //Return value (NET_API_STATUS) contains error */)]

.

        Dim state As DFS_STORAGE_STATES

.

    DFS_STORAGE_STATES state;

.

[2014-02-27] The function does not set the last error value, the error is returned directly and is in NET_API_STATUS format /Stoyan Sabev/

.

            if (storage.State == (DFS_STORAGE_STATE_ACTIVE | DFS_STORAGE_STATE_ONLINE)) ActiveOnlineServer = storage.ServerName;

.

            if (storage.State == (DFS_STORAGE_STATE_ACTIVE | DFS_STORAGE_STATE_ONLINE))

.

[DllImport("Netapi32.dll", CharSet=CharSet.Unicode/*, SetLastError=true //Return value (NET_API_STATUS) contains error */)]

.

[Stoyan Sabev] The function does not set the last error value, the error is returned directly and is NET_API_STATUS form

.

    'NET_API_STATUS NetFileClose(

.

    'NET_API_STATUS NetFileEnum(

.

    ByRef bufferType As NETSETUP_JOIN_STATUS) _

.

    As NET_API_STATUS

.

} // NETSETUP_JOIN_STATUS

.

NET_API_STATUS - Possible return values are NERR_Success and ERROR_NOT_ENOUGH_MEMORY

.

Public Enum NETSETUP_JOIN_STATUS As UInteger

.

    Public GroupType As NETSETUP_JOIN_STATUS

.

Public Enum NET_API_STATUS As UInteger

.

Public Enum NETSETUP_JOIN_STATUS As UInteger

.

        ByRef bufferType As NETSETUP_JOIN_STATUS) _

.

        As NET_API_STATUS

.

        (ByVal lpBuffer As IntPtr) As NET_API_STATUS

.

        Dim status As NET_API_STATUS

.

            If status = NET_API_STATUS.NERR_Success Then

.

     As NET_API_STATUS

.

NET_API_STATUS - Possible value are NERR_Success, ERROR_NOT_ENOUGH_MEMORY and ERROR_INVALID_PARAMETER.

.

     If NetRemoteComputerSupports(ComputerName, Wanted, supports) = NET_API_STATUS.NERR_Success Then

.

NET_API_STATUS NetSessionDel(

.

        ERROR_INVALID_HANDLE_STATE = 1609,

.

using NET_API_STATUS = System.UInt32;

.

internal static extern NET_API_STATUS NetUseAdd(

.

     internal DWORD  ui2_status;

.

using NET_API_STATUS = System.UInt32;

.

        internal static extern NET_API_STATUS NetUseEnum(

.

    ByRef resumeHandle As IntPtr) As NET_API_STATUS

.

        internal DWORD  ui2_status;

.

    Public ui2_status As UInt32

.

    Private Enum NET_USE_STATUS As UInteger

msvcrt

17: _stat
.

    static extern int _stat(string file, ref STAT buf);

.

Declare Function _stat Lib "msvcrt.dll" (TODO) As TODO

.

    int res = _stat(file, ref s);

msi

.

        ERROR_INVALID_HANDLE_STATE = 1609,

user32

.

                    [MarshalAs(UnmanagedType.U4)] WINDOWS_STATION_ACCESS_MASK desiredAccess,

.

    internal enum WINDOWS_STATION_ACCESS_MASK : uint

.

                WINDOWS_STATION_ACCESS_MASK.WINSTA_ALL_ACCESS, null);

.
SystemColors.WindowFrame CTLCOLOR_STATIC, COLOR_WINDOWFRAME
.

const uint EVENT_OBJECT_STATECHANGE = 0x800A; // hwnd ID idChild is item w/ state change

22: TCITEM
.

    const int TCIF_STATE = 0x10;

.

    tcitem.mask = TCIF_STATE | TCIF_TEXT;

ntdll

.

public static extern int NtCreateFile(out SafeFileHandle handle, FileAccess access, OBJECT_ATTRIBUTES* objectAttributes, IO_STATUS_BLOCK* ioStatus, ref long allocSize, uint fileAttributes, FileShare share, uint createDisposition, uint createOptions, IntPtr eaBuffer, uint eaLength);

.

        ref IO_STATUS_BLOCK ioStatus,

.

public struct IO_STATUS_BLOCK

.

IO_STATUS_BLOCK ioStatusBlock = new IO_STATUS_BLOCK();

.

[DllImport("ntdll.dll", SetLastError=true)] static extern IntPtr NtQueryInformationFile(IntPtr fileHandle, ref IO_STATUS_BLOCK IoStatusBlock, IntPtr pInfoBlock, uint length, FILE_INFORMATION_CLASS fileInformation);

.

Declare Function NtQueryInformationFile Lib "ntdll.dll" (ByVal fileHandle As IntPtr, ByRef IoStatusBlock As IO_STATUS_BLOCK, ByVal pInfoBlock As IntPtr, ByVal length As UInteger, ByVal fileInformation As FILE_INFORMATION_CLASS) As IntPtr

.

    Structure IO_STATUS_BLOCK

.

    struct IO_STATUS_BLOCK

.

    struct IO_STATUS_BLOCK {

.

    static extern IntPtr NtQueryInformationFile(SafeFileHandle fileHandle, ref IO_STATUS_BLOCK IoStatusBlock, IntPtr pInfoBlock, uint length, FILE_INFORMATION_CLASS fileInformation);

.

            IO_STATUS_BLOCK iosb = new IO_STATUS_BLOCK();

wininet

.

    Public Const COOKIE_STATE_ACCEPT As Integer = &H1

.

    Public Const COOKIE_STATE_PROMPT As Integer = &H2

.

    Public Const COOKIE_STATE_LEASH As Integer = &H3

.

    Public Const COOKIE_STATE_DOWNGRADE As Integer = &H4

.

    Public Const COOKIE_STATE_REJECT As Integer = &H5

.

    Public Const COOKIE_STATE_ACCEPT As Integer = &H1

.

    Public Const COOKIE_STATE_PROMPT As Integer = &H2

.

    Public Const COOKIE_STATE_LEASH As Integer = &H3

.

    Public Const COOKIE_STATE_DOWNGRADE As Integer = &H4

.

    Public Const COOKIE_STATE_REJECT As Integer = &H5

winscard

.

  // SCARD_ATTR_ATR_STRING = SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0303) in WinSCard.h

.

private const int SCARD_STATE_UNAWARE = 0x00000000;

.

  rs[0].dwCurrentState = SCARD_STATE_UNAWARE;

ws2_32

.

        SO_BSP_STATE        =   0x1009,

kernel32

.

            EVENT_MODIFY_STATE    = 0x00000002,

.

            MUTEX_MODIFY_STATE    = 0x00000001,

.

            SEMAPHORE_MODIFY_STATE    = 0x00000002,

.

            TIMER_MODIFY_STATE    = 0x00000002,

.

            TIMER_QUERY_STATE    = 0x00000001

.

                IntPtr hMutex = Native.OpenMutex( ( uint ) ( Native.SyncObjectAccess.MUTEX_MODIFY_STATE ), false, name );

.

                        hMutex = Native.OpenMutex( ( uint ) ( Native.SyncObjectAccess.MUTEX_MODIFY_STATE ), false, name );

.

static extern bool GetSystemPowerStatus(out SYSTEM_POWER_STATUS

.

SYSTEM_POWER_STATUS

.

See Also: NCB, LANA_ENUM, ADAPTER_STATUS, NAME_BUFFER

.

   Dim adapt As ADAPTER_STATUS

.

   Dim myAdapt As New ADAPTER_STATUS

.

  const uint EVENT_MODIFY_STATE        = 0x0002 ;

.

        EVENT_MODIFY_STATE        = 0x00000002,

.

        MUTEX_MODIFY_STATE        = 0x00000001,

.

        SEMAPHORE_MODIFY_STATE    = 0x00000002,

.

        TIMER_MODIFY_STATE        = 0x00000002,

.

        TIMER_QUERY_STATE        = 0x00000001

.

  IntPtr handle= OpenEvent(EVENT_ALL_ACCESS | EVENT_MODIFY_STATE, false, name);

.

const UInt32 MUTEX_MODIFY_STATE = 0x0001;

.

static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags);

.

public enum EXECUTION_STATE :uint

.

Note that the return value is the EXECUTION_STATE that ''was'' set.

.

Description of what the different EXECUTION_STATE does

.

        SetThreadExecutionState(EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS);

.

        SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS);

.

        SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS | EXECUTION_STATE.ES_AWAYMODE_REQUIRED);

.

        SetThreadExecutionState(EXECUTION_STATE.ES_SYSTEM_REQUIRED);

Structures

.
Summary
The ADAPTER_STATUS structure contains information about a network adapter via the (NetBIOS) API call. This structure is pointed to by the ncb_buffer member of the NCB structure. ADAPTER_STATUS is followed by as many NAME_BUFFER structures as required to describe the network adapters on the system
.

internal struct ADAPTER_STATUS

.

Private Structure ADAPTER_STATUS

.

typedef struct _ADAPTER_STATUS {

.

} ADAPTER_STATUS, *PADAPTER_STATUS;

.
Documentation
[ADAPTER_STATUS] on MSDN
.

    public struct CERT_REVOCATION_STATUS

.

Structure CERT_REVOCATION_STATUS

.
Documentation
[CERT_REVOCATION_STATUS] on MSDN
.

    public int State;                        // State of this volume, one of DFS_VOLUME_STATE_*

.

    public int State;                        // State of this volume, one of DFS_VOLUME_STATE_*

.

        public int State;                                            // State of this volume, one of DFS_VOLUME_STATE_*

.

    public int State;    // State of this storage, one of DFS_STORAGE_STATE_*, possibly OR'd with DFS_STORAGE_STATE_ACTIVE        

.
Summary
The ENUM_SERVICE_STATUS structure is used by the EnumDependentServices and EnumServicesStatus functions to return the name of a service in a service control manager database and to return information about that service.
.

public struct ENUM_SERVICE_STATUS

.

     public SERVICE_STATUS ServiceStatus;

.

Structure ENUM_SERVICE_STATUS

.
Documentation
[ENUM_SERVICE_STATUS] on MSDN
.

   public SYSTEM_POWER_STATE LidOpenWakeAc;

.

   public SYSTEM_POWER_STATE LidOpenWakeDc;

.

   Public LidOpenWakeAc As SYSTEM_POWER_STATE

.

   Public LidOpenWakeDc As SYSTEM_POWER_STATE

.

SYSTEM_POWER_STATE

.

    SYSTEM_POWER_STATE MinSleepAc;

.

    SYSTEM_POWER_STATE MinSleepDc;

.

    SYSTEM_POWER_STATE ReducedLatencySleepAc;

.

    SYSTEM_POWER_STATE ReducedLatencySleepDc;

.

        Private MinSleepAc As SYSTEM_POWER_STATE

.

        Private MinSleepDc As SYSTEM_POWER_STATE

.

        Private ReducedLatencySleepAc As SYSTEM_POWER_STATE

.

        Private ReducedLatencySleepDc As SYSTEM_POWER_STATE

.

SYSTEM_POWER_STATE, POWER_ACTION_POLICY

45: MAPI
.

    /// Bitmask of attachment flags. Flags are MAPI_OLE and MAPI_OLE_STATIC.

.

    ''' Bitmask of attachment flags. Flags are MAPI_OLE and MAPI_OLE_STATIC.

.

    NT_STATIC = 10006,

.

    NT_STATIC_NON_DOD = 10007

.

    NT_STATIC = 10006

.

    NT_STATIC_NON_DOD = 10007

.

    public MIB_TCP_STATE State

.

        get { return (MIB_TCP_STATE)state; }

.

MIB_TCP_STATE

.

    public MIB_TCP_STATE State

.

        get { return (MIB_TCP_STATE)state; }

.

    Public m_state As UInteger

.

    Public ReadOnly Property State() As MIB_TCP_STATE

.

            Return DirectCast(m_state, MIB_TCP_STATE)

.

MIB_TCP_STATE

.
Summary
The NAME_BUFFER structure contains information about a local network name via the (NetBIOS) API Call. One or more NAME_BUFFER structures follows an ADAPTER_STATUS structure when an application specifies the NCBASTAT command in the ncb_command member of the NCB structure.
.

struct RAS_STATS

.

Private Structure RAS_STATS

.
Documentation
[RAS_STATS] on MSDN
.
Summary
The SERVICE_STATUS structure contains information about a service. The ControlService, EnumDependentServices, EnumServicesStatus, and QueryServiceStatus functions use this structure to return information about a service. A service uses this structure in the SetServiceStatus function to report its current status to the service control manager.
.

public struct SERVICE_STATUS

.

     public SERVICE_STATE dwCurrentState;  

.

Easier Structure (which appears to work fine and allows you to avoid defining the SERVICE_TYPES and SERVICE_STATE enumerations and to use CLR compliant types (int)):

.

    private struct SERVICE_STATUS

.
See
.

Private Structure SERVICE_STATUS

.

    internal enum SERVICE_STATE : int

.

        public SERVICE_STATE dwCurrentState;

.

See ControlService for SERVICE_STATE definition.

.
Documentation
[SERVICE_STATUS] on MSDN
.

   private static extern bool SetServiceStatus(IntPtr hServiceStatus, ref SERVICE_STATUS lpServiceStatus);

.

    ByRef lpServiceStatus As SERVICE_STATUS)

.

   public struct SERVICE_STATUS {

.

struct SYSTEM_BATTERY_STATE {

.

Structure SYSTEM_BATTERY_STATE

.
Documentation
[SYSTEM_BATTERY_STATE] on MSDN
.

    public SYSTEM_POWER_STATE AcOnLineWake;

.

    public SYSTEM_POWER_STATE SoftLidWake;

.

    public SYSTEM_POWER_STATE RtcWake;

.

    public SYSTEM_POWER_STATE MinDeviceWakeState;

.

    public SYSTEM_POWER_STATE DefaultLowLatencyWake;

.

SYSTEM_POWER_STATE

.

    public SYSTEM_POWER_STATE MinSystemState;

.

    Public MinSystemState As SYSTEM_POWER_STATE

.

SYSTEM_POWER_STATE

.

enum SYSTEM_POWER_STATE

.

Enum SYSTEM_POWER_STATE

.
Documentation
[SYSTEM_POWER_STATE] on MSDN
.

public class SYSTEM_POWER_STATUS_EX2

.

Public Class SYSTEM_POWER_STATUS_EX2

.
Documentation
[SYSTEM_POWER_STATUS_EX2] on MSDN
.

public class SYSTEM_POWER_STATUS_EX2

.

Public Class SYSTEM_POWER_STATUS_EX2

.
Documentation
[SYSTEM_POWER_STATUS_EX2] on MSDN
.

   USB_CONNECTION_STATUS  ConnectionStatus;

.

            public SYSTEM_POWER_STATE MaxSleepAc;

.

            public SYSTEM_POWER_STATE MaxSleepDc;

.

        Public MaxSleepAc As SYSTEM_POWER_STATE

.

        Public MaxSleepDc As SYSTEM_POWER_STATE

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: