Desktop Functions: Smart Device Functions:
|
Search Results for "Service" in [All]irprops
private static extern uint BluetoothEnumerateInstalledServices(IntPtr hRadio, ref Bluetooth_Device_Info pbtdi, ref uint pcServices, Guid[] pGuidServices);
Declare Function BluetoothEnumerateInstalledServices Lib "irprops.dll" (TODO) As TODO
private static extern uint BluetoothSetServiceState(IntPtr hRadio, ref BLUETOOTH_DEVICE_INFO pbtdi, ref Guid pGuidService, DwServiceFlags dwServiceFlags);
Declare Function BluetoothSetServiceState Lib "irprops.dll" (TODO) As TODO oleaut323: LoadTypeLib
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. winfax7: lorem21 Hey Marty, I'm not your answering service, but you're outside pouting about the car, Jennifer Parker called you twice. Say that again. Calvin, why do you keep calling me Calvin? Marty, you didn't fall asleep, did you? I'm too loud. I can't believe it. I'm never gonna get a chance to play in front of anybody. userenvWhen a user logs on interactively, the system automatically loads the user's profile. If a service or an application impersonates a user, the system does not load the user's profile. Therefore, the service or application should load the user's profile with LoadUserProfile. Services and applications that call LoadUserProfile should check to see if the user has a roaming profile. If the user has a roaming profile, specify its path as the lpProfilePath member of PROFILEINFO. To retrieve the user's roaming profile path, you can call the NetUserGetInfo function, specifying information level 3 or 4. Upon successful return, the hProfile member of PROFILEINFO is a registry key handle opened to the root of the user's hive. It has been opened with full access (KEY_ALL_ACCESS). If a service that is impersonating a user needs to read or write to the user's registry file, use this handle instead of HKEY_CURRENT_USER. Do not close the hProfile handle. Instead, pass it to the UnloadUserProfile function. This function closes the handle. You should ensure that all handles to keys in the user's registry hive are closed. If you do not close all open registry handles, the user's profile fails to unload. For more information, see Registry Key Security and Access Rights and Registry Hives. httpapi
static extern uint HttpDeleteServiceConfiguration(
IntPtr ServiceIntPtr,
HTTP_SERVICE_CONFIG_ID ConfigId,
Declare Function HttpDeleteServiceConfiguration Lib "httpapi.dll" (TODO) As TODO HTTP_SERVICE_CONFIG_IP_LISTEN_PARAM HTTP_SERVICE_CONFIG_URLACL_SET
HTTP_SERVICE_CONFIG_URLACL_KEY urlAclKey = new HTTP_SERVICE_CONFIG_URLACL_KEY(networkURL);
HTTP_SERVICE_CONFIG_URLACL_PARAM urlAclParam = new HTTP_SERVICE_CONFIG_URLACL_PARAM(securityDescriptor);
HTTP_SERVICE_CONFIG_URLACL_SET urlAclSet = new HTTP_SERVICE_CONFIG_URLACL_SET();
IntPtr configInformation = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(HTTP_SERVICE_CONFIG_URLACL_SET)));
retVal = HttpApi.HttpDeleteServiceConfiguration(IntPtr.Zero,
HTTP_SERVICE_CONFIG_ID.HttpServiceConfigUrlAclInfo,
static extern uint HttpQueryServiceConfiguration(
IntPtr ServiceIntPtr,
HTTP_SERVICE_CONFIG_ID ConfigId,
Declare Function HttpQueryServiceConfiguration Lib "httpapi.dll" (TODO) As TODO HTTP_SERVICE_CONFIG_URLACL_QUERY HTTP_SERVICE_CONFIG_IP_LISTEN_QUERY HTTP_SERVICE_CONFIG_URLACL_SET
HTTP_SERVICE_CONFIG_URLACL_SET QueryServiceConfig(string networkURL)
HTTP_SERVICE_CONFIG_URLACL_KEY urlAclKey = new HTTP_SERVICE_CONFIG_URLACL_KEY(networkURL);
HTTP_SERVICE_CONFIG_URLACL_QUERY inputConfigInfoQuery = new HTTP_SERVICE_CONFIG_URLACL_QUERY();
inputConfigInfoQuery.QueryDesc = HTTP_SERVICE_CONFIG_QUERY_TYPE.HttpServiceConfigQueryExact;
int size = Marshal.SizeOf(typeof(HTTP_SERVICE_CONFIG_URLACL_QUERY));
IntPtr pInputConfigInfo = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(HTTP_SERVICE_CONFIG_URLACL_QUERY)));
HTTP_SERVICE_CONFIG_URLACL_SET outputConfigInfo = new HTTP_SERVICE_CONFIG_URLACL_SET();
retVal = HttpApi.HttpQueryServiceConfiguration(IntPtr.Zero,
HTTP_SERVICE_CONFIG_ID.HttpServiceConfigUrlAclInfo,
retVal = HttpApi.HttpQueryServiceConfiguration(IntPtr.Zero,
HTTP_SERVICE_CONFIG_ID.HttpServiceConfigUrlAclInfo,
outputConfigInfo = (HTTP_SERVICE_CONFIG_URLACL_SET)Marshal.PtrToStructure(pOutputConfigInfo, typeof(HTTP_SERVICE_CONFIG_URLACL_SET));
static extern uint HttpSetServiceConfiguration(
IntPtr ServiceIntPtr,
HTTP_SERVICE_CONFIG_ID ConfigId,
Declare Function HttpSetServiceConfiguration Lib "httpapi.dll" (ByVal mustbezero As IntPtr, ByVal configID As Integer, ByVal configInfo As HTTP_SERVICE_CONFIG_URLACL_SET, ByVal configInfoLength As Integer, ByVal mustBeZero2 As IntPtr) As Integer HTTP_SERVICE_CONFIG_IP_LISTEN_PARAM HTTP_SERVICE_CONFIG_URLACL_SET
HTTP_SERVICE_CONFIG_URLACL_KEY keyDesc = new HTTP_SERVICE_CONFIG_URLACL_KEY(networkURL);
HTTP_SERVICE_CONFIG_URLACL_PARAM paramDesc = new HTTP_SERVICE_CONFIG_URLACL_PARAM(securityDescriptor);
HTTP_SERVICE_CONFIG_URLACL_SET inputConfigInfoSet = new HTTP_SERVICE_CONFIG_URLACL_SET();
IntPtr pInputConfigInfo = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(HTTP_SERVICE_CONFIG_URLACL_SET)));
retVal = HttpApi.HttpSetServiceConfiguration(IntPtr.Zero,
HTTP_SERVICE_CONFIG_ID.HttpServiceConfigUrlAclInfo,
retVal = HttpApi.HttpDeleteServiceConfiguration(IntPtr.Zero,
HTTP_SERVICE_CONFIG_ID.HttpServiceConfigUrlAclInfo,
retVal = HttpApi.HttpSetServiceConfiguration(IntPtr.Zero,
HTTP_SERVICE_CONFIG_ID.HttpServiceConfigUrlAclInfo, Here is the working code sample for Changing the Certificate associated with an IP address using HttpServiceConfiguration
static extern uint HttpSetServiceConfiguration(
IntPtr ServiceIntPtr,
HTTP_SERVICE_CONFIG_ID ConfigId,
static extern uint HttpDeleteServiceConfiguration(
IntPtr ServiceIntPtr,
HTTP_SERVICE_CONFIG_ID ConfigId,
enum HTTP_SERVICE_CONFIG_ID
HttpServiceConfigIPListenList = 0,
HttpServiceConfigSSLCertInfo,
HttpServiceConfigUrlAclInfo,
HttpServiceConfigMax
public struct HTTP_SERVICE_CONFIG_IP_LISTEN_PARAM
struct HTTP_SERVICE_CONFIG_SSL_SET
public HTTP_SERVICE_CONFIG_SSL_KEY KeyDesc;
public HTTP_SERVICE_CONFIG_SSL_PARAM ParamDesc;
public struct HTTP_SERVICE_CONFIG_SSL_KEY
struct HTTP_SERVICE_CONFIG_SSL_PARAM
public const uint HTTP_SERVICE_CONFIG_SSL_FLAG_USE_DS_MAPPER = 0x00000001;
public const uint HTTP_SERVICE_CONFIG_SSL_FLAG_NEGOTIATE_CLIENT_CERT = 0x00000002;
public const uint HTTP_SERVICE_CONFIG_SSL_FLAG_NO_RAW_FILTER = 0x00000004;
HTTP_SERVICE_CONFIG_SSL_SET configSslSet = new HTTP_SERVICE_CONFIG_SSL_SET();
HTTP_SERVICE_CONFIG_SSL_KEY httpServiceConfigSslKey = new HTTP_SERVICE_CONFIG_SSL_KEY();
HTTP_SERVICE_CONFIG_SSL_PARAM configSslParam = new HTTP_SERVICE_CONFIG_SSL_PARAM();
httpServiceConfigSslKey.pIpPort = handleSocketAddress.AddrOfPinnedObject();
configSslParam.DefaultFlags = HTTP_SERVICE_CONFIG_SSL_FLAG_NEGOTIATE_CLIENT_CERT;
configSslSet.KeyDesc = httpServiceConfigSslKey;
IntPtr pInputConfigInfo = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(HTTP_SERVICE_CONFIG_SSL_SET)));
retVal = HttpSetServiceConfiguration(IntPtr.Zero,
HTTP_SERVICE_CONFIG_ID.HttpServiceConfigSSLCertInfo,
retVal = HttpDeleteServiceConfiguration(IntPtr.Zero,
HTTP_SERVICE_CONFIG_ID.HttpServiceConfigSSLCertInfo,
retVal = HttpSetServiceConfiguration(IntPtr.Zero,
HTTP_SERVICE_CONFIG_ID.HttpServiceConfigSSLCertInfo, powrprof12: lorem21 Hey Marty, I'm not your answering service, but you're outside pouting about the car, Jennifer Parker called you twice. Say that again. Calvin, why do you keep calling me Calvin? Marty, you didn't fall asleep, did you? I'm too loud. I can't believe it. I'm never gonna get a chance to play in front of anybody. 13: SetSuspendState
using System.Runtime.InteropServices; odbccp32
using System.Runtime.InteropServices; Imports System.Runtime.InteropServices coredll15: CloseHandle
using System.Runtime.InteropServices; 16: CreateEvent
using System.Runtime.InteropServices;
Imports System.Runtime.InteropServices 17: EventModify
using System.Runtime.InteropServices; So the device ID is a very useful thing for software that wants to target just your device, e.g. copy protection, or to provide immutable identity to web service calls. Equally so it’s a resource that should be protected to mitigate the risk of identity theft. 19: GetSystemInfo
using System.Runtime.InteropServices; 20: keybd_event
using System.Runtime.InteropServices; 21: MessageBox <System.Runtime.InteropServices.DllImport("kernel32.dll", _ 22: PlaySound
using System.Runtime.InteropServices;
Imports System.Runtime.InteropServices 23: 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. 24: 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. 25: 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. 26: 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. 27: 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. 28: 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. 29: ResetEvent
using System.Runtime.InteropServices; 30: SendMessage
[System.Runtime.InteropServices.DllImport("coredll.dll")]
[System.Runtime.InteropServices.DllImport("coredll.dll")] 31: SetEvent
using System.Runtime.InteropServices; 32: SetSystemTime
Imports System.Runtime.InteropServices
using System.Runtime.InteropServices; 33: SetWindowLong Imports System.Runtime.InteropServices 34: SignalStarted Make sure you add the System.Runtime.InteropServices namespace as a reference to your project to use the DllImport function. Then use/import them into your project at the top of your desired C#/VB code file. 35: SipSetCurrentIM
using System.Runtime.InteropServices; 36: waveOutOpen
using System.Runtime.InteropServices; Interfaces37: + var obj = System.Runtime.InteropServices.Marshal.BindToMoniker("IIS://localhost/W3SVC") as IADs; Required referenece to System, System.Security, System.Runtime.InteropServices, System.Reflection Namespaces.
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices; 40: ICustomDoc
using System.Runtime.InteropServices;
Imports System.Runtime.InteropServices 41: IDataObject Also available in System.Runtime.InteropServices.ComTypes 42: IDeskBand Imports System.Runtime.InteropServices
'to allows this explorer objects also implement IServiceProvider interface
'(don't mix it with System.IServiceProvider!)
Dim sp As _IServiceProvider = TryCast(BandObjectSite, _IServiceProvider)
sp.QueryService(guid, riid, w)
'as a Desk Band. There is no web browser service available.
Imports System.Runtime.InteropServices Imports System.Runtime.InteropServices Public Interface _IServiceProvider
Sub QueryService(ByRef guid As Guid, ByRef riid As Guid, <MarshalAs(UnmanagedType.[Interface])> ByRef Obj As [Object]) Imports System.Runtime.InteropServices 43: IDeskBand2 Imports System.Runtime.InteropServices
'to allows this explorer objects also implement IServiceProvider interface
'(don't mix it with System.IServiceProvider!)
Dim sp As _IServiceProvider = TryCast(BandObjectSite, _IServiceProvider)
sp.QueryService(guid, riid, w)
'as a Desk Band. There is no web browser service available. Imports System.Runtime.InteropServices Imports System.Runtime.InteropServices Public Interface _IServiceProvider
Sub QueryService(ByRef guid As Guid, ByRef riid As Guid, <MarshalAs(UnmanagedType.[Interface])> ByRef Obj As [Object]) Imports System.Runtime.InteropServices
using IDataObject_Com = System.Runtime.InteropServices.ComTypes.IDataObject; 45: IEnumGUID
'Code converted from C# to VB by online service at Telerik (www.telerik.com)
public System.Runtime.InteropServices.ComTypes.FILETIME mtime;
public System.Runtime.InteropServices.ComTypes.FILETIME ctime;
public System.Runtime.InteropServices.ComTypes.FILETIME atime; 47: IEnumWorkItems
48: IErrorLog
[System.Runtime.InteropServices.InterfaceType(1)]
[System.Runtime.InteropServices.Guid("3127CA40-446E-11CE-8135-00AA004BB851")]
void AddError(string pszPropName, ref System.Runtime.InteropServices.ComTypes.EXCEPINFO pExcepInfo); using System.Runtime.InteropServices;
public interface IServiceProvider
void QueryService(ref Guid guidService, ref Guid riid,
IEZoneSecurity.IServiceProvider serviceProvider = null;
object topServiceProviderObj = null;
IServiceProvider topServiceProvider = null;
// Get the client site service provider.
serviceProvider = oleClientSiteObj as IEZoneSecurity.IServiceProvider;
// Get top level browser service provider.
Guid Riid = typeof(IEZoneSecurity.IServiceProvider).GUID;
topServiceProviderObj = null;
serviceProvider.QueryService(ref IID_TopLevelBrowser, ref Riid,
out topServiceProviderObj);
topServiceProvider = topServiceProviderObj as IServiceProvider;
topServiceProvider.QueryService(ref IID_WebBrowserApp, ref Riid,
if (topServiceProvider != null)
Marshal.ReleaseComObject(topServiceProvider);
if (topServiceProviderObj != null)
Marshal.ReleaseComObject(topServiceProviderObj);
if (serviceProvider!= null)
Marshal.ReleaseComObject(serviceProvider);
using System.Runtime.InteropServices;
Imports System.Runtime.InteropServices 51: ILockBytes
void Stat(out System.Runtime.InteropServices.STATSTG pstatstg, int grfStatFlag);
void Stat(out System.Runtime.InteropServices.STATSTG pstatstg, int grfStatFlag); 52: IMalloc
<Runtime.InteropServices.ComImport()> _
<Runtime.InteropServices.InterfaceType(Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)> _
<Runtime.InteropServices.Guid("00000002-0000-0000-C000-000000000046")> _
<Runtime.InteropServices.PreserveSig()> Function Alloc(ByVal cb As UInt32) As IntPtr
<Runtime.InteropServices.PreserveSig()> Function Realloc(ByVal pv As IntPtr, ByVal cb As UInt32) As IntPtr
<Runtime.InteropServices.PreserveSig()> Sub Free(ByVal pv As IntPtr)
<Runtime.InteropServices.PreserveSig()> Function GetSize(ByVal pv As IntPtr) As UInt32
<Runtime.InteropServices.PreserveSig()> Function DidAlloc(ByVal pv As IntPtr) As Int16
<Runtime.InteropServices.PreserveSig()> Sub HeapMinimize() Also it works much faster than Managed Reflection Services. of course we can do it with standard Managed Reflection services: Also it works much faster than Managed Reflection Services. 55: IObjectSafety
using System.Runtime.InteropServices; 56: IOleClientSite Requires reference to System.Runtime.InteropServices. using System.Runtime.InteropServices; 58: IOleWindow
Sub GetWindow(<System.Runtime.InteropServices.Out()> ByRef phwnd As IntPtr) 59: IPersistFile
|