Desktop Functions: Smart Device Functions:
|
Search Results for "_stat" in [All]msvcrt1: _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); ntdll2: NtCreateFile
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 coredllpublic 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 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 SystemPowerStatusEx2 = new SYSTEM_POWER_STATUS_EX2(); 12: SetSysColors
/// 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); 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, 20: WLAN_RADIO_STATE 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) 21: WLAN_STATISTICS
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 kernel3222: CreateMutex
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 24: NetBIOS See Also: NCB, LANA_ENUM, ADAPTER_STATUS, NAME_BUFFER
Dim adapt As ADAPTER_STATUS
Dim myAdapt As New ADAPTER_STATUS 25: OpenEvent
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); 26: OpenMutex
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
static extern int CM_Get_DevNode_Status(ref int pulStatus, ref int pulProblemNumber, int dnDevInst, int ulFlags);
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
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) Structures32: ADAPTER_STATUS
internal struct ADAPTER_STATUS
Private Structure ADAPTER_STATUS
typedef struct _ADAPTER_STATUS {
} ADAPTER_STATUS, *PADAPTER_STATUS; 34: DFS_INFO_2
public int State; // State of this volume, one of DFS_VOLUME_STATE_* 35: DFS_INFO_3
public int State; // State of this volume, one of DFS_VOLUME_STATE_* 36: DFS_INFO_4
public int State; // State of this volume, one of DFS_VOLUME_STATE_* 37: DFS_STORAGE_INFO
public int State; // State of this storage, one of DFS_STORAGE_STATE_*, possibly OR'd with DFS_STORAGE_STATE_ACTIVE
public struct ENUM_SERVICE_STATUS
public SERVICE_STATUS ServiceStatus;
Structure ENUM_SERVICE_STATUS
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 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 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. 42: MIB_IPFORWARDROW
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; }
Public m_state As UInteger
Public ReadOnly Property State() As MIB_TCP_STATE
Return DirectCast(m_state, MIB_TCP_STATE) 45: NAME_BUFFER 46: RAS_STATS 47: SERVICE_STATUS
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
Private Structure SERVICE_STATUS
internal enum SERVICE_STATE : int
public SERVICE_STATE dwCurrentState; See ControlService for SERVICE_STATE definition. 48: SetServiceStatus
private static extern bool SetServiceStatus(IntPtr hServiceStatus, ref SERVICE_STATUS lpServiceStatus);
ByRef lpServiceStatus As SERVICE_STATUS)
public struct SERVICE_STATUS {
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;
public SYSTEM_POWER_STATE MinSystemState;
Public MinSystemState As SYSTEM_POWER_STATE
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
public struct WLAN_HOSTED_NETWORK_PEER_STATE
public WLAN_HOSTED_NETWORK_PEER_AUTH_STATE PeerAuthState;
Structure WLAN_HOSTED_NETWORK_PEER_STATE
public struct WLAN_HOSTED_NETWORK_RADIO_STATE
DOT11_RADIO_STATE dot11SoftwareRadioState;
DOT11_RADIO_STATE dot11HardwareRadioState;
Structure WLAN_HOSTED_NETWORK_RADIO_STATE
public struct WLAN_HOSTED_NETWORK_STATUS
public WLAN_HOSTED_NETWORK_STATE HostedNetworkState;
public WLAN_HOSTED_NETWORK_PEER_STATE[] PeerList;
Structure WLAN_HOSTED_NETWORK_STATUS Cut off search results after 60. Please refine your search. |