Desktop Functions: Smart Device Functions:
|
Search Results for "system" in [All]dmcl401: dmAPIGet
return System.Runtime.Interop.Marshal.PtrToStringAnsi( res ); credui
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
<System.Runtime.InteropServices.DllImport("credui.dll", EntryPoint:="CredUIPromptForWindowsCredentials", CharSet:=CharSet.Unicode)> <CLSCompliant(False)> _
/// The credential provider should align the credential BLOB pointed to by the refOutAuthBuffer parameter to a 32-bit boundary, even if the provider is running on a 64-bit system. icmp4: IcmpSendEcho
using System;
using System.Net;
using System.Runtime.InteropServices;
tcc -Wall ping.c /WINDOWS/system32/iphlpapi.dll /windows/system32/ws2_32.dll ws2_325: accept
System.Net.Sockets.Socket.Accept() 6: inet_ntoa
<System.Runtime.InteropServices.DllImport("ws2_32.dll", CharSet:=System.Runtime.InteropServices.CharSet.Ansi, SetLastError:=True)> 7: send System.Net.Sockets.Socket (class) Socket.SendTo () - better to use It)) 8: SendTo System.Net.Sockets.Socket (class) Socket.SendTo () - better to use It)) 9: WSAData
public String systemStatus;
internal string szSystemStatus; 10: WSAIoctl
IntPtr s, System.Net.Sockets.IOControlCode dwIoControlCode,
System.Diagnostics.Debug.WriteLine(qs.szServiceInstanceName);
System.Net.Sockets.AddressFamily.InterNetwork, mqrtMQGetQueueSecurity and MQSetQueueSecurity don't have a managed equivalent in the System.Messaging namespace. If you need to read or change the ACL on a queue to, for example, change the queue owner, you need to use P/Invoke to mqrt.dll. MQGetQueueSecurity and MQSetQueueSecurity don't have a managed equivalent in the System.Messaging namespace. If you need to read or change the ACL on a queue to, for example, change the queue owner, you need to use P/Invoke to mqrt.dll. System.Messaging.MessageQueue.SetPermissions dnsapi15: DnsQuery
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks; 16: DnsQueryEx
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks; powrprof
IntPtr status = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(SYSTEM_BATTERY_STATE)));
5, // SystemBatteryState
(UInt32)Marshal.SizeOf(typeof(SYSTEM_BATTERY_STATE))
SYSTEM_BATTERY_STATE batt_status = (SYSTEM_BATTERY_STATE)Marshal.PtrToStructure(status, typeof(SYSTEM_BATTERY_STATE)); 19: EnumPwrSchemes EnumPwrSchemes is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Applications written for Windows Vista and later should use PowerEnumerate instead.
static extern bool GetPwrCapabilities(out SYSTEM_POWER_CAPABILITIES systemPowerCapabilites);
static extern bool GetPwrCapabilities(out SYSTEM_POWER_CAPABILITIES systemPowerCapabilites);
static SYSTEM_POWER_CAPABILITIES systemPowerCapabilites;
GetPwrCapabilities(out SYSTEM_POWER_CAPABILITIES);
/// Check out if there is a power botton present in the system.
return systemPowerCapabilites.PowerButtonPresent;
/// Check out if there is a sleep botton present in the system.
return systemPowerCapabilites.SleepButtonPresent; 22: PowerEnumerate
// now we have a list of identifiers for all the power schemes on the system,
private const int PBT_APMRESUMEAUTOMATIC = 18; // (0x12) - Operation is resuming automatically from a low-power state.This message is sent every time the system resumes.
private const int PBT_APMSUSPEND = 4; // (0x4) - System is suspending operation.
Console.WriteLine("\tOperation is resuming automatically from a low-power state.This message is sent every time the system resumes.");
Console.WriteLine("\tSystem is suspending operation.");
uint BufferSize = (uint)System.Text.ASCIIEncoding.Unicode.GetByteCount(name); 25: QueryFlags
/// The device supports system power state D0.
/// The device supports system power state D1.
/// The device supports system power state D2.
/// The device supports system power state D3.
/// The device supports system sleep state S0.
/// The device supports system sleep state S1.
/// The device supports system sleep state S2.
/// The device supports system sleep state S3.
/// The device supports system sleep state S4.
/// The device supports system sleep state S5.
/// The device supports waking from system power state D0.
/// The device supports waking from system power state D1.
/// The device supports waking from system power state D2.
/// The device supports waking from system power state D3.
/// The device supports waking from system sleep state S0.
/// The device supports waking from system sleep state S1.
/// The device supports waking from system sleep state S2.
/// The device supports waking from system sleep state S3.
/// Ignore devices not currently present in the system.
/// Check whether the device is currently enabled to wake the system from a sleep state. 27: SetSuspendState If hibernate = true, the system hibernates. If hibernate = false, the system enters a standby state.
using System.Runtime.InteropServices;
/// Suspends the system by shutting power down. Depending on the Hibernate parameter, the system either enters a suspend (sleep) state or hibernation (S4).
/// <param name="hibernate">If this parameter is TRUE, the system hibernates. If the parameter is FALSE, the system is suspended.</param>
/// the system suspends operation immediately; if it is FALSE, the system broadcasts a PBT_APMQUERYSUSPEND event to each
/// <param name="disableWakeEvent">If this parameter is TRUE, the system disables all wake events. If the parameter is FALSE, any system wake events remain enabled.</param>
Inherits System.Windows.Forms.Form
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Public Shared Function SetSuspendState(ByVal state As System.Windows.Forms.PowerState, ByVal force As Boolean, ByVal disableWakeEvent As Boolean) As Boolean
Member of System.Windows.Forms.Application Suspends or hibernates the system, or requests that the system be suspended or hibernated. state: A System.Windows.Forms.PowerState indicating the power activity mode to which to transition. disableWakeEvent: true to disable restoring the system's power status to active on a wake event, false to enable restoring the system's power status to active on a wake event. true if the system is being suspended, otherwise, false. mapi3228: MAPILogoff
/// The MAPILogoff function ends a session with the messaging system.
''' The MAPILogoff function ends a session with the messaging system. 29: MAPILogon Microsoft Important Note: MAPI32 is not supported in a managed environment, memory leaks may be seen. Use the current alternatives: System.Net.Mail or WebDav or Exhange 2007 webservice interface. 30: MAPIReadMail
<Runtime.InteropServices.DllImport("MAPI32.DLL", CharSet:=System.Runtime.InteropServices.CharSet.Ansi)> _ string currentDirectory = System.IO.Directory.GetCurrentDirectory(); System.IO.Directory.SetCurrentDirectory (currentDirectory); 32: MAPISendMail
throw new System.InvalidOperationException(); wlanapiiphlpapi34: AddIPAddress using System.Runtime.InteropServices; using System.Net; using System.Net.Sockets;
System.Net.IPAddress IPAdd = System.Net.IPAddress.Parse(IPAddress);
System.Net.IPAddress SubNet = System.Net.IPAddress.Parse(SubnetMask); 35: EnableRouter
static extern int EnableRouter(IntPtr pHandle, ref System.Threading.NativeOverlapped pOverlapped); Some, but not, all the information provided by the P/Invoke are available from the managed System.Net.NetworkInformation.NetworkInterface (http://msdn.microsoft.com/en-us/library/system.net.networkinformation.networkinterface.aspx) class.
IF_TYPE_IBM370PARCHAN = 72, // IBM System 360/370 OEMI Channel
IF_TYPE_ESCON = 73, // IBM Enterprise Systems Connection
[System.Runtime.InteropServices.MarshalAs(UnmanagedType.LPWStr)]
[System.Runtime.InteropServices.MarshalAs(UnmanagedType.LPWStr)] When you do not need the PID information look at: IPGlobalProperties.GetActiveTcpListeners Method from the System.Net.NetworkInformation namespace
public const int AF_INET = 2; // IP_v4 = System.Net.Sockets.AddressFamily.InterNetwork
public const int AF_INET6 = 23; // IP_v6 = System.Net.Sockets.AddressFamily.InterNetworkV6
using System;
using System.Runtime.InteropServices;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public const int AF_INET = 2; // IP_v4 = System.Net.Sockets.AddressFamily.InterNetwork
public const int AF_INET6 = 23; // IP_v6 = System.Net.Sockets.AddressFamily.InterNetworkV6
Add-Member -InputObject $objOutput -MemberType NoteProperty -Name "LocalAddress" -Value ([System.Net.IPAddress]::new($y[$i].localAddr).IPAddressToString)
Add-Member -InputObject $objOutput -MemberType NoteProperty -Name "RemoteAddress" -Value ([System.Net.IPAddress]::new($y[$i].remoteAddr).IPAddressToString) 38: GetIfTable
/// Get the information about the current Network adapter in the system System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces() 39: GetIpAddrTable
System.Net.Dns.GetHostAddresses()
foreach (System.Net.IPAddress strIP in System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName()))
throw new System.ComponentModel.Win32Exception( r ); 40: GetIpNetTable
using System;
using System.Runtime.InteropServices;
using System.ComponentModel;
using System.Net; 41: GetNetworkParams Use [System.Net.NetworkInformation.IPGlobalProperties].GetIPGlobalProperties().
using System;
using System.Collections.Generic;
using System.Net;
using System.Runtime.InteropServices;
System.Windows.Forms.Application.Run();
using System;
using System.Collections.Generic;
using System.Net;
using System.Runtime.InteropServices;
System.Windows.Forms.Application.Run();
using System;
using System.Collections.Generic;
using System.Net;
using System.Runtime.InteropServices;
System.Windows.Forms.Application.Run(); 45: SendARP The DestIP and SrcIP arguments should be UInt32 to avoid System.OverflowException when the last nibble of the IP-address is .128 or greater.
// This API is now obsolete. --> http://msdn.microsoft.com/en-us/library/system.net.ipaddress.address.aspx 46: UnenableRouter
static extern int UnenableRouter(ref System.Threading.NativeOverlapped pOverlapped, IntPtr lpdwEnableCount); shlwapi
/// <exception cref="System.IO.FileNotFoundException">Unknown files extension</exception>
''' <exception cref="System.IO.FileNotFoundException">Unknown files extension</exception> 48: ColorHLSToRGB
using System;
using System.Drawing;
using System.Runtime.InteropServices;
static public System.Drawing.Color HLSToColor(int H,int L,int S)
// Convert Hue, Luminance, and Saturation values to System.Drawing.Color structure.
// ColorHLSToRGB returns a Win32 RGB value (0x00BBGGRR). To convert to System.Drawing.Color 49: ColorRGBToHLS
using System;
using System.Drawing;
using System.Runtime.InteropServices;
//Convert System.Drawing.Color structure to HLS.
static public void ColorToHLS(System.Drawing.Color C,ref int H,ref int L,ref int S) 50: IPreviewHandler [System.Runtime.InteropServices.ComImport] You can use this interface to leverage previewers already installed on a system to display a document preview in a Windows Forms app. 51: IsOS
/// Equivalent to PlatformID.Win32Windows. Note that none of those systems
/// systems.
/// GetSystemMetrics(SM_REMOTESESSION).
/// successors. Equivalent to GetSystemMetrics(SM_MEDIACENTER). 52: PathAddBackslash
static extern IntPtr PathAddBackslash([MarshalAs(UnmanagedType.LPTStr)]System.Text.StringBuilder lpszPath);
Public Function PathAddBackslash(<MarshalAs(UnmanagedType.LPTStr)>lpszPath As System.Text.StringBuilder) As IntPtr 53: PathAppend
Public Function PathAppend(<MarshalAs(UnmanagedType.LPTStr)>pszPath As System.Text.StringBuilder, _ 54: PathBuildRoot
static extern string PathBuildRoot([MarshalAs(UnmanagedType.LPTStr)]szRoot As System.Text.StringBuilder,
Public Function PathBuildRoot(<MarshalAs(UnmanagedType.LPTStr)>szRoot As System.Text.StringBuilder, _ 55: PathCombine
Declare Unicode Function PathCombine Lib "shlwapi.dll" Alias "PathCombineW" (<MarshalAs(UnmanagedType.LPTStr)> PathOut As System.Text.StringBuilder, <MarshalAs(UnmanagedType.LPTStr)> PathIn As String, <MarshalAs(UnmanagedType.LPTStr)> More As String) As IntPtr 56: PathCompactPath
<MarshalAs(UnmanagedType.LPTStr)> pszOut As System.Text.StringBuilder,
using System;
using System.Runtime.InteropServices;
using System.Text; System.Windows.Forms.TextRenderer.MeasureText(String, Font, Size, TextFormatFlags.ModifyString | TextFormatFlags.PathEllipsis);
<MarshalAs(UnmanagedType.LPTStr)> pszOut As System.Text.StringBuilder,
using System;
using System.Runtime.InteropServices;
using System.Text; System.Windows.Forms.TextRenderer.MeasureText(String, Font, Size, TextFormatFlags.ModifyString | TextFormatFlags.PathEllipsis);
ByVal path As System.Text.StringBuilder, _
ByRef pathLength As System.UInt32, _
Dim myResult As String = (new System.Uri(myUri)).LocalPath 'returns "C:\Temp\foo.txt"
Private Sub pathFromUrlButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pathFromUrlButton.Click
Dim sz As System.UInt32
Dim sb As System.Text.StringBuilder
sb = New System.Text.StringBuilder(INTERNET_MAX_URL_LENGTH) 59: PathFileExists
/// Determines whether a path to a file system object such as a file or directory is valid.
''' Determines whether a path to a file system object such as a file or directory is valid. 60: PathGetArgs
static extern System.Text.StringBuilder PathGetArgs([MarshalAs(UnmanagedType.LPTStr)]string pszPath);
Public Function PathGetArgs(<MarshalAs(UnmanagedType.LPTStr)>pszPath As String) As <MarshalAs(UnmanagedType.LPTStr)> System.Text.StringBuilder
Dim args As New System.Text.StringBuilder(255)
System.Diagnostics.Debug.WriteLine(args.ToString()) Cut off search results after 60. Please refine your search. |