Desktop Functions: Smart Device Functions:
|
Search Results for "GUID" in [All]ole321: BindMoniker
[In] ref Guid iidResult, [MarshalAs(UnmanagedType.Interface)] out Object
<[In]> ByRef iidResult As Guid, <MarshalAs(UnmanagedType.Interface), Out> ByRef _
static extern Guid CLSIDFromProgIDEx(string lpszProgID);
Friend Shared Function CLSIDFromProgIDEx(ByVal lpszProgID As String) As Guid
static extern Guid CLSIDFromProgIDEx(string lpszProgID);
Friend Shared Function CLSIDFromProgIDEx(ByVal lpszProgID As String) As Guid
static extern Guid CLSIDFromString(string lpsz);
static extern int CLSIDFromString(string lpsz, out Guid guid); One of the constructors of [Guid] accepts a string. 5: CoCreateGuid
static extern Guid CoCreateGuid(); If you like the old-style GUIDs that are generated in sequential order and contain the machine's MAC address, try UuidCreateSequential.
System.Guid.NewGuid()
[In, MarshalAs(UnmanagedType.LPStruct)] Guid rclsid,
Guid CLSID_ShellDesktop = new Guid("00021400-0000-0000-C000-000000000046");
Guid CLSID_ShellDesktop = new Guid("00021400-0000-0000-C000-000000000046");
[In, MarshalAs(UnmanagedType.LPStruct)] Guid rclsid,
Guid CLSID_ShellDesktop = new Guid("00021400-0000-0000-C000-000000000046");
Type shellDesktopType = Type.GetTypeFromCLSID(CLSID_ShellDesktop, true); // (Guid, serverName, throwOnError)
static extern object CoGetCallContext([In, MarshalAs(UnmanagedType.LPStruct)] Guid riid);
[In, MarshalAs(UnmanagedType.LPStruct)] Guid riid);
[GuidAttribute("00000029-0000-0000-C000-000000000046")] 10: CoGetClassObject
[In, MarshalAs(UnmanagedType.LPStruct)] Guid rclsid,
[In, MarshalAs(UnmanagedType.LPStruct)] Guid riid);
(<[In](), MarshalAs(UnmanagedType.LPStruct)> ByVal rclsid As Guid, _
<[In](), MarshalAs(UnmanagedType.LPStruct)> ByVal riid As Guid) _
static extern int CoGetInstanceFromFile(IntPtr pServerInfo, [In] ref Guid
Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object ppv); 13: CoGetObject
[In, MarshalAs(UnmanagedType.LPStruct)] Guid riid);
static extern int CoMarshalInterface(UCOMIStream pStm, [In] ref Guid riid,
static extern int CoMarshalInterThreadInterfaceInStream([In] ref Guid riid,
[MarshalAs(UnmanagedType.LPStruct)] Guid rclsid,
static extern int CoUnmarshalInterface(UCOMIStream pStm, [In] ref Guid riid,
static extern int CoUnmarshalInterface(System.Runtime.InteropServices.ComTypes.IStream pStm, [In] ref Guid riid,
static extern int CreateClassMoniker([In] ref Guid rclsid,
static extern IMoniker CreateClassMoniker([In, MarshalAs(UnmanagedType.LPStruct)]Guid guid); The ref modifier or the [MarshalAs(LPStruct)] attribute are required on the guid parameter; otherwise it is marshaled incorrectly and the call will fail with an access violation.
public bool PersistLoadComObject(object objComCtrl, string strGUID, byte[] buffer)
Guid IID_IPersistStreamInit = new Guid("7FD52380-4E07-101B-AE2D-08002B2EC713");
if (CheckGUIDS(pPersistStream, strGUID))
public bool CheckGUIDS(IPersistStreamInit pPersistStream, string strCtrlGUID)
Guid ptrClsId = new Guid();
string strStreamGUID = ptrClsId.ToString().ToUpper();
if (strStreamGUID != strCtrlGUID.ToUpper())
_strErrorMsg = strStreamGUID + " " + strCtrlGUID + " mismatch";
static extern int FmtIdToPropStgName([In] ref Guid pfmtid,
<[In]()> ByRef FMTID As Guid, _ 21: IIDFromString
out Guid lpiid);
static extern Guid IIDFromString(string lpsz);
static extern int IIDFromString(string lpsz, out Guid lpiid);
Guid g;
static extern Guid IIDFromString(string lpsz);
Guid g = IIDFromString(iid); [System.Guid] - overloaded constructor that takes a string. 22: IsEqualGUID 23: OleCreate
int cPages, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 6)] Guid[] lpPageClsID,
Guid[] guidarray = cauuid.ToGuidArray();
int nelements = guidarray.Length;
o, nelements, guidarray, 0, 0, 0);
[MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 6)] Guid[] lpPageClsID,
UInt32 cPages, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 6)] Guid[] lpPageClsID, 25: OleLoad
[In] ref Guid riid,
Guid IID_IUnknown = new Guid("00000000-0000-0000-C000-000000000046");
[In] ref Guid riid,
Guid IID_IUnknown = new Guid("00000000-0000-0000-C000-000000000046");
static extern int OleRegGetUserType([In] ref Guid clsid, uint dwFormOfType,
static extern int OleRegGetUserType([In] ref Guid clsid, uint dwFormOfType, out IntPtr pszBuff);
Guid clsid = new Guid(0x3e6b91f5, 0xbc86, 0x40b8, 0x80, 0xc9, 0x41, 0xb3, 0x4b, 0x4e, 0x8f, 0x11); 28: ProgIDFromCLSID
static extern int ProgIDFromCLSID([In] ref Guid clsid,
static extern string ProgIDFromCLSID([In()]ref Guid clsid);
static extern int ProgIDFromCLSID([In()]ref Guid clsid, [MarshalAs(UnmanagedType.LPWStr)]out string lplpszProgID);
Guid g = new Guid("88D969C0-F192-11D4-A65F-0040963251E5"); // MSXML 4.0 DOM.
static extern string ProgIDFromCLSID([In()]ref Guid clsid);
Guid g = new Guid("88D969C0-F192-11D4-A65F-0040963251E5"); // MSXML 4.0 DOM.
<Out()> ByRef FMTID As Guid) As Integer
'A new Guid requires an array of exactly 16 bytes
Dim fmtId As New Guid(idBytes) 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. 30: ReadClassStg
static extern Guid ReadClassStg(IStorage pStg); 31: ReadClassStm
static extern Guid ReadClassStm(UCOMIStream pStm); 32: STGC
pStgOptions, IntPtr reserved2, [In] ref Guid riid,
pStgOptions, IntPtr reserved2, [In] ref Guid riid, 34: StgOpenStorage
pStgOptions, IntPtr reserved2, [In] ref Guid riid, 35: StringFromCLSID
static extern string StringFromCLSID([MarshalAs(UnmanagedType.LPStruct)] Guid rclsid); Guid.ToString("B") 36: StringFromGUID2
static extern int StringFromGUID2(
[MarshalAs(UnmanagedType.LPStruct)] Guid rguid, Guid.ToString("B") 37: StringFromIID
static extern string StringFromIID([MarshalAs(kklkjlkjm.LPStruct)] Guid refiid); Guid.ToString("B") 38: WriteClassStg
[In, MarshalAs(UnmanagedType.LPStruct)] Guid rclsid); 39: WriteClassStm
[In, MarshalAs(UnmanagedType.LPStruct)] Guid rclsid); user3240: CreatePopupMenu
[Guid("6B3A1F0C-C382-40d6-AA13-33B0AB46EEAA")]
protected const string guid = "{6B3A1F0C-C382-40d6-AA13-33B0AB46EEAA}";
rk.SetValue(guid.ToString(), "BatchResults shell extension");
// Set "Folder\\shellex\\ContextMenuHandlers\\BatchResults" regkey to my guid
rk.SetValue("", guid.ToString());
rk.DeleteValue(guid); 41: GetWindowTex
/// at least as large as the actual length of the text; you can thus always use it to guide buffer allocation. This 42: LoadString ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpguide/html/cpcondefaultmarshalingforstrings.htm
ref Guid PowerSettingGuid,
static Guid GUID_BATTERY_PERCENTAGE_REMAINING = new Guid("A7AD8041-B45A-4CAE-87A3-EECBB468A9E1");
static Guid GUID_MONITOR_POWER_ON = new Guid(0x02731015, 0x4510, 0x4526, 0x99, 0xE6, 0xE5, 0xA1, 0x7E, 0xBD, 0x1A, 0xEA);
static Guid GUID_ACDC_POWER_SOURCE = new Guid(0x5D3E9A59, 0xE9D5, 0x4B00, 0xA6, 0xBD, 0xFF, 0x34, 0xFF, 0x51, 0x65, 0x48);
static Guid GUID_POWERSCHEME_PERSONALITY = new Guid(0x245D8541, 0x3943, 0x4422, 0xB0, 0x25, 0x13, 0xA7, 0x84, 0xF6, 0x79, 0xB7);
static Guid GUID_MAX_POWER_SAVINGS = new Guid(0xA1841308, 0x3541, 0x4FAB, 0xBC, 0x81, 0xF7, 0x15, 0x56, 0xF2, 0x0B, 0x4A);
static Guid GUID_MIN_POWER_SAVINGS = new Guid(0x8C5E7FDA, 0xE8BF, 0x4A96, 0x9A, 0x85, 0xA6, 0xE2, 0x3A, 0x8C, 0x63, 0x5C);
static Guid GUID_TYPICAL_POWER_SAVINGS = new Guid(0x381B4222, 0xF694, 0x41F0, 0x96, 0x85, 0xFF, 0x5B, 0xB2, 0x60, 0xDF, 0x2E);
public Guid PowerSetting;
public Guid PowerSetting;
ref GUID_ACDC_POWER_SOURCE,
ref GUID_BATTERY_PERCENTAGE_REMAINING,
ref GUID_MONITOR_POWER_ON,
ref GUID_POWERSCHEME_PERSONALITY,
if (ps.PowerSetting == GUID_POWERSCHEME_PERSONALITY &&
ps.DataLength == Marshal.SizeOf(typeof(Guid)))
Guid newPersonality =
(Guid)Marshal.PtrToStructure(pData, typeof(Guid));
if (newPersonality == GUID_MAX_POWER_SAVINGS)
else if (newPersonality == GUID_MIN_POWER_SAVINGS)
else if (newPersonality == GUID_TYPICAL_POWER_SAVINGS)
else if (ps.PowerSetting == GUID_ACDC_POWER_SOURCE && kernel32The unmanaged prototype contains a return directive because the CreateSymbolicLink API function returns BOOLEAN, a one-byte data type. The default marshaling for bool is four bytes (to allow seamless integration with BOOL return values). If you were to use the default marshaling for BOOLEAN values, it's likely that you will get erroneous results. The return directive forces PInvoke to marshal just one byte of the return value. Source: http://www.informit.com/guides/content.aspx?g=dotnet&seqNum=762&ns=16196
' if no Volume GUID passed to sub, use the one corresponding to my USB stick
' if no Volume GUID passed to sub, use the one corresponding to my USB stick Arguably one of the most frequently used and most important PInvokes used, this is the only way in .NET to get a high performance counter for measurement, unique seeding of Random Variables (although you could perhaps transfer a GUID to a numeric equivalent), and in general what this global consultant would consider a 'must include' in almost any application where Instrumentation is a must. httpapi
public Guid AppId;
configSslParam.AppId = Guid.NewGuid(); coredllKernelIoControl(IOCTL_HAL_GET_DEVICEID, 0, 0, buffer, GuidLength,out, bytesReturned); 50: SipSetCurrentIM
public static readonly Guid ClsidKeyboard = new Guid("42429667-ae04-11d0-a4f8-00aa00a749b9");
public static readonly Guid ClsidLargeKB = new Guid("a523dfc7-1a7e-4af6-991a-510e75847828"); 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); userenv
IntPtr pGuidExtension,
__in GUID* pGuidExtension, rpcrt454: UuidCreate
static extern int UuidCreateSequential(out Guid guid);
Declare Function UuidCreateSequential Lib "rpcrt4.dll" (ByRef id As Guid) As Integer 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:
static Guid UuidCreateSequential()
Guid g;
Dim myId As Guid
static extern int UuidCreateSequential(out Guid guid);
Declare Function UuidCreateSequential Lib "rpcrt4.dll" (ByRef id As Guid) As Integer 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:
static Guid UuidCreateSequential()
Guid g;
Dim myId As Guid 56: UuidFromStringA typedef struct _GUID { oleaut3257: GetActiveObject
static extern int GetActiveObject(ref Guid rclsid, IntPtr pvReserved,
static extern void GetActiveObject(ref Guid rclsid, IntPtr pvReserved,
ByRef rclsid As Guid, pvReserved As IntPtr, _
ref Guid libID,
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
Declare Function UnRegisterTypeLib Lib "oleaut32.dll" (LibID As tGUID, ByVal nVerMajor As Integer, ByVal nVerMinor As Integer, ByVal lCID As Long, ByVal tSysKind As eSYSKIND) As Long
Type tGUID
Private 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 ComTypes.SYSKIND) As Integer
nResult = UnRegisterTypeLib(tlbAttr.guid, tlbAttr.wMajorVerNum, tlbAttr.wMinorVerNum, tlbAttr.lcid, tlbAttr.syskind) shlwapi59: AssocCreate
ref Guid clsid,
ref Guid riid,
[Guid("c46ca590-3c3f-11d2-bee6-0000f805ca57"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
static Guid CLSID_QueryAssociations = new Guid("a07034fd-6caa-4954-ac3f-97a27216f98a");
static Guid IID_IQueryAssociations = new Guid("c46ca590-3c3f-11d2-bee6-0000f805ca57"); 60: IPreviewHandler [Guid("8895b1c6-b41f-4c1c-a562-0d564250836f")] Cut off search results after 60. Please refine your search. |