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]

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

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);

Enums

.

    BIF_STATUSTEXT = 0x00000004,

.

    BIF_STATUSTEXT = &H00000004

.

    BIF_STATUSTEXT As Long = &H00000004

.

enum DFS_STORAGE_STATES {

.

    DFS_STORAGE_STATE_OFFLINE=0x1,

.

    DFS_STORAGE_STATE_ONLINE=0x2,

.

    DFS_STORAGE_STATE_ACTIVE=0x4

.

Enum DFS_STORAGE_STATES

.
Documentation
[DFS_STORAGE_STATES] on MSDN
.
Summary
Specifies a set of bit flags that describes the Dfs root or link. One DFS_VOLUME_STATE flag is set and one DFS_VOLUME_FLAVOR flag is set.
.
Summary
Specifies a set of bit flags that describes the Dfs root or link. One DFS_VOLUME_STATE flag is set and one DFS_VOLUME_FLAVOR flag is set.
.

enum DFS_VOLUME_STATE {

.

    DFS_VOLUME_STATE_OK =0x1,

.

    DFS_VOLUME_STATE_INCONSISTENT=2,

.

    DFS_VOLUME_STATE_OFFLINE=3,

.

    DFS_VOLUME_STATE_ONLINE=4

.

Enum DFS_VOLUME_STATE

.
Documentation
[DFS_VOLUME_STATE] on MSDN
22: DLGC
.

    DLGC_STATIC = 0x0100,

.

    public const int STG_E_STATUS_COPY_PROTECTION_FAILURE = unchecked((int)0x80030305);

.

    public const int OLE_E_STATIC = unchecked((int)0x8004000B);

.

    public const int DV_E_STATDATA = unchecked((int)0x80040067);

.

    public const int OLE_S_STATIC = unchecked((int)0x00040001);

.

    public const int NTE_BAD_KEY_STATE = unchecked((int)0x8009000B);

.

    public const int NTE_BAD_HASH_STATE = unchecked((int)0x8009000C);

.

    //  FACILITY_STATE_MANAGEMENT

.

    #region (0x220000 - 0x22FFFF) FACILITY_STATE_MANAGEMENT=34 errors

.

    Public Const STG_E_STATUS_COPY_PROTECTION_FAILURE As Integer = CInt(&H80030305UI)

.

    Public Const OLE_E_STATIC As Integer = CInt(&H8004000bUI)

.

    Public Const DV_E_STATDATA As Integer = CInt(&H80040067UI)

.

    Public Const OLE_S_STATIC As Integer = CInt(&H40001)

.

    Public Const NTE_BAD_KEY_STATE As Integer = CInt(&H8009000bUI)

.

    Public Const NTE_BAD_HASH_STATE As Integer = CInt(&H8009000cUI)

.

    '  FACILITY_STATE_MANAGEMENT

.

    #Region "(0x220000 - 0x22FFFF) FACILITY_STATE_MANAGEMENT=34 errors"

.

        FEATURE_FORCE_ADDR_AND_STATUS = 23,

.

public enum MIB_TCP_STATE

.

    MIB_TCP_STATE_CLOSED = 1,

.

    MIB_TCP_STATE_LISTEN = 2,

.

    MIB_TCP_STATE_SYN_SENT = 3,

.

    MIB_TCP_STATE_SYN_RCVD = 4,

.

    MIB_TCP_STATE_ESTAB = 5,

.

    MIB_TCP_STATE_FIN_WAIT1 = 6,

.

    MIB_TCP_STATE_FIN_WAIT2 = 7,

.

    MIB_TCP_STATE_CLOSE_WAIT = 8,

.

    MIB_TCP_STATE_CLOSING = 9,

.

    MIB_TCP_STATE_LAST_ACK = 10,

.

    MIB_TCP_STATE_TIME_WAIT = 11,

.

    MIB_TCP_STATE_DELETE_TCB = 12

.

Public Enum MIB_TCP_STATE

.

    MIB_TCP_STATE_CLOSED = 1

.

    MIB_TCP_STATE_LISTEN = 2

.

    MIB_TCP_STATE_SYN_SENT = 3

.

    MIB_TCP_STATE_SYN_RCVD = 4

.

    MIB_TCP_STATE_ESTAB = 5

.

    MIB_TCP_STATE_FIN_WAIT1 = 6

.

    MIB_TCP_STATE_FIN_WAIT2 = 7

.

    MIB_TCP_STATE_CLOSE_WAIT = 8

.

    MIB_TCP_STATE_CLOSING = 9

.

    MIB_TCP_STATE_LAST_ACK = 10

.

    MIB_TCP_STATE_TIME_WAIT = 11

.

    MIB_TCP_STATE_DELETE_TCB = 12

.
Documentation
[MIB_TCP_STATE] on MSDN
.
Summary
NET_API_STATUS consists of the error codes returned by the Network Management API functions (netapi32.dll).
.

    /// #define NET_API_STATUS DWORD

.

    public enum NET_API_STATUS : uint

.

Public Enum NET_API_STATUS as UInteger

.

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.

.

    OLECMDTEXTF_STATUS = 2

.

    OLECMDTEXTF_STATUS = 2

.

        ERROR_STATE_MACHINES_NOT_STARTED,

.

        ERROR_STATE_MACHINES_ALREADY_STARTED,

.

        ERROR_INVALID_AUTH_STATE,

.

  public enum RM_APP_STATUS : uint

.
Documentation
[RM_APP_STATUS] on MSDN
.

     SC_MANAGER_QUERY_LOCK_STATUS   = 0x00010,

.

                      SC_MANAGER_QUERY_LOCK_STATUS |

.

    SC_MANAGER_QUERY_LOCK_STATUS = &H10

.

    SC_MANAGER_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED And SC_MANAGER_CONNECT And SC_MANAGER_CREATE_SERVICE And SC_MANAGER_ENUMERATE_SERVICE And SC_MANAGER_LOCK And SC_MANAGER_QUERY_LOCK_STATUS And SC_MANAGER_MODIFY_BOOT_CONFIG

.

     SERVICE_QUERY_STATUS       = 0x00004,

.

                       SERVICE_QUERY_STATUS     |

.

    SERVICE_QUERY_STATUS = &H4

.

            SERVICE_QUERY_STATUS Or _

.

public enum SERVICE_STATES : int

.

     SERVICE_STATE_ALL   = SERVICE_ACTIVE | SERVICE_INACTIVE

.

Public Enum SERVICE_STATES : int32

.

    SERVICE_STATE_ALL = SERVICE_ACTIVE Or SERVICE_INACTIVE

.
Documentation
[SERVICE_STATES] on MSDN
.

public enum SERVICE_STATES : int

.

     SERVICE_STATE_ALL   = SERVICE_ACTIVE | SERVICE_INACTIVE

.

<Flags()> Public Enum SERVICE_STATES : int32

.

    SERVICE_STATE_ALL = SERVICE_ACTIVE Or SERVICE_INACTIVE

.
Documentation
[SERVICE_STATES] on MSDN
35: SPDRP
.

    SPDRP_INSTALL_STATE = 0x00000022,

.

    /// The buffer receives a TOKEN_STATISTICS structure that contains various token statistics.

.

enum USB_CONNECTION_STATUS

.

Enum USB_CONNECTION_STATUS

.

typedef enum _USB_CONNECTION_STATUS {

.

} USB_CONNECTION_STATUS, *PUSB_CONNECTION_STATUS;

.
Documentation
[USB_CONNECTION_STATUS] on MSDN
.

    WS_EX_STATICEDGE = 0x00020000,

.

    WS_EX_STATICEDGE = 0x00020000,

.

    WS_EX_STATICEDGE = &H20000

.

    WS_EX_STATICEDGE As Long = &H20000

.

    WS_EX_STATICEDGE = 0x00020000,

.

    WS_EX_STATICEDGE = &H20000

.

    WS_EX_STATICEDGE As Long = &H20000

.
Summary
The WLAN_HOSTED_NETWORK_PEER_AUTH_STATE enumerated type specifies the possible values for the authentication state of a peer on the wireless Hosted Network.
.

public enum WLAN_HOSTED_NETWORK_PEER_AUTH_STATE

.

     wlan_hosted_network_peer_state_invalid,

.

     wlan_hosted_network_peer_state_authenticated

.

Enum WLAN_HOSTED_NETWORK_PEER_AUTH_STATE

.
Documentation
[WLAN_HOSTED_NETWORK_PEER_AUTH_STATE] on MSDN
.

    wlan_hosted_network_reason_virtual_station_blocking_use,

.

    wlan_hosted_network_reason_service_available_on_virtual_station

.

        public enum WLAN_INTERFACE_STATE

.

        /// wlan_interface_state_not_ready -> 0

.

        wlan_interface_state_not_ready = 0,

.

        /// wlan_interface_state_connected -> 1

.

        wlan_interface_state_connected = 1,

.

        /// wlan_interface_state_ad_hoc_network_formed -> 2

.

        wlan_interface_state_ad_hoc_network_formed = 2,

.

        /// wlan_interface_state_disconnecting -> 3

.

        wlan_interface_state_disconnecting = 3,

.

        /// wlan_interface_state_disconnected -> 4

.

        wlan_interface_state_disconnected = 4,

.

        /// wlan_interface_state_associating -> 5

.

        wlan_interface_state_associating = 5,

.

        /// wlan_interface_state_discovering -> 6

.

        wlan_interface_state_discovering = 6,

.

        /// wlan_interface_state_authenticating -> 7

.

        wlan_interface_state_authenticating = 7,

.

     Public Enum WLAN_INTERFACE_STATE

.

     ''' wlan_interface_state_not_ready -> 0

.

     wlan_interface_state_not_ready = 0

.

     ''' wlan_interface_state_connected -> 1

.

     wlan_interface_state_connected = 1

.

     ''' wlan_interface_state_ad_hoc_network_formed -> 2

.

     wlan_interface_state_ad_hoc_network_formed = 2

.

     ''' wlan_interface_state_disconnecting -> 3

.

     wlan_interface_state_disconnecting = 3

.

     ''' wlan_interface_state_disconnected -> 4

.

     wlan_interface_state_disconnected = 4

.

     ''' wlan_interface_state_associating -> 5

.

     wlan_interface_state_associating = 5

.

     ''' wlan_interface_state_discovering -> 6

.

     wlan_interface_state_discovering = 6

.

     ''' wlan_interface_state_authenticating -> 7

.

     wlan_interface_state_authenticating = 7

.
Documentation
[WLAN_INTERFACE_STATE] on MSDN
.

        wlan_intf_opcode_radio_state,

.

        wlan_intf_opcode_interface_state,

.

        wlan_intf_opcode_statistics,

.

     wlan_intf_opcode_radio_state

.

     wlan_intf_opcode_interface_state

.

     wlan_intf_opcode_statistics

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

53: 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 {

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


 
Access PInvoke.net directly from VS: