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]

winscard

.

    SCARD_E_NO_SERVICE =        0x8010001D,

.

    SCARD_E_SERVICE_STOPPED =       0x8010001E,

.
Summary
The SCardTransmit function sends a service request to the smart card and expects to receive data back from the card.
.

        request.cbPciLength = System.Runtime.InteropServices.Marshal.SizeOf(typeof(UnsafeNativeMethods.SCARD_IO_REQUEST));

winspool

.

        System.Runtime.InteropServices.ComTypes.FILETIME ftDriverDate;

.

    Imports System.Runtime.InteropServices

.

    using System.Runtime.InteropServices;

.

You will need to import System.Runtime.InteropServices

.

Works even if print spooler service is stopped (W2K)

.

You will need to import System.Runtime.InteropServices.

Interfaces

8: +
.

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
.

[System.Runtime.InteropServices.ComTypes.IStream] in the .NET Framework 2.0.

.

    using System.Runtime.InteropServices;

.

The ITfLangBarMgr interface is implemented by the TSF manager and used by text services to manage event sink notification and configure floating language bar display settings. The interface ID is IID_ITfLangBarMgr.

.

    public interface IServiceProvider

.

    int QueryService(

.

        [In] ref Guid guidService,

.

        //QI for serviceprovider

.

        IServiceProvider psp = axWebBrowser as IServiceProvider;

.

        //QueryService for ITravelLogStg

.

        int hr = psp.QueryService(ref SID_STravelLogCursor, ref IID_ITravelLogStg, out oret);

.

Required referenece to System, System.Security, System.Runtime.InteropServices, System.Reflection Namespaces

.

Required referenece to System, System.Security, System.Runtime.InteropServices, System.Reflection Namespaces

.

Populate pszTitle, pszDocString and pszHelpFile using System.Runtime.InteropServices.Marshal.StringToCoTaskMemUni(string).

.

[System.Runtime.InteropServices.STATSTG], or [System.Runtime.InteropServices.ComTypes.STATSTG] in the .NET Framework 2.0.

iphlpapi

.

using System.Runtime.InteropServices;

.

        IF_TYPE_FRAMERELAY_SERVICE = 44,  // FRNETSERV-MIB

.

        IF_TYPE_CES = 133,  // Circuit Emulation Service

.

        [System.Runtime.InteropServices.MarshalAs(UnmanagedType.LPWStr)]

.

        [System.Runtime.InteropServices.MarshalAs(UnmanagedType.LPWStr)]

.

  using System.Runtime.InteropServices;

.

    $services=Get-WmiObject -Namespace "root\cimv2" -Class "Win32_Service"

.

      $boolNoService=$true

.

      for ($j=0; $j -lt $services.Count; $j++) {

.

    if ($services[$j].ProcessId -eq $y[$i].owningPid) {

.

      Add-Member -InputObject $objOutput -MemberType NoteProperty -Name "ServiceName" -Value $services[$j].Caption

.

      $boolNoService=$false

.

      if ($boolNoService) { Add-Member -InputObject $objOutput -MemberType NoteProperty -Name "ServiceName" -Value $null }

.

    using System.Runtime.InteropServices;

.

    using System.Runtime.InteropServices;

.

    using System.Runtime.InteropServices;

.

    using System.Runtime.InteropServices;

gsapi

.

using System.Runtime.InteropServices;

kernel32

.

    public UInt16 wServicePackMajor;

.

    public UInt16 wServicePackMinor;

.

    Public wServicePackMajor As Integer

.

    Public wServicePackMinor As Integer

.

using System.Runtime.InteropServices;

.

using System.Runtime.InteropServices; // Needed for the DllImport Attribute

.

using System.Runtime.InteropServices;

.

  using System.Runtime.InteropServices;

.

This implements a Mutex using a Null DACL (with all the security problems with that). This allows the Mutex to be sharable cross-process. In my implementation I access this Mutex from both ASP.Net and a Windows service running under different ids.

.

using System.Runtime.InteropServices;

.

[return: System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.I1)]

.

using System.Runtime.InteropServices;

.

    [DllImport("kernel32", SetLastError = true, CharSet = System.Runtime.InteropServices.CharSet.Auto)]

.

    [DllImport("kernel32", SetLastError = true, CharSet = System.Runtime.InteropServices.CharSet.Auto)]

.

    [DllImport("kernel32", SetLastError = true, CharSet = System.Runtime.InteropServices.CharSet.Auto)]

.

using System.Runtime.InteropServices;

.

   Imports System.Runtime.InteropServices

.

Sample and signature code originally used System.Runtime.InteropServices.FILETIME, but this uses ints instead of uints (DWORDs) meaning that this line:

.

  using System.Runtime.InteropServices;

.

    using System.Runtime.InteropServices;

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


 
Access PInvoke.net directly from VS: