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 "GUIDs" in [All]

setupapi

.
Summary
The SetupDiBuildClassInfoList function returns a list of setup class GUIDs that identify the classes that are installed on a local machine.
.

A GUID array that receives a list of setup class GUIDs. This pointer is optional and can be NULL.

.

The number of GUIDs in the array that is pointed to by the ClassGuildList parameter. If ClassGuidList is NULL, ClassGuidSize must be zero.

.

A pointer to a DWORD-typed variable that receives the number of GUIDs that are returned (if the number is less than or equal to the size, in GUIDs, of the array that is pointed to by the ClassGuidList parameter). If this number is greater than the size of the ClassGuidList array, it indicates how large the ClassGuidList array must be to contain all of the class GUIDs.

.

static extern bool SetupDiClassGuidsFromName(string ClassName, ref Guid ClassGuidArray1stItem, UInt32 ClassGuidArraySize, out UInt32 RequiredSize);

.

    Private Shared Function SetupDiClassGuidsFromName( _

.

    ByRef ClassGuids As Guid, _

.

    ByVal ClassGuidSize As Integer, _

.

    // read Guids

.

    bool Status = SetupDiClassGuidsFromName("class name here", ref GuidArray[0], 1, out RequiredSize);

.

        SetupDiClassGuidsFromName("class name here", ref GuidArray[0], RequiredSize, out RequiredSize);

.

    Dim GuidSize As Integer = 0

.

    intRtrn = SetupDiClassGuidsFromName(ClassName, ClassGuid, GuidSize, GuidReqtSize)

.

    GuidSize = GuidReqtSize

.

    intRtrn = SetupDiClassGuidsFromName(ClassName, ClassGuid, GuidSize, GuidReqtSize)

advapi32

.

    var guids = new Guid[categoryCount];

.

        guids[i] = (Guid)Marshal.PtrToStructure((IntPtr)elemOffs, typeof(Guid));

.
Summary
The RegisterTraceGuids function registers an event trace provider and the event trace classes that it uses to generate events. This function also specifies the function the provider uses to enable and disable tracing.
.

[DllImport("advapi32", EntryPoint = "RegisterTraceGuidsW", CharSet = CharSet.Unicode, ExactSpelling = true)]

.

static extern unsafe uint RegisterTraceGuids([In] EtwProc cbFunc, [In] void* context, [In] ref Guid controlGuid, [In] uint guidCount, ref TraceGuidRegistration guidReg, [In] string mofImagePath, [In] string mofResourceName, out ulong regHandle);

.
Documentation
RegisterTraceGuids @msdn on MSDN
.
Summary
The RegisterTraceGuids function registers an event trace provider and the event trace classes that it uses to generate events. This function also specifies the function the provider uses to enable and disable tracing.
.

[DllImport("advapi32", EntryPoint = "RegisterTraceGuidsW", CharSet = CharSet.Unicode, ExactSpelling = true)]

.

static extern unsafe uint RegisterTraceGuids([In] EtwProc cbFunc, [In] void* context, [In] ref Guid controlGuid, [In] uint guidCount, ref TraceGuidRegistration guidReg, [In] string mofImagePath, [In] string mofResourceName, out ulong regHandle);

.
Documentation
RegisterTraceGuids @msdn on MSDN
.

Make sure that you call RegisterTraceGuids first to get your traceHandle.

.
Summary
The UnregisterTraceGuids function unregisters an event trace provider and its event trace classes.
.

static extern int UnregisterTraceGuids(ulong regHandle);

.
Documentation
[UnregisterTraceGuids] on MSDN

Interfaces

.

        Dim guid As Guid = ExplorerGUIDs.IID_IWebBrowserApp

.

        Dim riid As Guid = ExplorerGUIDs.IID_IUnknown

.

MustInherit Class ExplorerGUIDs

.

        Dim guid As Guid = ExplorerGUIDs.IID_IWebBrowserApp

.

        Dim riid As Guid = ExplorerGUIDs.IID_IUnknown

.

MustInherit Class ExplorerGUIDs

.

    void QueryService(ref Guid guidService, ref Guid riid,

.

    void QueryService(ref Guid guidService, ref Guid riid,

.

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

.

    void QueryService(ref Guid guidService, ref Guid riid,

.

        [In] ref Guid guidService,

Constants

13: GUIDs
.

    public class GUIDs {

.

Public Class GUIDs

.
Summary
Defines GUIDs for device classes used in Plug & Play.
.

///  Defines GUIDs for device classes used in Plug & Play.

Structures

15: GUID
.

Instead of this, you could choose to define such a parameter as an array of System.Guids and only ever use the first element.

.

Instead of this, you could choose to define such a parameter as an array of System.Guids and only ever use the first element.

17: _GUID
.

    internal struct GuidStruct

.

        internal GuidStruct Initialize()

.

        internal GuidStruct Initialize(string guid)

.

        ConvertirToGuidStruct(guid);

.

        internal void ConvertToGuidStruct(string guid)

powrprof

.

List<Guid> GUIDs = new List<Guid>();

.

     GUIDs.Add(NewGuid);

irprops

.

private static extern uint BluetoothEnumerateInstalledServices(IntPtr hRadio, ref Bluetooth_Device_Info pbtdi, ref uint pcServices,  Guid[] pGuidServices);

.

private static extern uint BluetoothSetServiceState(IntPtr hRadio, ref BLUETOOTH_DEVICE_INFO pbtdi, ref   Guid pGuidService, DwServiceFlags dwServiceFlags);

Enums

.

    TooManyGuidsRequested = 0xc0000082,

.

    GuidsExhausted = 0xc0000083,

ole32

.

If you like the old-style GUIDs that are generated in sequential order and contain the machine's MAC address, try UuidCreateSequential.

.

            if (CheckGUIDS(pPersistStream, strGUID))

.

     public bool CheckGUIDS(IPersistStreamInit pPersistStream, string strCtrlGUID)

.

Guids generated with this will return the name using the FmtIdToPropStgName Function, and can be used to generate a new IPropertyStorage interface with IPropertySetStorage.Create(). The name returned will be filled to 26 chars with the letter 'a' due to the fixed size of a Guid and the fact that we're passing all zeros in the BitArray after the name finishes to reach this size.

ntdsapi

.
Summary
.

        result = DsMapSchemaGuids(phDS, (uint)myGuids.Length, myGuids, out guidMap);

.

    internal static extern uint DsMapSchemaGuids(

.

        uint cGuids,

.

        Guid[] rGuids,

.

    Friend Shared Function DsMapSchemaGuids(hDs As IntPtr, cGuids As UInteger, rGuids As Guid(), ByRef ppGuidMap As IntPtr) As UInteger

.

        Guid[] myGuids = {

.

        result = DsMapSchemaGuids(phDS, (uint)myGuids.Length, myGuids, out guidMap);

.

        DS_SCHEMA_GUID_MAP[] guidMapResult = parseGuids(guidMap, myGuids.Length, true);

.

            Console.WriteLine("{0} = {1}", myGuids[i], guidMapResult[i].pName);

.

    internal static extern uint DsMapSchemaGuids(

.

        uint cGuids,

.

        Guid[] rGuids,

.

    private static DS_SCHEMA_GUID_MAP[] parseGuids(IntPtr guidMap, int numGuids, bool freePointer)

.

        DS_SCHEMA_GUID_MAP[] schemaMap = new DS_SCHEMA_GUID_MAP[numGuids];

.

        for (int i = 0; i < numGuids; i++)

.
Documentation
[DsMapSchemaGuids] on MSDN

rpcrt4

.

Microsoft changed the UuidCreate function so it no longer uses the machine's MAC address as part of the UUID. Since CoCreateGuid calls UuidCreate to get its GUID, its output also changed. If you still like the GUIDs to be generated in sequential order (helpful for keeping a related group of GUIDs together in the system registry), you can use the UuidCreateSequential function.

.

CoCreateGuid generates random-looking GUIDs like these:

.

UuidCreateSequential generates sequential GUIDs like these:

.
  • Several GUIDs generated in a row are sequential
.

Microsoft changed the UuidCreate function so it no longer uses the machine's MAC address as part of the UUID. Since CoCreateGuid calls UuidCreate to get its GUID, its output also changed. If you still like the GUIDs to be generated in sequential order (helpful for keeping a related group of GUIDs together in the system registry), you can use the UuidCreateSequential function.

.

CoCreateGuid generates random-looking GUIDs like these:

.

UuidCreateSequential generates sequential GUIDs like these:

.
  • Several GUIDs generated in a row are sequential

 
Access PInvoke.net directly from VS: