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]

msvcrt

.

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

.

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

.

    int res = _stat(file, ref s);

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

shell32

.

    Public T_STATE As ABState

.

    ABN_STATECHANGE = 0

.

            retState.T_STATE = ABState.ABS_MANUAL

.

            retState.T_STATE = ABState.ABS_ALWAYSONTOP

.

            retState.T_STATE = ABState.ABS_AUTOHIDE

.

            retState.T_STATE = ABState.ABS_AUTOHIDEANDONTOP

.

        private uint BIF_STATUSTEXT     = 0x0004;  // Top of the dialog has 2 lines of text for BROWSEINFO.lpszTitle and one line if

.

     out QUERY_USER_NOTIFICATION_STATE pquns);

.

enum QUERY_USER_NOTIFICATION_STATE

msi

.

        ERROR_INVALID_HANDLE_STATE = 1609,

mpr

.

    ERROR_INVALID_HANDLE_STATE = 1609,

.

    ERROR_INVALID_HANDLE_STATE = 1609

coredll

.

public static extern int DevicePowerNotify(string name, CEDEVICE_POWER_STATE state, int flags);

.

public enum CEDEVICE_POWER_STATE : int

.

DevicePowerNotify("WLP1:", CEDEVICE_POWER_STATE.D0, POWER_NAME);

.

DevicePowerNotify("WLP1:", CEDEVICE_POWER_STATE.D4, POWER_NAME);

.

public static extern int GetSystemPowerStatusEx2(SYSTEM_POWER_STATUS_EX2 pSystemPowerStatusEx2, [MarshalAs(UnmanagedType.U4), In] int dwLen, [MarshalAs(UnmanagedType.Bool), In] bool fUpdate);

.

SYSTEM_POWER_STATUS_EX2

.

SYSTEM_POWER_STATUS_EX2 SystemPowerStatusEx2 = new SYSTEM_POWER_STATUS_EX2();

.

public static extern int GetSystemPowerStatusEx2(ref SYSTEM_POWER_STATUS_EX2 pSystemPowerStatusEx2, [MarshalAs(UnmanagedType.U4), In] int dwLen, [MarshalAs(UnmanagedType.Bool), In] bool fUpdate);

.

SYSTEM_POWER_STATUS_EX2

.

SYSTEM_POWER_STATUS_EX2 SystemPowerStatusEx2 = new SYSTEM_POWER_STATUS_EX2();

.

    /// 25 COLOR_STATIC Background color for static controls and dialog boxes. Supported in Windows CE 2.0 and later.

.

    /// 26 COLOR_STATICTEXT Color of the text for static controls. Supported in Windows CE 2.0 and later.

.

    public const int COLOR_STATIC = (25 | SYS_COLOR_INDEX_FLAG);

.

    public const int COLOR_STATICTEXT = (26 | SYS_COLOR_INDEX_FLAG);

.

            COLOR_STATIC,            

.

            COLOR_STATICTEXT,            

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_STATIC

.

            Color.Green.ToArgb() & 0x00ffffff,           //COLOR_STATICTEXT

.

    Const POWER_STATE_ON As Integer = &H10000

.

    Const POWER_STATE_OFF As Integer = &H20000

.

    Const POWER_STATE_SUSPEND As Integer = &H200000

.

    Const POWER_STATE_RESET as Integer = &H800000 'this wil make the device soft reset! :)

.

    SetSystemPowerState(Nothing, POWER_STATE_ON, POWER_FORCE)

.

    SetSystemPowerState(Nothing, POWER_STATE_RESET, POWER_FORCE)

.

    const int POWER_STATE_ON = 0x00010000;

.

    const int POWER_STATE_OFF = 0x00020000;

.

    const int POWER_STATE_SUSPEND = 0x00200000;

.

    const int POWER_STATE_RESET = 0x00800000;

.

            return SetSystemPowerState(null, POWER_STATE_ON, POWER_FORCE);

.

        return SetSystemPowerState(null, POWER_STATE_RESET, POWER_FORCE);

.

internal class SYSTEM_POWER_STATUS_EX

.

Structure SYSTEM_POWER_STATUS_EX

.
Documentation
[SYSTEM_POWER_STATUS_EX] on MSDN

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

crypt32

.

                            [In, Out] ref CERT_REVOCATION_STATUS pRevStatus);

.

        CERT_REVOCATION_STATUS revStatus = new CERT_REVOCATION_STATUS();

wlanapi

.

     [Out] out WLAN_HOSTED_NETWORK_STATUS pWlanHostedNetworkStatus,

.

WLAN_RADIO_STATE

.

WLAN_INTERFACE_STATE

.

WLAN_STATISTICS

.

private struct WLAN_RADIO_STATE

.

    public WLAN_PHY_RADIO_STATE[] PhyRadioState;

.

    public WLAN_RADIO_STATE(IntPtr ppData)

.

        // The first 4 bytes are the number of WLAN_PHY_RADIO_STATE structures.

.

        // Construct the array of WLAN_PHY_RADIO_STATE structures.

.

        PhyRadioState = new WLAN_PHY_RADIO_STATE[dwNumberOfPhys];

.

            // structure. The length of the WLAN_PHY_RADIO_STATE structure is 12 bytes

.

            // Construct the WLAN_PHY_RADIO_STATE structure, marshal the unmanaged

.

            PhyRadioState[i] = (WLAN_PHY_RADIO_STATE)Marshal.PtrToStructure(pPhyList, typeof(WLAN_PHY_RADIO_STATE));

.

    Private Structure WLAN_RADIO_STATE

.

    Public PhyRadioState As WLAN_PHY_RADIO_STATE()

.

        ' The first 4 bytes are the number of WLAN_PHY_RADIO_STATE structures.

.

        ' Construct the array of WLAN_PHY_RADIO_STATE structures.

.

        PhyRadioState = New WLAN_PHY_RADIO_STATE(dwNumberOfPhys - 1) {}

.

        ' structure. The length of the WLAN_PHY_RADIO_STATE structure is 12 bytes

.

        ' Construct the WLAN_PHY_RADIO_STATE structure, marshal the unmanaged

.

        PhyRadioState(i) = DirectCast(Marshal.PtrToStructure(pPhyList, GetType(WLAN_PHY_RADIO_STATE)), WLAN_PHY_RADIO_STATE)

.
Documentation
[WLAN_RADIO_STATE] on MSDN
.
Summary
The WLAN_STATISTICS structure contains assorted statistics about an interface.
.

    public struct WLAN_STATISTICS {

.

            public WLAN_MAC_FRAME_STATISTICS MacUcastCounters;

.

            public WLAN_MAC_FRAME_STATISTICS MacMcastCounters;

.

            public WLAN_PHY_FRAME_STATISTICS[] PhyCounters;

.

    Public Structure WLAN_STATISTICS

.

            Public MacUcastCounters As WLAN_MAC_FRAME_STATISTICS

.

            Public MacMcastCounters As WLAN_MAC_FRAME_STATISTICS

.

            Public PhyCounters() As WLAN_PHY_FRAME_STATISTICS

.
Documentation
[WLAN_STATISTICS] on MSDN

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

setupapi

.
Summary
The CM_Get_DevNode_Status function obtains the status of a device instance from its device node, in the local machine's device tree.
.

static extern int CM_Get_DevNode_Status(ref int pulStatus, ref int pulProblemNumber, int dnDevInst, int ulFlags);

.
Documentation
CM_Get_DevNode_Status @msdn on MSDN
.

static extern int CM_Get_DevNode_Status(out UInt32 status, out UInt32 probNum, UInt32 devInst, int flags);

.

    Private Shared Function CM_Get_DevNode_Status(ByRef status As ULong, ByRef probNum As ULong, ByVal devInst As IntPtr, ByVal Flag As Integer) As Integer

.

If CM_Get_DevNode_Status(status, problem, DeviceInfoData.DevInst, 0) = CR_SUCCESS Then

.
Documentation
[CM_Get_DevNode_Status] on MSDN
.

    if (CR_SUCCESS == CM_Get_DevNode_Status(ref status, ref problem, devinst, 0) && (DN_REMOVABLE & status) > 0)

.

     SPDRP_INSTALL_STATE           = 0x00000022, // Device Install State (R)

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

41: 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

.

        /// WLAN_INTERFACE_STATE->_WLAN_INTERFACE_STATE

.

        public WLAN_INTERFACE_STATE isState;

.

     ''' WLAN_INTERFACE_STATE->_WLAN_INTERFACE_STATE

.

     Public isState As WLAN_INTERFACE_STATE

.

WLAN_INTERFACE_STATE

.

public struct WLAN_HOSTED_NETWORK_PEER_STATE

.

     public WLAN_HOSTED_NETWORK_PEER_AUTH_STATE PeerAuthState;

.

Structure WLAN_HOSTED_NETWORK_PEER_STATE

.
Documentation
[WLAN_HOSTED_NETWORK_PEER_STATE] on MSDN
.

public struct WLAN_HOSTED_NETWORK_RADIO_STATE

.

     DOT11_RADIO_STATE dot11SoftwareRadioState;

.

     DOT11_RADIO_STATE dot11HardwareRadioState;

.

Structure WLAN_HOSTED_NETWORK_RADIO_STATE

.
Documentation
[WLAN_HOSTED_NETWORK_RADIO_STATE] on MSDN
.

public struct WLAN_HOSTED_NETWORK_STATUS

.

     public WLAN_HOSTED_NETWORK_STATE HostedNetworkState;

.

     public WLAN_HOSTED_NETWORK_PEER_STATE[] PeerList;

.

Structure WLAN_HOSTED_NETWORK_STATUS

.
Documentation
[WLAN_HOSTED_NETWORK_STATUS] on MSDN

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


 
Access PInvoke.net directly from VS: