Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Remove parsing from GUID constants (#21717)
Browse files Browse the repository at this point in the history
  • Loading branch information
pentp authored and jkotas committed Dec 31, 2018
1 parent 6a98943 commit bac3ac8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ public ComEventsMethod AddMethod(int dispid)

#endregion

private static Guid IID_IManagedObject = new Guid("{C3FCC19E-A970-11D2-8B5A-00A0C9B7C9C4}");

CustomQueryInterfaceResult ICustomQueryInterface.GetInterface(ref Guid iid, out IntPtr ppv)
{
ppv = IntPtr.Zero;
Expand All @@ -132,10 +130,6 @@ CustomQueryInterfaceResult ICustomQueryInterface.GetInterface(ref Guid iid, out
ppv = Marshal.GetComInterfaceForObject(this, typeof(IDispatch), CustomQueryInterfaceMode.Ignore);
return CustomQueryInterfaceResult.Handled;
}
else if (iid == IID_IManagedObject)
{
return CustomQueryInterfaceResult.Failed;
}

return CustomQueryInterfaceResult.NotHandled;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ public enum CustomQueryInterfaceMode
public static partial class Marshal
{
#if FEATURE_COMINTEROP
internal static Guid IID_IUnknown = new Guid("00000000-0000-0000-C000-000000000046");
/// <summary>
/// IUnknown is {00000000-0000-0000-C000-000000000046}
/// </summary>
internal static Guid IID_IUnknown = new Guid(0, 0, 0, 0xC0, 0, 0, 0, 0, 0, 0, 0x46);
#endif //FEATURE_COMINTEROP

private const int LMEM_FIXED = 0;
Expand Down

0 comments on commit bac3ac8

Please sign in to comment.