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 "system" in [All]

msvcrt

.

[System.IO.FileStream]

.

[System.IO.FileStream]

.

System.IO.FileStream

.

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.

.

Enumerable.SequenceEqual see: http://msdn.microsoft.com/en-us/library/system.linq.enumerable.sequenceequal.aspx

.

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

.

Use System.Text.StringBuilder instead of System.String.

.

  Public Shared Function sprintf(ByVal TargetString As System.Text.StringBuilder,

.

System.String.Format()

.
VB.NET
Investigate the use of System.Text.StringBuilder.AppendFormat before using sprintf.
.

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!")

.
Documentation
[system] on MSDN
10: time
.
Summary
The time function returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time, according to the system clock. The return value is stored in the location given by timer. This parameter may be NULL, in which case the return value is not stored.

mscorsn

.

    /// <exception cref='System.ArgumentNullException'>If assembly or expectedToken are null</exception>

.

        catch (System.IO.FileNotFoundException)

glossary

.

Distributed 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.

.
Summary
LibHolocaust, System.AIPCC.Pinvoke (new to LH ver 1.0.3.9b, replaces System.AIPCC.WindowsAPI in older versions)
.

    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

.
Summary
Gets a list of names of values or data corresponding to a value of the system information (MSDN ODBC Programmer's Reference). This function works similarly to the GetProfileString() Win32 API function.
.

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

.
Summary
Sets the configuration mode that indicates where the Odbc.ini entry listing DSN values is in the system information (MSDN ODBC Programmer's Reference).
.

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

coredll

.
NOTIFICATION_EVENT_TIME_CHANGE When the system time is changed. 1
.
Summary
This function prompts the system to start running a specified application at a specified time.
.

       (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

.

SYSTEMTIME

.

  System.DateTime dt = System.DateTime.Now.AddMinutes( 5 );

.

  notificationTrigger.StartTime = new SYSTEMTIME( dt );

.

  notificationTrigger.EndTime = new SYSTEMTIME();

.

SYSTEMTIME

.

  System.DateTime dt = System.DateTime.Now.AddMinutes( 5 );

.

  notificationTrigger.StartTime = new SYSTEMTIME( dt );

.

  notificationTrigger.EndTime = new SYSTEMTIME();

.

    public SYSTEMTIME StartTime;

.

    public SYSTEMTIME EndTime;

.

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;

.

using HANDLE = System.IntPtr;

.

using System;

.

using System.Collections.Generic;

.

using System.Text;

.

using System.Runtime.InteropServices;

.

using HANDLE = System.IntPtr;

.

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.

.

    "C:\\WINDOWS\\SYSTEM32\\Calc.exe",

.

using HANDLE = System.IntPtr;

.

using System;

.

using System.Collections.Generic;

.

using System.Text;

.

using System.Runtime.InteropServices;

.

using HANDLE = System.IntPtr;

.

        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)

.

private void Form_Load(object sender, System.EventArgs e)

.

    throw new System.ComponentModel.Win32Exception();

.

http://msdn2.microsoft.com/en-us/library/system.diagnostics.fileversioninfo.aspx

.
Summary
This function returns the amount of time, in milliseconds, that the system has been idle.
.

   Const VK_NUMLOCK As Integer = CInt(System.Windows.Forms.Keys.NumLock)

.
Summary
GetLastError- retrieves the last system error.
.

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

.

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

.
Documentation
[GetSystemInfo] on MSDN
.
Summary
This function retrieves information from the kernel pertaining to object store and system memory.
.

static extern bool GetSystemMemoryDivision(ref uint lpdwStorePages, ref uint lpdwRamPages, ref uint lpdwPageSize);

.

Public Declare Function GetSystemMemoryDivision Lib "coredll.dll" _

.
Documentation
[GetSystemMemoryDivision] on MSDN
.

public static extern int GetSystemMemoryDivision

.

Declare Function GetSystemMemoryDivision Lib "coredll.dll" (TODO) As TODO

.
Documentation
[GetSystemMemoryDivision] on MSDN
.

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

.

SYSTEM_POWER_STATUS_EX2 SystemPowerStatusEx2 = new SYSTEM_POWER_STATUS_EX2();

.

if (GetSystemPowerStatusEx2(SystemPowerStatusEx2, Marshal.SizeOf(SystemPowerStatusEx2), true) > 0) {

.
Documentation
[GetSystemPowerStatusEx2] on MSDN
.

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

.

SYSTEM_POWER_STATUS_EX2 SystemPowerStatusEx2 = new SYSTEM_POWER_STATUS_EX2();

.

if (GetSystemPowerStatusEx2(ref SystemPowerStatusEx2, Marshal.SizeOf(SystemPowerStatusEx2), true) > 0) {

.
Documentation
[GetSystemPowerStatusEx2] on MSDN
.

static extern System.UInt32 GetWindowLong(IntPtr  hWnd, int nIndex);

.

    Private Shared Function GetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As Integer) As System.UInt32

.
Summary
This function gets information on the physical and virtual memory of the system.
.

static extern void GwesPowerOffSystem();

.

Declare Sub GwesPowerOffSystem Lib "coredll.dll" ()

.

    extern static void GwesPowerOffSystem();

.

        GwesPowerOffSystem();

.
Documentation
[GwesPowerOffSystem] on MSDN
.

            //    System.Windows.Forms.MessageBox.Show ("IME has be Opened");

.

            //    System.Windows.Forms.MessageBox.Show ("IME has be Opened");

.
Summary
The keybd_event function synthesizes a keystroke. The system can use such a synthesized keystroke to generate a WM_KEYUP or WM_KEYDOWN message. The keyboard driver's interrupt handler calls the keybd_event function (from msdn.microsoft.com)
.

    using System.Collections.Generic;

.

    using System.Text;

.

    using System.Runtime.InteropServices;

.

<System.Runtime.InteropServices.DllImport("kernel32.dll", _

.

System.Windows.Forms.MessageBox.Show(string message)

.
Summary
This structure contains information that the system needs to process taskbar status area messages.
.

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.

.

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

. . .

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.

. . .

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.

. . .

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.

. . .

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.

. . .

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.

. . . . .

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.

.

using HANDLE = System.IntPtr;

.

using System;

.

using System.Collections.Generic;

.

using System.Text;

.

using System.Runtime.InteropServices;

.

using HANDLE = System.IntPtr;

.

    /// 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

.

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")]

.

        ' If SetClipboardData succeeds, the system owns the object identified by the hMem parameter.

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


 
Access PInvoke.net directly from VS: