Desktop Functions: Smart Device Functions:
|
Search Results for "system" in [All]msvcrt1: fclose [System.IO.FileStream] 2: fopen [System.IO.FileStream] 3: fwrite System.IO.FileStream 4: kbhit This is in the .NET 2.0 Console class functions System.Console.KeyAvailable() or System.Console.ReadKey(). System.Console.KeyAvailable() - Gets a value indicating whether a key press is available in the input stream. (Nonblocking) System.Console.ReadKey() - Obtains the next character or function key pressed by the user. Allows for both echoing key to screen or not. 5: memcmp Enumerable.SequenceEqual see: http://msdn.microsoft.com/en-us/library/system.linq.enumerable.sequenceequal.aspx 6: memcpy System.Buffer.BlockCopy, Marshal.Copy and Array.Copy provide similar services, but require one or two managed arrays instead of pointers. Imports System.Runtime.InteropServices 7: scanf Use System.Text.StringBuilder instead of System.String. 8: sprintf
Public Shared Function sprintf(ByVal TargetString As System.Text.StringBuilder, System.String.Format() 9: system
static extern int system(string command);
Public Declare Function system Lib "msvcrt.dll" (ByVal sCommand As String) As Long System.Diagnostics.Process.Start()
Public Declare Function system Lib "msvcrt.dll" (ByVal sCommand As String) As Long
system("ECHO Hello world!") 10: time mscorsn
/// <exception cref='System.ArgumentNullException'>If assembly or expectedToken are null</exception>
catch (System.IO.FileNotFoundException) glossaryDistributed computing is a programming model in which processing occurs in many different places (or nodes) around a network. Processing can occur wherever it makes the most sense, whether that is on a server, personal computer, handheld device, or other smart device. In contrast to the two-node system prevalent today (the client and the centralized server), Microsoft .NET uses distributed computing. 13: LibHolocaust
Namespaces: System.AIPCC.Pinvoke.Functions (seperated further by libname, wont list it here though)
System.AIPCC.Pinvoke.Structures
System.AIPCC.Pinvoke.Enums
System.AIPCC.Pinvoke.Constants
System.AIPCC.Pinvoke.Callbacks (delegates)
Namespaces: System.AIPCC.Pinvoke.COM.UUID
System.AIPCC.Pinvoke.COM.Interfaces
System.AIPCC.Pinvoke.COM.Classes
System.AIPCC.Pinvoke.COM <- contains base functions such as CoInitialize() odbccp32
using System;
using System.Runtime.InteropServices;
ODBC_ADD_SYS_DSN = 4, // Add a new system data source.
ODBC_CONFIG_SYS_DSN = 5, // Modify an existing system data source.
ODBC_REMOVE_SYS_DSN = 6, // Remove an existing system data source.
ODBC_REMOVE_DEFAULT_DSN = 7 // Remove the default data source specification section from the system information.
/// A method to dynamically add DSN-names to the system. This method also
/// If no entry exists in the system information when this function is called, Imports System Imports System.Runtime.InteropServices Imports System.Windows.Forms
Private Function CreateSystemDSN() As Boolean This function persists a system data source with the provided name and connection string. Remember to add your own error checking mechanisms.
SQLSetConfigMode(ConfigMode.ODBC_SYSTEM_DSN); 16: SQLSetConfigMode
ODBC_SYSTEM_DSN = 2, This function persists a system data source with the provided name and connection string. Remember to add your own error checking mechanisms.
SQLSetConfigMode(ConfigMode.ODBC_SYSTEM_DSN); coredll17: CeRunAppAtEvent
18: CeRunAppAtTime
(ByVal AppName As String, ByRef ExecTime As SYSTEMTIME) As Boolean
Public Structure SYSTEMTIME In VB, function will return "true" if successful when adding app to run. However, it returns a "false" when cancelling the app even though the event is successfully cancelled. I'm guessing this is due to the systemtime structure being passed by reference and in this case references nothing. See sample code below. (VB .NET CF) While this wakes the device, the screen may remain powered off. Combine with SetSystemPowerState truly wake up everything. Also, if the app is making a call to wake itself back up, you can get the full path and appname with system.reflection.assembly. See code below for example.
Dim FullAppName As String = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase
Dim AppPathOnly As String = System.IO.Path.GetDirectoryName(FullAppName)
Dim wakeuptime As SYSTEMTIME
'populate systemtime structure with our new date
System.DateTime dt = System.DateTime.Now.AddMinutes( 5 );
notificationTrigger.StartTime = new SYSTEMTIME( dt );
notificationTrigger.EndTime = new SYSTEMTIME();
System.DateTime dt = System.DateTime.Now.AddMinutes( 5 );
notificationTrigger.StartTime = new SYSTEMTIME( dt );
notificationTrigger.EndTime = new SYSTEMTIME(); CompactFramework 2 has a setting for ScreenOrientation http://msdn.microsoft.com/en-us/library/microsoft.windowsce.forms.systemsettings.screenorientation%28v=vs.90%29.aspx
using System;
using System.Collections.Generic;
using System.Text;
SystemSettings.ScreenOrientation = so;
return SystemSettings.ScreenOrientation; 23: CloseHandle
using HANDLE = System.IntPtr;
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using HANDLE = System.IntPtr; 24: CreateEvent
using HANDLE = System.IntPtr;
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using HANDLE = System.IntPtr;
Imports System.Runtime.InteropServices
Inherits System.Exception
'''The state of an auto-reset event object remains signaled until a single waiting thread is released, at which time the system automatically sets the state to nonsignaled. If no threads are waiting, the event object's state remains signaled. 25: CreateProcess
"C:\\WINDOWS\\SYSTEM32\\Calc.exe", 26: EventModify
using HANDLE = System.IntPtr; using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using HANDLE = System.IntPtr; 27: FormatMessageW
int dwMessageId, int dwLanguageId, System.Text.StringBuilder lpBuffer, int nSize, IntPtr[] Arguments);
int dwMessageId, int dwLanguageId, System.Text.StringBuilder lpBuffer, int nSize, IntPtr[] Arguments);
FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000
System.Text.StringBuilder sbMsg = new System.Text.StringBuilder(1024);
if (FormatMessage(FormatMessageFlags.FORMAT_MESSAGE_FROM_SYSTEM, IntPtr.Zero, win32ErrorCode, 0, sbMsg, sbMsg.Capacity, null) != 0) 28: GetCapture private void Form_Load(object sender, System.EventArgs e)
throw new System.ComponentModel.Win32Exception(); 31: GetIdleTime 32: GetKeyState
Const VK_NUMLOCK As Integer = CInt(System.Windows.Forms.Keys.NumLock) 33: GetLastError
Declare Function GetModuleFileNameEx Lib "coredll.dll" (ByVal hProcess As IntPtr, ByVal hModule As IntPtr, ByVal lpFileName As System.Text.StringBuilder, ByVal nSize As Int32) As Int32
Declare Function GetModuleFileNameEx Lib "coredll.dll" (ByVal hProcess As IntPtr, ByVal hModule As IntPtr, ByVal lpFileName As System.Text.StringBuilder, ByVal nSize As Int32) As Int32 36: GetSystemInfo
public static extern void GetSystemInfo(out SYSTEM_INFO lpSystemInfo);
Declare Function GetSystemInfo Lib "coredll.dll" (ByVal lpSystemInfo AS SYSTEM_INFO) [SYSTEM_INFO] on MSDN
public struct SYSTEM_INFO_WCE30
public struct SYSTEM_INFO_WCE50
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
[DllImport("kernel32", EntryPoint = "GetSystemInfo", SetLastError = true)]
public static extern void GetSystemInfo30(out SYSTEM_INFO_WCE30 pSi);
[DllImport("kernel32", EntryPoint = "GetSystemInfo", SetLastError = true)]
public static extern void GetSystemInfo50(out SYSTEM_INFO_WCE50 pSi);
SYSTEM_INFO_WCE50 si;
GetSystemInfo50(out si);
SYSTEM_INFO_WCE30 si;
GetSystemInfo30(out si);
static extern bool GetSystemMemoryDivision(ref uint lpdwStorePages, ref uint lpdwRamPages, ref uint lpdwPageSize);
Public Declare Function GetSystemMemoryDivision Lib "coredll.dll" _ public static extern int GetSystemMemoryDivision
Declare Function GetSystemMemoryDivision Lib "coredll.dll" (TODO) As TODO
public static extern int GetSystemPowerStatusEx2(SYSTEM_POWER_STATUS_EX2 pSystemPowerStatusEx2, [MarshalAs(UnmanagedType.U4), In] int dwLen, [MarshalAs(UnmanagedType.Bool), In] bool fUpdate);
Declare Function GetSystemPowerStatusEx2 Lib "Coredll.dll" (TODO) As TODO
SYSTEM_POWER_STATUS_EX2 SystemPowerStatusEx2 = new SYSTEM_POWER_STATUS_EX2();
if (GetSystemPowerStatusEx2(SystemPowerStatusEx2, Marshal.SizeOf(SystemPowerStatusEx2), true) > 0) {
public static extern int GetSystemPowerStatusEx2(ref SYSTEM_POWER_STATUS_EX2 pSystemPowerStatusEx2, [MarshalAs(UnmanagedType.U4), In] int dwLen, [MarshalAs(UnmanagedType.Bool), In] bool fUpdate);
Declare Function GetSystemPowerStatusEx2 Lib "Coredll.dll" (TODO) As TODO
SYSTEM_POWER_STATUS_EX2 SystemPowerStatusEx2 = new SYSTEM_POWER_STATUS_EX2();
if (GetSystemPowerStatusEx2(ref SystemPowerStatusEx2, Marshal.SizeOf(SystemPowerStatusEx2), true) > 0) { 41: GetWindowLong
static extern System.UInt32 GetWindowLong(IntPtr hWnd, int nIndex);
Private Shared Function GetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As Integer) As System.UInt32
static extern void GwesPowerOffSystem();
Declare Sub GwesPowerOffSystem Lib "coredll.dll" ()
extern static void GwesPowerOffSystem();
GwesPowerOffSystem(); 44: ImmSetOpenStatus
// System.Windows.Forms.MessageBox.Show ("IME has be Opened");
// System.Windows.Forms.MessageBox.Show ("IME has be Opened"); 45: keybd_event 46: MessageBox <System.Runtime.InteropServices.DllImport("kernel32.dll", _ System.Windows.Forms.MessageBox.Show(string message) 47: NOTIFYICONDATA 48: OpenEvent Use the DuplicateHandle function to duplicate the handle. Use the CloseHandle function to close the handle. The system closes the handle automatically when the process terminates. The event object is destroyed when its last handle has been closed. 49: PlaySound
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Windows.Forms;
Imports System
Imports System.Diagnostics
Imports System.IO
Imports System.Runtime.InteropServices
obj.m_size = System.Convert.ToUInt32(Marshal.SizeOf(typeof(_RASCONN)));
size = System.Convert.ToUInt32(Marshal.SizeOf((rasconn = new _RASCONN[1])[0] = _RASCONN.CreateStruct()));
size = System.Convert.ToUInt32(Marshal.SizeOf((rasconn = new _RASCONN[size / Marshal.SizeOf(typeof(_RASCONN))])[0] = _RASCONN.CreateStruct()) * rasconn.Length); 51: RegCreateKeyEx The .NET Compact Framework does not contain a HandleRef type, so it may be necessary to call [GC.KeepAlive] after calling this function if the calling class wraps the hKey parameter as an unmanaged resource. 52: RegDeleteKey The .NET Compact Framework does not contain a HandleRef type, so it may be necessary to call [GC.KeepAlive] after calling this function if the calling class wraps the hKey parameter as an unmanaged resource. 53: RegDeleteValue The .NET Compact Framework does not contain a HandleRef type, so it may be necessary to call [GC.KeepAlive] after calling this function if the calling class wraps the hKey parameter as an unmanaged resource. 54: RegFlushKey The .NET Compact Framework does not contain a HandleRef type, so it may be necessary to call [GC.KeepAlive] after calling this function if the calling class wraps the hKey parameter as an unmanaged resource. 55: RegOpenKeyEx The .NET Compact Framework does not contain a HandleRef type, so it may be necessary to call [GC.KeepAlive] after calling this function if the calling class wraps the hKey parameter as an unmanaged resource. 56: RegQueryInfoKey The .NET Compact Framework does not contain a HandleRef type, so it may be necessary to call [GC.KeepAlive] after calling this function if the calling class wraps the hKey parameter as an unmanaged resource. OutAttribute is used with [StringBuilder] parameters because StringBuilder is a reference type. Using the out keyword will result in passing the reference by-reference, but in this case the reference must be passed by-value. 57: ResetEvent
using HANDLE = System.IntPtr;
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using HANDLE = System.IntPtr; 58: SendInput
/// Force the system to react, as if the Tab-key was pressed
/// Force the system to react, as if the Shift- and Tab-key was pressed
/// Force the system to react, as if the Ctrl- and Tab-key was pressed
/// Force the system to react, as if the Ctrl-, Shift- and Tab-key was pressed 59: SendMessage If you are searching for a way to send keys to an application, you can use System.Windows.Forms.SendKeys.Send(keys) after bringing the window to the top via the SetForegroundWindow API.
[System.Runtime.InteropServices.DllImport("coredll.dll")]
[System.Runtime.InteropServices.DllImport("coredll.dll")] 60: SetClipboardData
' If SetClipboardData succeeds, the system owns the object identified by the hMem parameter. Cut off search results after 60. Please refine your search. |