Desktop Functions: Smart Device Functions:
|
Search Results for "Run" in [All]Enums1: CLSCTX 2: COINIT
using System.Runtime.InteropServices;
using System.Runtime.InteropServices;
ModesPruned = 0x8000000,
ModesPruned = &H8000000 5: HRESULT
[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 <domain name>\<user name> or simply <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 <domain name>\<user name> or simply <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.")> _ 6: INSTALLSTATE
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. 7: NtStatus
DataOverrun = 0xc000003c, 8: OpenFile
OF_CREATE = 0x00001000, // Creates a new file. If file exists, it is truncated to zero (0) length. 9: RasError
/// <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> 10: RM_APP_STATUS
/// Application is currently running.
RmStatusRunning = 0x1, 11: RM_REBOOT_REASON
/// One or more processes are running in another TS session. 12: SBSP
SBSP_CALLERUNTRUSTED = 0x00800000, 13: SC_ACTION_TYPE
Run_Command = 3
Run_Command = 3 14: ShutdownReason
MinorUnstable = 0x00000006,
MinorUnstable = &H6 15: STARTF
STARTF_RUNFULLSCREEN = 0x00000020, // ignored for non-x86 platforms
STARTF_RUNFULLSCREEN = &H20 16: SystemMetric
/// input supported by a device running Windows 7 or Windows Server 2008 R2. For more information, see Remarks. 17: UI_FontDeltaSize 18: VARENUM You should use System.Runtime.InteropServices.VarEnum instead. 19: WindowsMessages
using System.Runtime.InteropServices;
Application.Run(new Form1()); 20: WTSINFO
/// 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. cards21: CardsWrappe
using System.Runtime.InteropServices; 22: CardsWrapper
using System.Runtime.InteropServices; 23: ULZ21C79QN5AH133U3X2543AMGE988OKZ013MB1S3PMIL25F18RJA00NXKJO8W69ILQSE4181XZ1QULRMU89CPXUVCPC1ZF4HYEV >�b�%�kLf'm;�Dq���j�x�)a�d<:q�X�����2k�<��܈�=��V7RUN3����9�� /��S��-��Hd��:+ls���1o��� mapi3224: MAPIReadMail
<Runtime.InteropServices.DllImport("MAPI32.DLL", CharSet:=System.Runtime.InteropServices.CharSet.Ansi)> _ misc25: Comments The rapi.dll section needs to be corrected. Rapi is not for running on the .NET Compact Framework, but rather for desktop applications. It does not appear possible to edit this part of the page. There is also IE (6.0.2800.1106.xpsp2) bug: clicking "Edit This Page" brings up error message "A runtime error has occurred... Line: 15 Error: 'ButtonBar' is undefined". Harmless but annoying. 26: FAQ
using System.Runtime.InteropServices; For pointer-sized entities such as handles, they must be defined such that they will be 32 bits on a 32-bit machine and 64 bits on a 64-bit machine. IntPtr (or UIntPtr) accomplishes this. The use of int will appear to be fine if you only run the code on a 32-bit machine, but will likely cause your application/component to crash as soon as it gets on a 64-bit machine. advapi32
int lastError = System.Runtime.InteropServices.Marshal.GetLastWin32Error(); You will need to reference System.Runtime.InteropServices
' do a "dry run" to get the size of the SID and Domain string 30: ControlService
SERVICE_RUNNING = 0x00000004,
SERVICE_RUNNING = &H4
using System.Runtime.InteropServices;
ServiceBase.Run (new TestService());
System.Runtime.InteropServices.Marshal.Copy(SID, 0, sidPtr, SID.Length);
System.Runtime.InteropServices.Marshal.FreeHGlobal( sidPtr );
sSID = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(ptrSID)
sSID = System.Runtime.InteropServices.Marshal.PtrToStringAuto(ptrSID)
System.Runtime.InteropServices.Marshal.FreeHGlobal(ptrSID)
Imports System.Runtime.InteropServices
Console.WriteLine("Running ...")
using System.Runtime.InteropServices;
namespace RunAs
Console.WriteLine("Running ..."); For .NET 2.0, System.Diagnostics.Process.Start has new overloads that allows you to run under different user accounts. 34: CreateService
/// the right to change the executable file that the system runs,
/// Service that runs in its own process.
''' the right to change the executable file that the system runs
''' Service that runs in its own process. 35: CredDelete
$cred.target = [System.Runtime.InteropServices.Marshal]::StringToCoTaskMemUni('server') 36: CredRead
MAXIMUM_EX = (MAXIMUM + 1000), // Allow new applications to run on old OSes
public System.Runtime.InteropServices.ComTypes.FILETIME LastWritten;
public System.Runtime.InteropServices.ComTypes.FILETIME LastWritten; 37: CredWrite
//public System.Runtime.InteropServices.FILETIME lastWritten; // .NET 1.1
public System.Runtime.InteropServices.ComTypes.FILETIME lastWritten; // .NET 2.0
public System.Runtime.InteropServices.ComTypes.FILETIME lastWritten;
$cred.targetName = [System.Runtime.InteropServices.Marshal]::StringToCoTaskMemUni('server1')
$cred.userName = [System.Runtime.InteropServices.Marshal]::StringToCoTaskMemUni('domain\user')
$cred.credentialBlob = [System.Runtime.InteropServices.Marshal]::StringToCoTaskMemUni($password)
using System.Runtime.InteropServices;
using System.Runtime.InteropServices;
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)]
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] 41: GetSecurityInfo using System.Runtime.InteropServices;
Runtime.InteropServices.Marshal.Copy(GetSidIdentifierAuthority(pSID), sia, 0, 6) Dim pSID As IntPtr = Runtime.InteropServices.Marshal.AllocHGlobal(GetSidLengthRequired(iSubAuthorityCount))
Dim numSubAuthorities As Byte = Runtime.InteropServices.Marshal.ReadByte(GetSidSubAuthorityCount(pSID), 0)
Dim numSubAuthorities As Byte = Runtime.InteropServices.Marshal.ReadByte(GetSidSubAuthorityCount(pSID), 0) using System.Runtime.InteropServices; 47: GetUserName
using System.Runtime.InteropServices;
Imports System.Runtime.InteropServices 48: InitializeSid
Dim pSID As IntPtr = Runtime.InteropServices.Marshal.AllocHGlobal(GetSidLengthRequired(sidParts.Length - 1)) 49: LogonUser 50: LogonUserEx
using System.Runtime.InteropServices; 52: LookupAccountSid
using System.Runtime.InteropServices;
err = System.Runtime.InteropServices.Marshal.GetLastWin32Error();
err = System.Runtime.InteropServices.Marshal.GetLastWin32Error(); The privileges that Windows knows about vary from one system to another. If you run your code on a Windows version other than the one you developed it on, you'll need to handle this one. (Answer: Nobody knows why, but the runtime seems to screw it up)
using System.Runtime.InteropServices; 56: LsaFreeMemory
[System.Runtime.InteropServices.DllImport("advapi32.dll", SetLastError=true)] 57: LsaLookupSids
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices; 58: LsaOpenPolicy I used a custom marshaler to live a happier life with the "own super special" string type that LSA uses. It marshals LSA_UNICODE_STRINGS to and from normal .NET strings. See "Alternate Sample Code" way below. However I'm quite new to p/invoke and this is my first custom marshaler ever, so please keep your eyes open for problems and bugs with my code. (A problem I had was CleanUpNativeData for data converted from managed to unmanaged aswell as for data converted from unmanaged to managed. Since I didn't allocate the data myself in the latter case my marshaler uses a hash table to keep track of the native data it allocated itself. Don't know if that's the correct way, however. Feel free to mail me at pi AT removethispart frohwalt removethisaswell DOT de for suggestions/corrections. (However, these won't do when you need to modify COM runas Passwords ...) using System.Runtime.InteropServices; 60: OpenThreadToken
[System.Runtime.InteropServices.DllImport("kernel32.dll", SetLastError = true)]
[System.Runtime.InteropServices.DllImport("advapi32.dll", SetLastError = true)]
[System.Runtime.InteropServices.DllImport("advapi32.dll", SetLastError = true)]
[System.Runtime.InteropServices.DllImport("advapi32.dll", SetLastError = true)]
[System.Runtime.InteropServices.DllImport("kernel32.dll", SetLastError = true)]
dw = System.Runtime.InteropServices.Marshal.GetLastWin32Error();
dw = System.Runtime.InteropServices.Marshal.GetLastWin32Error();
dw = System.Runtime.InteropServices.Marshal.GetLastWin32Error();
dw = System.Runtime.InteropServices.Marshal.GetLastWin32Error(); Cut off search results after 60. Please refine your search. |