Desktop Functions: Smart Device Functions:
|
Search Results for "Service" in [All]odbccp32
using System.Runtime.InteropServices; Imports System.Runtime.InteropServices winmm
using System.Runtime.InteropServices;
<Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential, CharSet:=Runtime.InteropServices.CharSet.Auto)> _
<System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst:=32)> _
[System.Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential, CharSet = System.Runtime.InteropServices.CharSet.Auto)]
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst = 32)]
waveOutGetDevCaps(i, wc, System.Runtime.InteropServices.Marshal.SizeOf(wc))
using System.Runtime.InteropServices; 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, mpr[DllImport("mpr.dll", CharSet = System.Runtime.InteropServices.CharSet.Ansi)]
using System.Runtime.InteropServices;
using System.Runtime.InteropServices; 11: WNetEnumResource
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPTStr)] public string lpLocalName;
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPTStr)] public string lpRemoteName;
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPTStr)] public string lpComment;
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPTStr)] public string lpProvider;
Imports System.Runtime.InteropServices
<MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPTStr)> Public lpLocalName As String
<MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPTStr)> Public lpRemoteName As String
<MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPTStr)> Public lpComment As String
<MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPTStr)> Public lpProvider As String oleaut3212: 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. 13: RegisterTypeLib
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. 14: SysFreeString 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. winhttp
/// <returns>If the function succeeds, the function returns <c>true</c>. If the function fails, it returns <c>false</c>. For extended error data, call <see cref="System.Runtime.InteropServices.Marshal.GetLastWin32Error"/>.</returns> ERROR_WINHTTP_AUTO_PROXY_SERVICE_ERROR - Returned by WinHttpGetProxyForUrl when a proxy for the specified URL cannot be located. shlwapi17: ColorHLSToRGB
using System.Runtime.InteropServices; 18: ColorRGBToHLS
using System.Runtime.InteropServices; 19: IPreviewHandler [System.Runtime.InteropServices.ComImport] 20: 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. 21: PathCompactPath
using System.Runtime.InteropServices;
using System.Runtime.InteropServices; static extern void SHCreateStreamOnFileEx(string fileName, uint grfmode, uint dwAttributes, bool fCreate, System.Runtime.InteropServices.ComTypes.IStream streamNull, ref System.Runtime.InteropServices.ComTypes.IStream stream); static extern void SHCreateStreamOnFileEx(string fileName, uint grfmode, uint dwAttributes, bool fCreate, System.Runtime.InteropServices.ComTypes.IStream streamNull, ref System.Runtime.InteropServices.ComTypes.IStream stream);
<System.Runtime.InteropServices.DllImport("shlwapi", CharSet:=System.Runtime.InteropServices.CharSet.Auto)> _ shell32
using System.Runtime.InteropServices; 27: ExtractIcon
using System.Runtime.InteropServices;
Imports System.Runtime.InteropServices 28: ExtractIconEx
using System.Runtime.InteropServices;
Imports System.Runtime.InteropServices 29: FindExecutable
Imports System.Runtime.InteropServices using System.Runtime.InteropServices; 30: SHAppBarMessage
Imports System.Runtime.InteropServices
<DllImport("User32.dll", ExactSpelling:=True, CharSet:=System.Runtime.InteropServices.CharSet.Auto)> _ 31: SHBindToParent using System.Runtime.InteropServices; using System.Runtime.InteropServices; 32: ShellAbout using System.Runtime.InteropServices; 33: ShellExecuteEx
using System.Runtime.InteropServices;
Imports System.Runtime.InteropServices
info.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(info)
Dim ex As New System.ComponentModel.Win32Exception(System.Runtime.InteropServices.Marshal.GetLastWin32Error())
info.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(info);
Dim ex As New System.ComponentModel.Win32Exception(System.Runtime.InteropServices.Marshal.GetLastWin32Error()) 34: SHFileOperation
using System.Runtime.InteropServices; 35: SHGetFileInfo
using System.Runtime.InteropServices;
string s = System.Runtime.InteropServices.Marshal.PtrToStringUni( pPath );
System.Runtime.InteropServices.Marshal.FreeCoTaskMem( pPath ); <System.Runtime.InteropServices.DllImportAttribute("shell32.dll", EntryPoint:="SHGetNameFromIDList")> _
<System.Runtime.InteropServices.InAttribute()> _ Imports System.Runtime.InteropServices
<System.Runtime.InteropServices.DllImportAttribute("shell32.dll", EntryPoint:="ILFree")> _
Private Shared Sub ILFree(<System.Runtime.InteropServices.InAttribute()> ByVal pidl As System.IntPtr)
<System.Runtime.InteropServices.DllImportAttribute("shell32.dll", EntryPoint:="SHGetNameFromIDList")> _
<System.Runtime.InteropServices.InAttribute()> _
<System.Runtime.InteropServices.DllImportAttribute("shell32.dll", EntryPoint:="SHParseDisplayName")> _ <System.Runtime.InteropServices.InAttribute(), _ System.Runtime.InteropServices.MarshalAsAttribute( _
System.Runtime.InteropServices.UnmanagedType.LPWStr)> _ ByVal pszName As String, <System.Runtime.InteropServices.InAttribute()> _
Imports System.Runtime.InteropServices msdelta39: CreateDeltaW
ref System.Runtime.InteropServices.ComTypes.FILETIME lpTargetFileTime, rapi40: CE_FIND_DATA FILETIME is now obsolet. You can use System.Runtime.InteropServices.ComTypes.FILETIME type instead. user3241: AnimateWindow
Imports System.Runtime.InteropServices 43: ClipCursor
[System.Runtime.InteropServices.DllImport("user32.dll")] 44: CreateDesktop If you come across this error "System.Runtime.InteropServices.MarshalDirectiveException: Cannot marshal 'parameter #6': Invalid managed/unmanaged type combination (this value type must be paired with Struct).", you may want to use 45: CreatePopupMenu
[System.Runtime.InteropServices.ComRegisterFunctionAttribute()]
[System.Runtime.InteropServices.ComUnregisterFunctionAttribute()] 46: CreateWindowEx
using System.Runtime.InteropServices; 47: DdeConnect
static extern IntPtr DdeConnect(uint idInst, IntPtr hszService, IntPtr handle = DdeConnect(instanceId, serviceHandle, topicHandle, IntPtr.Zero); IntPtr serviceHandle = DdeCreateStringHandle(instanceId, "MT4", CP_WINANSI); 49: DdeNameService
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential)]
[System.Runtime.InteropServices.DllImport("user32.dll")]
[System.Runtime.InteropServices.In] ref RECT lprcFrom,
[System.Runtime.InteropServices.In] ref RECT lprcTo);
[System.Runtime.InteropServices.DllImport("user32.dll", SetLastError = true)]
[System.Runtime.InteropServices.DllImport("user32.dll", SetLastError = true)]
[System.Runtime.InteropServices.DllImport("user32.dll")]
[StructLayout(System::Runtime::InteropServices::LayoutKind::Sequential)] 52: DrawMenuBar
[System.Runtime.InteropServices.DllImport("user32.dll")]
[System.Runtime.InteropServices.DllImport("user32.dll")]
[System.Runtime.InteropServices.DllImport("user32.dll")]
[System.Runtime.InteropServices.DllImport("user32.dll")] 53: EnableMenuItem
<DllImport("user32.dll", CallingConvention:=Runtime.InteropServices.CallingConvention.Cdecl)> _
<DllImport("user32.dll", CallingConvention:=Runtime.InteropServices.CallingConvention.Cdecl)> _ 54: EnumChildWindows
Imports System.Runtime.InteropServices
using System.Runtime.InteropServices; 56: EnumDesktops
<Runtime.InteropServices.DllImport("user32.dll")>
using System.Runtime.InteropServices; using System.Runtime.InteropServices; Imports System.Runtime.InteropServices 59: ExitWindowsEx If uFlags is set to 'LogOff', then the call will fail if the process calling it is a non-interactive-process (i.e a Windows Service). Read the [ExitWindowsEx] on MSDN for more info. All other values for uFlags work fine for non-interactive-processes. 60: FlashWindow
.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(fwi) Cut off search results after 60. Please refine your search. |