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 "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

.
Documentation
[BluetoothEnumerateInstalledServices] on MSDN
.

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

.
Documentation
[BluetoothSetServiceState] on MSDN

oleaut32

.

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.

winfax

.

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.

userenv

.

When 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

.
Summary
The HttpDeleteServiceConfiguration function deletes specified information, such as IP addresses or SSL Certificates, from the HTTP API configuration store, one record at a time.
.

static extern uint HttpDeleteServiceConfiguration(

.

     IntPtr ServiceIntPtr,

.

     HTTP_SERVICE_CONFIG_ID ConfigId,

.

Declare Function HttpDeleteServiceConfiguration Lib "httpapi.dll" (TODO) As TODO

.

HTTP_SERVICE_CONFIG_ID

.

HTTP_SERVICE_CONFIG_IP_LISTEN_PARAM

.

HTTP_SERVICE_CONFIG_SSL_KEY

.

HTTP_SERVICE_CONFIG_URLACL_SET

.
HttpServiceConfigIPListenList HTTP_SERVICE_CONFIG_IP_LISTEN_PARAM structure.
.
HttpServiceConfigSSLCertInfo HTTP_SERVICE_CONFIG_SSL_KEY structure.
.
HttpServiceConfigUrlAclInfo HTTP_SERVICE_CONFIG_URLACL_SET structure.
.

     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,

.
Documentation
[HttpDeleteServiceConfiguration] on MSDN
.
Summary
The HttpQueryServiceConfiguration function retrieves one or more HTTP API configuration records.
.

static extern uint HttpQueryServiceConfiguration(

.

     IntPtr ServiceIntPtr,

.

     HTTP_SERVICE_CONFIG_ID ConfigId,

.

Declare Function HttpQueryServiceConfiguration Lib "httpapi.dll" (TODO) As TODO

.

HTTP_SERVICE_CONFIG_ID

.

HTTP_SERVICE_CONFIG_SSL_QUERY

.

HTTP_SERVICE_CONFIG_URLACL_QUERY

.

HTTP_SERVICE_CONFIG_IP_LISTEN_QUERY

.

HTTP_SERVICE_CONFIG_SSL_SET

.

HTTP_SERVICE_CONFIG_URLACL_SET

.
HttpServiceConfigIPListenList No input data; set to NULL.
.
HttpServiceConfigSSLCertInfo HTTP_SERVICE_CONFIG_SSL_QUERY structure.
.
HttpServiceConfigUrlAclInfo HTTP_SERVICE_CONFIG_URLACL_QUERY structure.
.
HttpServiceConfigIPListenList HTTP_SERVICE_CONFIG_IP_LISTEN_QUERY structure.
.
HttpServiceConfigSSLCertInfo HTTP_SERVICE_CONFIG_SSL_SET structure.
.
HttpServiceConfigUrlAclInfo HTTP_SERVICE_CONFIG_URLACL_SET structure.
.

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));

.
Documentation
[HttpQueryServiceConfiguration] on MSDN
.
Summary
The HttpSetServiceConfiguration function creates and sets a configuration record for the HTTP API configuration store. The call fails if the specified record already exists. To change a given configuration record, delete it and then recreate it with a different value.
.

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_ID

.

HTTP_SERVICE_CONFIG_IP_LISTEN_PARAM

.

HTTP_SERVICE_CONFIG_SSL_SET

.

HTTP_SERVICE_CONFIG_URLACL_SET

.
HttpServiceConfigIPListenList HTTP_SERVICE_CONFIG_IP_LISTEN_PARAM structure.
.
HttpServiceConfigSSLCertInfo HTTP_SERVICE_CONFIG_SSL_SET structure.
.
HttpServiceConfigUrlAclInfo HTTP_SERVICE_CONFIG_URLACL_SET structure.
.

     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,

.
Documentation
[HttpSetServiceConfiguration] on MSDN

powrprof

.

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.

.

    using System.Runtime.InteropServices;

odbccp32

.

using System.Runtime.InteropServices;

.

Imports System.Runtime.InteropServices

coredll

.

using System.Runtime.InteropServices;

.

using System.Runtime.InteropServices;

.

    Imports System.Runtime.InteropServices

.

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.

.

using System.Runtime.InteropServices;

.

    using System.Runtime.InteropServices;

.

<System.Runtime.InteropServices.DllImport("kernel32.dll", _

.

    using System.Runtime.InteropServices;

.

    Imports System.Runtime.InteropServices

. .

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.

. .

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.

. .

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.

. .

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.

. .

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.

. . .

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.

.

using System.Runtime.InteropServices;

.

    [System.Runtime.InteropServices.DllImport("coredll.dll")]

.

    [System.Runtime.InteropServices.DllImport("coredll.dll")]

.

using System.Runtime.InteropServices;

.

Imports System.Runtime.InteropServices

.

using System.Runtime.InteropServices;

.

Imports System.Runtime.InteropServices

.

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.

.

using System.Runtime.InteropServices;

.

        using System.Runtime.InteropServices;

Interfaces

37: +
.

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;

.

using System.Runtime.InteropServices;

.

Imports System.Runtime.InteropServices

.

Also available in System.Runtime.InteropServices.ComTypes

.

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

.

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;

.

    '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;

.
Summary
Part of the Task Scheduler 1.0 Interfaces, which consists of IEnumWorkItems, ITask, ITaskScheduler, ITaskTrigger and IScheduledWorkItem. There is some helper code below for actually using the iterator as the marshalling seemed impossible without resorting to the unmanaged helper functions in System.Runtime.InteropServices.Marshal. Not all methods have been tested, so be careful!
.

    using System.Runtime.InteropServices;

.

    [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

.

    void Stat(out System.Runtime.InteropServices.STATSTG pstatstg, int grfStatFlag);

.

    void Stat(out System.Runtime.InteropServices.STATSTG pstatstg, int grfStatFlag);

.

<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.

.

using System.Runtime.InteropServices;

.

Requires reference to System.Runtime.InteropServices.

.

using System.Runtime.InteropServices;

.

      Sub GetWindow(<System.Runtime.InteropServices.Out()> ByRef phwnd As IntPtr)

.
Note
.Net2 now includes this definition in System.Runtime.InteropServices.Comtypes namespace, but doesn't include return values for the methods
.
Summary
The IServiceProvider interface is a generic access mechanism to locate a globally unique identifier (GUID) identified service
.

    interface IServiceProvider {

.

    void QueryService(ref Guid guidService, ref Guid riid,

.

Interface IServiceProvider

.

    Sub QueryService(ByRef guidService As Guid, ByRef riid As Guid,

.

The IServiceProvider defined here is different with "System.IServiceProvider". To remove name collisition, rename "IServiceProvider" to other name such as "UCOMIServiceProvider". Otherwise, you should use fully qualified namespace to the interface since you will normally use "using System" directive.

.

The QueryService above does not work for me: ppvObject is always marshalled as IUnknown, as documented in the .Net API docs. I use the following:

.

    interface IServiceProvider {

.

    void QueryService(ref Guid guidService, ref Guid riid,

.
Documentation
[IServiceProvider] on MSDN

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


 
Access PInvoke.net directly from VS: