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

ntdsapi

.

using System.Runtime.ConstrainedExecution;

.

using System.Runtime.InteropServices;

.

    using System.Runtime.InteropServices;

rpcrt4

.

pin_ptr<unsigned char> UuidSringPtr = static_cast<unsigned char *>(System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi("C3ECE8CB-E9F8-47f9-AC61-8EA8572403F2").ToPointer());

.
System

rapi

.
Summary
This function creates, opens, or truncates a file, pipe, communications resource, disk device, or console. It returns a handle that can be used to access the object. It can also open and return a handle to a directory.
.
Summary
This function is used to run a new program. It creates a new process and its primary thread. The new process executes the specified executable file.
.

   ProcessStartInfo psi = new ProcessStartInfo(@"\PathTo\programToRun.exe");

.
Summary
This function obtains extended information about the version of the operating system that is currently running
.

HRESULT translates to void (NOT int or anything else some idiot has written down) for c# function prototypes. Any HRESULT other than "OK" will cause the runtime to throw an exception.

.

HRESULT translates to void (NOT int or anything else some idiot has written down) for c# function prototypes. Any HRESULT other than "OK" will cause the runtime to throw an exception.

.

FILETIME is now obsolet. You can use System.Runtime.InteropServices.ComTypes.FILETIME type instead.

gsapi

10: !
.

&cŽÏ7ÉÉ¡¶Î• í0Á&dû Óî1runä ¤FtKtɜdY”oܤà¬Ù€®S${NJE£ÆÜèðŒXÈYFæ|iNã!”wà©ÀZˆ½`ëb|hí;p&÷¢ÎU?DÔÀñDVfq¢XWì\}Wg͐3;îTØ[Þ®Ì

.

using System.Runtime.InteropServices;

.

    public static void run(string[] argv)

.

        Ghostscript.run(argv);

dwmapi

.

The VistaBridge project includes API's for many other Vista Features (such as the TaskDialog, Vista OpenFile and SaveFile Dialogs, and of course the Aero Glass Effects) to try these out, run the VistaBridge Project.

.

This only appears to be an issue with VS2008, and it may have been fixed by the time you are reading this, so try to run the project first, and if you click on one of the 'TaskDialog' buttons and see it popup (ie you dont see an exception) then you do not need to take these steps, if you do get an exception, follow the steps below:

.

To Run the VistaBridge Project in Visual Studio 2008, you must re-create the Application Manifest file. To do this, open the manifest already in the project, copy all of the text from it to notepad and then delete the manifest file from the project. Next, right click on the "VistaBridgeDemoApp" project and select Add New Item. Choose an Application Manifest File and MAKE SURE you name it as follows: VistaBridgeDemoApp.exe.manifest and then press enter. Now double click on the new manifest file, select all the text and replace it with the text that was copied out of the old manifest. You can now Build the solution and the Demo App should now operate properly. If you still have problems, try closing Visual Studio and then Re-opening it.

.

The VistaBridge project includes API's for many other Vista Features (such as the TaskDialog, Vista OpenFile and SaveFile Dialogs, and of course the Aero Glass Effects) to try these out, run the VistaBridge Project.

.

The VistaBridge project includes API's for many other Vista Features (such as the TaskDialog, Vista OpenFile and SaveFile Dialogs, and of course the Aero Glass Effects) to try these out, run the VistaBridge Project.

.

This only appears to be an issue with VS2008, and it may have been fixed by the time you are reading this, so try to run the project first, and if you click on one of the 'TaskDialog' buttons and see it popup (ie you dont see an exception) then you do not need to take these steps, if you do get an exception, follow the steps below:

.

To Run the VistaBridge Project in Visual Studio 2008, you must re-create the Application Manifest file. To do this, open the manifest already in the project, copy all of the text from it to notepad and then delete the manifest file from the project. Next, right click on the "VistaBridgeDemoApp" project and select Add New Item. Choose an Application Manifest File and MAKE SURE you name it as follows: VistaBridgeDemoApp.exe.manifest and then press enter. Now double click on the new manifest file, select all the text and replace it with the text that was copied out of the old manifest. You can now Build the solution and the Demo App should now operate properly. If you still have problems, try closing Visual Studio and then Re-opening it.

.

NB Since Windows XP has been end-of-lifed, the OS version checks can be skipped. Especially if you are using .NET 4.5 and up, in which case Vista or greater is a prerequisite to run your program.

.

The VistaBridge project includes API's for many other Vista Features (such as the TaskDialog, Vista OpenFile and SaveFile Dialogs, and of course the Aero Glass Effects) to try these out, run the VistaBridge Project.

.

just copy the sample and start the method and run it

Enums

17: CLSCTX
.
Summary
Indicates the execution contexts in which an object is to be run
18: COINIT
.
Summary
A set of values from the COINIT enumeration is passed as the second parameter to CoInitializeEx. This value determines the concurrency model used for incoming calls to objects created by the thread making the call. However, since pinvoke is a dotNET construct you should be aware that dotNET already does a COM initialization and therefore calling a CoInitializeEx function most likely will not do what you expect. This problem occurs when trying to instantiate a COM object from within dotNET where the COM objects threading model is different from dotNETs. Search on Common Language Runtime or CLR and COINIT_APARTMENTTHREADED to find posts on this issue.
.

    using System.Runtime.InteropServices;

.

    using System.Runtime.InteropServices;

.

    ModesPruned = 0x8000000,

.

    ModesPruned = &H8000000

.

  [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential,Pack=4)]

.

      return System.Runtime.InteropServices.Marshal.GetExceptionForHR(hr);

.

    ///The class is configured to run as a security id different from the caller

.

    [Description("The class is configured to run as a security id different from the caller")]

.

    ///A RunAs specification must be &lt;domain name>\<user name> or simply &lt;user name>

.

    [Description("A RunAs specification must be <domain name>\\<user name> or simply <user name>")]

.

    public const int CO_E_RUNAS_SYNTAX = unchecked((int)0x80004017);

.

    public const int CO_E_RUNAS_CREATEPROCESS_FAILURE = unchecked((int)0x80004019);

.

    public const int CO_E_RUNAS_LOGON_FAILURE = unchecked((int)0x8000401A);

.

    ///The common language runtime is not available

.

    [Description("The common language runtime is not available")]

.

    ///Need to run the object to perform this operation

.

    [Description("Need to run the object to perform this operation")]

.

    public const int OLE_E_NOTRUNNING = unchecked((int)0x80040005);

.

    ///Application cannot be run more than once

.

    [Description("Application cannot be run more than once")]

.

    ///Message is too long; some of it had to be truncated before displaying

.

    [Description("Message is too long; some of it had to be truncated before displaying")]

.

    public const int INPLACE_S_TRUNCATED = unchecked((int)0x000401A0);

.

    ///Moniker is already registered in running object table

.

    [Description("Moniker is already registered in running object table")]

.

    ///The task is ready to run at its next scheduled time.

.

    [Description("The task is ready to run at its next scheduled time.")]

.

    ///The task is currently running.

.

    [Description("The task is currently running.")]

.

    public const int SCHED_S_TASK_RUNNING = unchecked((int)0x00041301);

.

    ///The task will not run at the scheduled times because it has been disabled.

.

    [Description("The task will not run at the scheduled times because it has been disabled.")]

.

    ///The task has not yet run.

.

    [Description("The task has not yet run.")]

.

    public const int SCHED_S_TASK_HAS_NOT_RUN = unchecked((int)0x00041303);

.

    ///There are no more runs scheduled for this task.

.

    [Description("There are no more runs scheduled for this task.")]

.

    public const int SCHED_S_TASK_NO_MORE_RUNS = unchecked((int)0x00041304);

.

    ///One or more of the properties that are needed to run this task on a schedule have not been set.

.

    [Description("One or more of the properties that are needed to run this task on a schedule have not been set.")]

.

    ///The last run of the task was terminated by the user.

.

    [Description("The last run of the task was terminated by the user.")]

.

    ///Event triggers don't have set run times.

.

    [Description("Event triggers don't have set run times.")]

.

    ///One or more of the properties that are needed to run this task have not been set.

.

    [Description("One or more of the properties that are needed to run this task have not been set.")]

.

    ///There is no running instance of the task to terminate.

.

    [Description("There is no running instance of the task to terminate.")]

.

    public const int SCHED_E_TASK_NOT_RUNNING = unchecked((int)0x8004130B);

.

    ///The task has been configured with an unsupported combination of account settings and run time options.

.

    [Description("The task has been configured with an unsupported combination of account settings and run time options.")]

.

    ///The Task Scheduler Service is not running.

.

    [Description("The Task Scheduler Service is not running.")]

.

    public const int SCHED_E_SERVICE_NOT_RUNNING = unchecked((int)0x80041315);

.

    //  See asn1code.h for a definition of the OSS runtime errors. The OSS

.

    ///OSS ASN.1 Error: Output buffer is too small, the decoded data has been truncated.

.

    [Description("OSS ASN.1 Error: Output buffer is too small, the decoded data has been truncated.")]

.

    ///The Smart card resource manager is not running.

.

    [Description("The Smart card resource manager is not running.")]

.

    ///The COM+ registry database is already running

.

    [Description("The COM+ registry database is already running")]

.

    public const int COMADMIN_E_REGDB_ALREADYRUNNING = unchecked((int)0x80110475);

.

    ///The specified application is not currently running

.

    [Description("The specified application is not currently running")]

.

    public const int COMADMIN_E_APP_NOT_RUNNING = unchecked((int)0x8011080A);

.

    ///COM+ applications that run as NT service may not be pooled or recycled

.

    [Description("COM+ applications that run as NT service may not be pooled or recycled")]

.

    ///Applications running as NT services may not be recycled.

.

    [Description("Applications running as NT services may not be recycled.")]

.

<System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack := 4)> _

.

        Return System.Runtime.InteropServices.Marshal.GetExceptionForHR(hr)

.

    '''The class is configured to run as a security id different from the caller

.

    <Description("The class is configured to run as a security id different from the caller")> _

.

    '''A RunAs specification must be &lt;domain name>\<user name> or simply &lt;user name>

.

    <Description("A RunAs specification must be <domain name>\<user name> or simply <user name>")> _

.

    Public Const CO_E_RUNAS_SYNTAX As Integer = CInt(&H80004017UI)

.

    Public Const CO_E_RUNAS_CREATEPROCESS_FAILURE As Integer = CInt(&H80004019UI)

.

    Public Const CO_E_RUNAS_LOGON_FAILURE As Integer = CInt(&H8000401aUI)

.

    '''The common language runtime is not available

.

    <Description("The common language runtime is not available")> _

.

    '''Need to run the object to perform this operation

.

    <Description("Need to run the object to perform this operation")> _

.

    Public Const OLE_E_NOTRUNNING As Integer = CInt(&H80040005UI)

.

    '''Application cannot be run more than once

.

    <Description("Application cannot be run more than once")> _

.

    '''Message is too long; some of it had to be truncated before displaying

.

    <Description("Message is too long; some of it had to be truncated before displaying")> _

.

    Public Const INPLACE_S_TRUNCATED As Integer = CInt(&H401a0)

.

    '''Moniker is already registered in running object table

.

    <Description("Moniker is already registered in running object table")> _

.

    '''The task is ready to run at its next scheduled time.

.

    <Description("The task is ready to run at its next scheduled time.")> _

.

    '''The task is currently running.

.

    <Description("The task is currently running.")> _

.

    Public Const SCHED_S_TASK_RUNNING As Integer = CInt(&H41301)

.

    '''The task will not run at the scheduled times because it has been disabled.

.

    <Description("The task will not run at the scheduled times because it has been disabled.")> _

.

    '''The task has not yet run.

.

    <Description("The task has not yet run.")> _

.

    Public Const SCHED_S_TASK_HAS_NOT_RUN As Integer = CInt(&H41303)

.

    '''There are no more runs scheduled for this task.

.

    <Description("There are no more runs scheduled for this task.")> _

.

    Public Const SCHED_S_TASK_NO_MORE_RUNS As Integer = CInt(&H41304)

.

    '''One or more of the properties that are needed to run this task on a schedule have not been set.

.

    <Description("One or more of the properties that are needed to run this task on a schedule have not been set.")> _

.

    '''The last run of the task was terminated by the user.

.

    <Description("The last run of the task was terminated by the user.")> _

.

    '''Event triggers don't have set run times.

.

    <Description("Event triggers don't have set run times.")> _

.

    '''One or more of the properties that are needed to run this task have not been set.

.

    <Description("One or more of the properties that are needed to run this task have not been set.")> _

.

    '''There is no running instance of the task to terminate.

.

    <Description("There is no running instance of the task to terminate.")> _

.

    Public Const SCHED_E_TASK_NOT_RUNNING As Integer = CInt(&H8004130bUI)

.

    '''The task has been configured with an unsupported combination of account settings and run time options.

.

    <Description("The task has been configured with an unsupported combination of account settings and run time options.")> _

.

    '''The Task Scheduler Service is not running.

.

    <Description("The Task Scheduler Service is not running.")> _

.

    Public Const SCHED_E_SERVICE_NOT_RUNNING As Integer = CInt(&H80041315UI)

.

    '  See asn1code.h for a definition of the OSS runtime errors. The OSS

.

    '''OSS ASN.1 Error: Output buffer is too small, the decoded data has been truncated.

.

    <Description("OSS ASN.1 Error: Output buffer is too small, the decoded data has been truncated.")> _

.

    '''The Smart card resource manager is not running.

.

    <Description("The Smart card resource manager is not running.")> _

.

    '''The COM+ registry database is already running

.

    <Description("The COM+ registry database is already running")> _

.

    Public Const COMADMIN_E_REGDB_ALREADYRUNNING As Integer = CInt(&H80110475UI)

.

    '''The specified application is not currently running

.

    <Description("The specified application is not currently running")> _

.

    Public Const COMADMIN_E_APP_NOT_RUNNING As Integer = CInt(&H8011080aUI)

.

    '''COM+ applications that run as NT service may not be pooled or recycled

.

    <Description("COM+ applications that run as NT service may not be pooled or recycled")> _

.

    '''Applications running as NT services may not be recycled.

.

    <Description("Applications running as NT services may not be recycled.")> _

.

    INSTALLSTATE_SOURCEABSENT = -4,  // run from source, source is unavailable

.

    INSTALLSTATE_SOURCE       =  4,  // run from source, CD or net

.

    ''' Run from source, source is unavailable.

.

    ''' Run from source, CD or net.

.

    DataOverrun = 0xc000003c,

.

    OF_CREATE    = 0x00001000,  // Creates a new file. If file exists, it is truncated to zero (0) length.

.

        /// <summary>664. The system has run out of memory. </summary>

.

        /// <summary>710. Serial overrun errors were detected while communicating with the modem. </summary>

.

        ERROR_OVERRUN,

.

        /// <summary>827. The L2TP/IPsec connection cannot be completed because the IKE and AuthIP IPSec Keying Modules service and/or the Base Filtering Engine service is not running. These services are required to establish an L2TP/IPSec connection. </summary>

.

    /// Application is currently running.

.

    RmStatusRunning = 0x1,

.

    /// One or more processes are running in another TS session.

28: SBSP
.

    SBSP_CALLERUNTRUSTED = 0x00800000,

.

            Run_Command = 3

.

        Run_Command = 3

.

    MinorUnstable = 0x00000006,

.

     MinorUnstable = &H6

31: STARTF
.

        STARTF_RUNFULLSCREEN = 0x00000020,  // ignored for non-x86 platforms

.

    STARTF_RUNFULLSCREEN = &H20

.

        /// input supported by a device running Windows 7 or Windows Server 2008 R2. For more information, see Remarks.

.
Summary
Specifies values that identify whether the font size of a highlighted text run should be incremented or decremented.
.

You should use System.Runtime.InteropServices.VarEnum instead.

.

using System.Runtime.InteropServices;

.

            Application.Run(new Form1());

.

     /// A null-terminated string that contains the name of the initial program that Remote Desktop Services runs when the user logs on.

.

     /// A null-terminated string that contains the published name of the application that the session is running.

setupapi

.

            SP_COPY_NOPRUNE         = 0x0100000   // never prune this file

.

        public System.Runtime.InteropServices.ComTypes.FILETIME DriverDate;

.

Note that the maximum length of any single string specified in an INF Strings section is 512 characters, including the terminating NULL. If the string length is greater than 512 it will be truncated and no error will be returned. The maximum length of any concatenated string created from one or more tokens is 4096 characters.

mapi32

.

  <Runtime.InteropServices.DllImport("MAPI32.DLL", CharSet:=System.Runtime.InteropServices.CharSet.Ansi)> _

odbccp32

.

using System.Runtime.InteropServices;

.

Imports System.Runtime.InteropServices

.

     ODBC_ERROR_OUTPUT_STRING_TRUNCATED = 22,

rasapi32

.

    using System.Runtime.InteropServices;

oleaut32

.
Summary
Retrieves a a running object that has been registered with OLE.
.

Declare Unicode Function LoadTypeLib Lib "oleaut32.dll" (ByVal szFile As String, ByRef TPpTypeLib As System.Runtime.InteropServices.ComTypes.ITypeLib) As Integer

.

In VB.Net you can substitute [System.Runtime.InteropServices.ComTypes.ITypeLib2] or [System.Runtime.InteropServices.UCOMITypeLib] for [System.Runtime.InteropServices.ComTypes.ITypeLib], defined in mscorlib.dll.

.

Note that in v2.0 (Whidbey) of the .NET Framework, the System.Runtime.InteropServices.UCOMITypeLib interface has been deprecated in favor of System.Runtime.InteropServices.ComTypes.ITypeLib.

.

Declare Unicode Function RegisterTypeLib Lib "oleaut32.dll" (ByVal ptlib As System.Runtime.InteropServices.ComTypes.ITypeLib, ByVal szFullPath As String, ByVal szHelpDir As String) As Integer

.

For the ITypeLib parameter in C#, you can use [System.Runtime.InteropServices.UCOMITypeLib], already defined in mscorlib.dll. Note that in v2.0 (Whidbey) of the .NET Framework, this interface has been deprecated in favor of System.Runtime.InteropServices.ComTypes.ITypeLib.

.

In VB.Net you can substitute [System.Runtime.InteropServices.ComTypes.ITypeLib2] or [System.Runtime.InteropServices.UCOMITypeLib] for [System.Runtime.InteropServices.ComTypes.ITypeLib], defined in mscorlib.dll.

.

System.Runtime.InteropServices.Marshal.FreeBSTR

.

http://msdn2.microsoft.com/en-us/library/system.runtime.interopservices.marshal.freebstr.aspx

.

Declare Unicode Function UnRegisterTypeLib Lib "oleaut32.dll" (ByRef LibID As System.Guid, ByVal nVerMajor As Short, ByVal nVerMinor As Short, ByVal lCID As Integer, ByVal tSysKind As System.Runtime.InteropServices.ComTypes.SYSKIND) As Integer

.

In VB.Net you can substitute [System.Runtime.InteropServices.SYSKIND] for [System.Runtime.InteropServices.ComTypes.SYSKIND], defined in mscorlib.dll.

.

Note that in v2.0 (Whidbey) of the .NET Framework, the System.Runtime.InteropServices.SYSKIND interface has been deprecated in favor of System.Runtime.InteropServices.ComTypes.SYSKIND.

wtsapi32

.

        Throw New Exception(ex.Message & vbCrLf & System.Runtime.InteropServices.Marshal.GetLastWin32Error)

.

//Handle to the server that this code is running on.

.

using System.Runtime.InteropServices;

.

using System.Runtime.InteropServices;

.

$datasize = [system.runtime.interopservices.marshal]::SizeOf([System.Type][mystruct.WTS_SESSION_INFO])

.

     $element =  [system.runtime.interopservices.marshal]::PtrToStructure($ppSessionInfo + ($datasize * $i),[System.type][mystruct.WTS_SESSION_INFO])

.

Imports System.Runtime.InteropServices

.

            Throw New ApplicationException("No data retruned")

.

        Throw New Exception(ex.Message & vbCrLf & System.Runtime.InteropServices.Marshal.GetLastWin32Error)

.

For the server handle (first parameter), please use WTS_CURRENT_SERVER_HANDLE if the code is running on the same machine whose handle you intend to pass. Otherwise, use WTSOpenServer as shown in the sample code.

.

        Throw New Exception(ex.Message & vbCrLf & System.Runtime.InteropServices.Marshal.GetLastWin32Error)

.

You do not need to open a handle for operations performed on the terminal server on which your application is running. Use the constant WTS_CURRENT_SERVER_HANDLE instead.

.

/// or specify <see cref="WTS_CURRENT_SERVER_HANDLE"/> to indicate the terminal server on which your application is running.</param>

.

/// <param name="sessionId">A Terminal Services session identifier. To indicate the session in which the calling application is running

.

    using System.Runtime.InteropServices;

.

    /// or specify <see cref="WTS_CURRENT_SERVER_HANDLE"/> to indicate the terminal server on which your application is running.</param>

.

    /// <param name="sessionId">A Terminal Services session identifier. To indicate the session in which the calling application is running

.

            /// <remarks>It is not necessary that Terminal Services be running for this function to succeed.</remarks>

.

            /// Gets a <see cref="bool"/> indicating if the current ehmsas.exe is being run locally or in a Remote session.

.

            internal static bool GetIsRunningLocally()

.
Summary
Retrieve the primary access token for the user associated with the specified session ID. The caller must be running in the context of the LocalSystem account and have the SE_TCB_NAME privilege. Only highly trusted service should use this function. The application must not leak tokens, and close the token when it has finished using it.
.

        <System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst:=20)> _

.
Summary
The WTS_PROCESS_INFO structure contains information about a process running on a terminal server.

userenv

.

To build: run the following commands at bash command prompt, after copying an icon file, say bfe.ico, to the cwd:

.

To run:

.

The calling process must have the SE_RESTORE_NAME and SE_BACKUP_NAME privileges. For more information, see Running with Special Privileges.

msdelta

.

                      ref System.Runtime.InteropServices.ComTypes.FILETIME lpTargetFileTime,

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


 
Access PInvoke.net directly from VS: