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]

aygshell

.

Interfaces

2: +
.

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.

wtsapi32

.

static extern TODO TerminalServices(TODO);

.

Declare Function TerminalServices Lib "wtsapi32.dll" (TODO) As TODO

.
Documentation
[TerminalServices] on MSDN
.
Summary
The WTSDisconnectSession function disconnects the logged-on user from the specified Terminal Services session without closing the session. If the user subsequently logs on to the same terminal server, the user is reconnected to the same session.
.

        Throw New Exception(ex.Message & vbCrLf & System.Runtime.InteropServices.Marshal.GetLastWin32Error)

.
Summary
This Terminal Services API call lists all local and remote sessions for a given server, including their state (e.g. connected, disconnected) and type (local, RDP). It is the basis for the output of qwinsta.exe.
.

using System.Runtime.InteropServices;

.

namespace TerminalServices

.

using System.Runtime.InteropServices;

.

$datasize = [system.runtime.interopservices.marshal]::SizeOf([System.Type][mystruct.WTS_SESSION_INFO])

.

     $element =  [system.runtime.interopservices.marshal]::PtrToStructure($ppSessionInfo + ($datasize * $i),[System.type][mystruct.WTS_SESSION_INFO])

.

Imports System.Runtime.InteropServices

.

        Throw New Exception(ex.Message & vbCrLf & System.Runtime.InteropServices.Marshal.GetLastWin32Error)

.
Summary
The WTSFreeMemory function frees memory allocated by a Terminal Services function.
.

The WTSFreeMemory function frees memory allocated by a Terminal Services function.

.

        Throw New Exception(ex.Message & vbCrLf & System.Runtime.InteropServices.Marshal.GetLastWin32Error)

.

/// <param name="sessionId">A Terminal Services session identifier. To indicate the session in which the calling application is running

.

    using System.Runtime.InteropServices;

.

    /// <param name="sessionId">A Terminal Services session identifier. To indicate the session in which the calling application is running

.

            /// Terminal Services session currently attached to the physical console.

.

            /// <remarks>It is not necessary that Terminal Services be running for this function to succeed.</remarks>

.

            /// The WTSFreeMemory function frees memory allocated by a Terminal Services function.

.
Summary
Retrieve the primary access token for the user associated with the specified session ID. The caller must be running in the context of the LocalSystem account and have the SE_TCB_NAME privilege. Only highly trusted service should use this function. The application must not leak tokens, and close the token when it has finished using it.
.
Summary
The WTSSendMessage function displays a message box on the client desktop of a specified Terminal Services session.
.

    String msg = "Terminal Service!";

.
Summary
Windows Terminal Services Virtual Channel Read—Reads data from the server end of a virtual channel.
.
SeeAlso
.
Summary
Windows Terminal Services Virtual Channel Write—Writes data to the server end of a virtual channel.
.
SeeAlso
.

        <System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst:=20)> _

.
Summary
Contains int values that indicate the connection state of a Terminal Services session.

rpcrt4

.

pin_ptr<unsigned char> UuidSringPtr = static_cast<unsigned char *>(System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi("C3ECE8CB-E9F8-47f9-AC61-8EA8572403F2").ToPointer());

.
System

gsapi

.

using System.Runtime.InteropServices;

shell32

.

using System.Runtime.InteropServices;

.

    using System.Runtime.InteropServices;

.

Imports System.Runtime.InteropServices

.

    using System.Runtime.InteropServices;

.

Imports System.Runtime.InteropServices

.

Imports System.Runtime.InteropServices

.

using System.Runtime.InteropServices;

.

Imports System.Runtime.InteropServices

.

    <DllImport("User32.dll", ExactSpelling:=True, CharSet:=System.Runtime.InteropServices.CharSet.Auto)> _

.

using System.Runtime.InteropServices;

.

using System.Runtime.InteropServices;

.

using System.Runtime.InteropServices;

.

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

.

using System.Runtime.InteropServices;

.

    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

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


 
Access PInvoke.net directly from VS: