Desktop Functions: Smart Device Functions:
|
Search Results for "Service" in [All]icmp1: IcmpSendEcho
using System.Runtime.InteropServices; comctl32
using System.Runtime.InteropServices;
using System.Runtime.InteropServices; 4: TaskDialog using Microsoft.SDK.Samples.VistaBridge.Interop or .Library or .Properties or .Services - Depending on your needs. using Microsoft.SDK.Samples.VistaBridge.Interop or .Library or .Properties or .Services - Depending on your needs. crypt32In the Web Services Development Kit (WSDK) Technology Preview and .NET Whidbey.
using System.Runtime.InteropServices;
CharSet=System.Runtime.InteropServices.CharSet.Auto)
<DllImport("Crypt32.dll", SetLastError:=True, CharSet:=System.Runtime.InteropServices.CharSet.Auto)> _ Under some circumstances, Microsoft cryptographic service providers (CSPs) may not allow encryption when used in France, in which case this function fails with the error code NTE_PERM.
CharSet=System.Runtime.InteropServices.CharSet.Auto)
<DllImport("Crypt32.dll", SetLastError:=True, CharSet:=System.Runtime.InteropServices.CharSet.Auto)> _ Structures10: BITMAPFILEHEADER
using System.Runtime.InteropServices;
Imports System.Runtime.InteropServices 11: CEOSVERSIONINFO
Imports System.Runtime.InteropServices 12: COMMPROP
int dwServiceMask;
Dim dwServiceMask As Integer 14: CWPSTRUCT
<System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential)> _ 15: DCB
using System.Runtime.InteropServices; 16: DEVMODE
[System.Runtime.InteropServices.FieldOffset(0)]
[System.Runtime.InteropServices.FieldOffset(32)]
[System.Runtime.InteropServices.FieldOffset(34)]
[System.Runtime.InteropServices.FieldOffset(36)]
[System.Runtime.InteropServices.FieldOffset(38)]
[System.Runtime.InteropServices.FieldOffset(40)]
[System.Runtime.InteropServices.FieldOffset(44)]
[System.Runtime.InteropServices.FieldOffset(46)]
[System.Runtime.InteropServices.FieldOffset(48)]
[System.Runtime.InteropServices.FieldOffset(50)]
[System.Runtime.InteropServices.FieldOffset(52)]
[System.Runtime.InteropServices.FieldOffset(54)]
[System.Runtime.InteropServices.FieldOffset(56)]
[System.Runtime.InteropServices.FieldOffset(58)]
[System.Runtime.InteropServices.FieldOffset(44)]
[System.Runtime.InteropServices.FieldOffset(52)]
[System.Runtime.InteropServices.FieldOffset(56)]
[System.Runtime.InteropServices.FieldOffset(60)]
[System.Runtime.InteropServices.FieldOffset(62)]
[System.Runtime.InteropServices.FieldOffset(64)]
[System.Runtime.InteropServices.FieldOffset(66)]
[System.Runtime.InteropServices.FieldOffset(68)]
[System.Runtime.InteropServices.FieldOffset(70)]
[System.Runtime.InteropServices.FieldOffset(102)]
[System.Runtime.InteropServices.FieldOffset(104)]
[System.Runtime.InteropServices.FieldOffset(108)]
[System.Runtime.InteropServices.FieldOffset(112)]
[System.Runtime.InteropServices.FieldOffset(116)]
[System.Runtime.InteropServices.FieldOffset(116)]
[System.Runtime.InteropServices.FieldOffset(120)]
using System.Runtime.InteropServices;
Imports System.Runtime.InteropServices 17: DISK_GEOMETRY
<System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)> _
public struct ENUM_SERVICE_STATUS
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)]
public string pServiceName;
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)]
public SERVICE_STATUS ServiceStatus;
Structure ENUM_SERVICE_STATUS 19: FILEDESCRIPTOR
public System.Runtime.InteropServices.ComTypes.FILETIME ftCreationTime;
public System.Runtime.InteropServices.ComTypes.FILETIME ftLastAccessTime;
public System.Runtime.InteropServices.ComTypes.FILETIME ftLastWriteTime;
<Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, CharSet:=Runtime.InteropServices.CharSet.Auto)>
Public ftCreationTime As System.Runtime.InteropServices.ComTypes.FILETIME
Public ftLastAccessTime As System.Runtime.InteropServices.ComTypes.FILETIME
Public ftLastWriteTime As System.Runtime.InteropServices.ComTypes.FILETIME
<Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst:=260)> 20: FILETIME [System.Runtime.InteropServices.FILETIME] (obsolete), or [System.Runtime.InteropServices.ComTypes.FILETIME] in the .NET Framework 2.0. There is no reason not to use [System.Runtime.InteropServices.ComTypes.FILETIME], but there still is a need for conversion to [DateTime]: * Note that System.Runtime.InteropServices.FILETIME is now obsolete. Changed to use System.Runtime.InteropServices.ComTypes.FILETIME instead. 21: FORMATETC
// handle with the GMEM_SHARE flag. If the System.Runtime.InteropServices.ComTypes.STGMEDIUMSystem.Runtime.InteropServices.ComTypes.STGMEDIUM.pUnkForRelease
// The storage medium is a disk file identified by a path. If the STGMEDIUMSystem.Runtime.InteropServices.ComTypes.STGMEDIUM.pUnkForRelease
// ISequentialStream::Read to read the data. If the System.Runtime.InteropServices.ComTypes.STGMEDIUMSystem.Runtime.InteropServices.ComTypes.STGMEDIUM.pUnkForRelease
// If the System.Runtime.InteropServices.ComTypes.STGMEDIUMSystem.Runtime.InteropServices.ComTypes.STGMEDIUM.pUnkForRelease
// If the System.Runtime.InteropServices.ComTypes.STGMEDIUMSystem.Runtime.InteropServices.ComTypes.STGMEDIUM.pUnkForRelease
// to access the metafile's data. If the System.Runtime.InteropServices.ComTypes.STGMEDIUMSystem.Runtime.InteropServices.ComTypes.STGMEDIUM.pUnkForRelease
// The storage medium is an enhanced metafile. If the System.Runtime.InteropServices.ComTypes.STGMEDIUMSystem.Runtime.InteropServices.ComTypes.STGMEDIUM.pUnkForRelease
' handle with the GMEM_SHARE flag. If the System.Runtime.InteropServices.ComTypes.STGMEDIUMSystem.Runtime.InteropServices.ComTypes.STGMEDIUM.pUnkForRelease
' The storage medium is a disk file identified by a path. If the STGMEDIUMSystem.Runtime.InteropServices.ComTypes.STGMEDIUM.pUnkForRelease
' ISequentialStream::Read to read the data. If the System.Runtime.InteropServices.ComTypes.STGMEDIUMSystem.Runtime.InteropServices.ComTypes.STGMEDIUM.pUnkForRelease
' If the System.Runtime.InteropServices.ComTypes.STGMEDIUMSystem.Runtime.InteropServices.ComTypes.STGMEDIUM.pUnkForRelease
' If the System.Runtime.InteropServices.ComTypes.STGMEDIUMSystem.Runtime.InteropServices.ComTypes.STGMEDIUM.pUnkForRelease
' to access the metafile's data. If the System.Runtime.InteropServices.ComTypes.STGMEDIUMSystem.Runtime.InteropServices.ComTypes.STGMEDIUM.pUnkForRelease
' The storage medium is an enhanced metafile. If the System.Runtime.InteropServices.ComTypes.STGMEDIUMSystem.Runtime.InteropServices.ComTypes.STGMEDIUM.pUnkForRelease
public struct HTTP_SERVICE_CONFIG_SSL_QUERY
public HTTP_SERVICE_CONFIG_QUERY_TYPE QueryDesc;
public HTTP_SERVICE_CONFIG_SSL_KEY KeyDesc;
Structure HTTP_SERVICE_CONFIG_SSL_QUERY HTTP_SERVICE_CONFIG_QUERY_TYPE
struct HTTP_SERVICE_CONFIG_SSL_SET
public HTTP_SERVICE_CONFIG_SSL_KEY KeyDesc;
public HTTP_SERVICE_CONFIG_SSL_PARAM ParamDesc;
Structure HTTP_SERVICE_CONFIG_SSL_SET
public struct HTTP_SERVICE_CONFIG_URLACL_KEY
public HTTP_SERVICE_CONFIG_URLACL_KEY(string urlPrefix)
Public Structure HTTP_SERVICE_CONFIG_URLACL_KEY
struct HTTP_SERVICE_CONFIG_URLACL_PARAM
public HTTP_SERVICE_CONFIG_URLACL_PARAM(string securityDescriptor)
Public Structure HTTP_SERVICE_CONFIG_URLACL_PARAM
struct HTTP_SERVICE_CONFIG_URLACL_QUERY
public HTTP_SERVICE_CONFIG_QUERY_TYPE QueryDesc;
public HTTP_SERVICE_CONFIG_URLACL_KEY KeyDesc;
Structure HTTP_SERVICE_CONFIG_URLACL_QUERY HTTP_SERVICE_CONFIG_QUERY_TYPE HTTP_SERVICE_CONFIG_URLACL_KEY
struct HTTP_SERVICE_CONFIG_URLACL_SET
public HTTP_SERVICE_CONFIG_URLACL_KEY KeyDesc;
public HTTP_SERVICE_CONFIG_URLACL_PARAM ParamDesc;
Public Structure HTTP_SERVICE_CONFIG_URLACL_SET
Public KeyDesc As HTTP_SERVICE_CONFIG_URLACL_KEY
Public ParamDesc As HTTP_SERVICE_CONFIG_URLACL_PARAM HTTP_SERVICE_CONFIG_URLACL_KEY HTTP_SERVICE_CONFIG_URLACL_PARAM
IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER = 11,
''' // Terminal- Services-aware, it
' that is not Terminal- Services-aware, it also loads a DLL that contains compatibility code)
' that is not Terminal- Services-aware, it also loads a DLL that contains compatibility code)
IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER = 11,
public byte TypeOfService;
public IntPtr SecurityQualityOfService;
Dim SecurityQualityOfService As IntPtr 'Service provided by Telerik (www.telerik.com) 37: MAPI
/// Pointer to an opaque entry identifier used by a messaging system service provider to identify the
/// message recipient. Entry identifiers have meaning only for the service provider;
''' Pointer to an opaque entry identifier used by a messaging system service provider to identify the
''' message recipient. Entry identifiers have meaning only for the service provider; 38: MENUINFO mi.cbSize = System.Runtime.InteropServicesÂ.Marshal.SizeOf(typeof(MENUINFÂO)); 39: NOTIFYICONDATA
using System.Runtime.InteropServices
Public SecurityQualityOfService As IntPtr
SecurityQualityOfService = IntPtr.Zero
public IntPtr SecurityQualityOfService;
SecurityQualityOfService = IntPtr.Zero; 41: OSVERSIONINFO
public UInt16 wServicePackMajor;
public UInt16 wServicePackMinor;
public ushort wServicePackMajor;
public ushort wServicePackMinor;
Public wServicePackMajor As UInt16
Public wServicePackMinor As UInt16 42: OSVERSIONINFOEX
public UInt16 wServicePackMajor;
public UInt16 wServicePackMinor;
Public wServicePackMajor As UInt16
Public wServicePackMinor As UInt16 43: PRINTDLG
[System.Runtime.InteropServices.ComVisible(false)] 44: RAS_USER_1 45: RAWINPUTKEYBOARD
<System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential)> _ 46: RECT Imports System.Runtime.InteropServices
using System.Runtime.InteropServices;
using System.Runtime.InteropServices; 49: servent 51: SERVICE_STATUS
public struct SERVICE_STATUS
public SERVICE_TYPES dwServiceType;
public SERVICE_STATE dwCurrentState;
public uint dwServiceSpecificExitCode; Easier Structure (which appears to work fine and allows you to avoid defining the SERVICE_TYPES and SERVICE_STATE enumerations and to use CLR compliant types (int)):
private struct SERVICE_STATUS
public int serviceType;
public int serviceSpecificExitCode; Estimated time required for a pending start, stop, pause, or continue operation, in milliseconds. Before the specified amount of time has elapsed, the service should make its next call to the SetServiceStatus function with either an incremented dwCheckPoint value or a change in dwCurrentState. If the amount of time specified by dwWaitHint passes, and dwCheckPoint has not been incremented or dwCurrentState has not changed, the service control manager or service control program can assume that an error has occurred and the service should be stopped. However, if the service shares a process with other services, the service control manager cannot terminate the service application because it would have to terminate the other services sharing the process as well.
Private Structure SERVICE_STATUS
Dim dwServiceType As Int32
Dim dwServiceSpecificExitCode As Int32 Utility class to manage SetServiceStatus()
internal class ServiceStateSignalizer
internal enum SERVICE_STATE : int
SERVICE_STOPPED = 0x00000001,
SERVICE_START_PENDING = 0x00000002,
SERVICE_STOP_PENDING = 0x00000003,
SERVICE_RUNNING = 0x00000004,
SERVICE_CONTINUE_PENDING = 0x00000005,
SERVICE_PAUSE_PENDING = 0x00000006,
SERVICE_PAUSED = 0x00000007,
internal enum SERVICE_TYPE : int
SERVICE_KERNEL_DRIVER = 0x00000001,
SERVICE_FILE_SYSTEM_DRIVER = 0x00000002,
SERVICE_WIN32_OWN_PROCESS = 0x00000010,
SERVICE_WIN32_SHARE_PROCESS = 0x00000020,
SERVICE_INTERACTIVE_PROCESS = 0x00000100
SERVICE_ACCEPT_NETBINDCHANGE = 0x00000010,
SERVICE_ACCEPT_PARAMCHANGE = 0x00000008,
SERVICE_ACCEPT_PAUSE_CONTINUE = 0x00000002,
SERVICE_ACCEPT_PRESHUTDOWN = 0x00000100,
SERVICE_ACCEPT_SHUTDOWN = 0x00000004,
SERVICE_ACCEPT_STOP = 0x00000001,
SERVICE_ACCEPT_HARDWAREPROFILECHANGE = 0x00000020,
SERVICE_ACCEPT_POWEREVENT = 0x00000040,
SERVICE_ACCEPT_SESSIONCHANGE = 0x00000080,
SERVICE_ACCEPT_TIMECHANGE = 0x00000200,
SERVICE_ACCEPT_TRIGGEREVENT = 0x00000400,
SERVICE_ACCEPT_USERMODEREBOOT = 0x00000800
internal struct ServiceStatus
public SERVICE_TYPE dwServiceType;
public SERVICE_STATE dwCurrentState;
public long dwServiceSpecificExitCode;
internal static extern bool SetServiceStatus(IntPtr handle, ref ServiceStatus serviceStatus); See EnumServicesStatus and EnumDependentServices. See ControlService for SERVICE_STATE definition. See SERVICE_TYPES definition. 52: SetServiceStatus
myServiceStatus.currentState = (int)State.SERVICE_START_PENDING;
myServiceStatus.checkPoint = 1;
myServiceStatus.waitHint = 5000;
SetServiceStatus(handle, ref myServiceStatus) After your worker thread(s) start and are your service is running, call (before OnStart ends):
myServiceStatus.currentState = (int)State.SERVICE_RUNNING;
myServiceStatus.checkPoint = 0;
myServiceStatus.waitHint = 0;
SetServiceStatus(handle, ref myServiceStatus); For more on writing services in .NET please search Google on: 'SetServiceStatus' and 'ServiceBase'
private static extern bool SetServiceStatus(IntPtr hServiceStatus, ref SERVICE_STATUS lpServiceStatus); Declare Function SetServiceStatus Lib "advapi32.dll" (
ByVal hServiceStatus As IntPtr,
ByRef lpServiceStatus As SERVICE_STATUS)
SERVICE_STOPPED = 0x00000001,
SERVICE_START_PENDING = 0x00000002,
SERVICE_STOP_PENDING = 0x00000003,
SERVICE_RUNNING = 0x00000004,
SERVICE_CONTINUE_PENDING = 0x00000005,
SERVICE_PAUSE_PENDING = 0x00000006,
SERVICE_PAUSED = 0x00000007,
public struct SERVICE_STATUS {
public long serviceType;
public long serviceSpecificExitCode; 1) The Microsoft MSDN Site is incorrect in their example for C#! They do not call the lpServiceStatus argument using the ref modifier. 53: SHQUERYRBINFO
using System.Runtime.InteropServices; 55: SP_DRVINFO_DATA
public System.Runtime.InteropServices.ComTypes.FILETIME DriverDate; 56: SP_DRVINFO_DATA
public System.Runtime.InteropServices.ComTypes.FILETIME DriverDate; 57: StartDocPrinter
using System.Runtime.InteropServices; // for CharSet
<System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)> _
[System.Runtime.InteropServices.DllImport("Kernel32.dll", SetLastError = true)]
[System.Runtime.InteropServices.DllImport("Kernel32.dll", SetLastError = true)]
[System.Runtime.InteropServices.DllImport("Kernel32.dll", SetLastError = true)] 60: TITLEBARINFO
pti.cbSize = (uint)System.Runtime.InteropServices.Marshal.SizeOf(pti); Cut off search results after 60. Please refine your search. |