Added static fields for some interface GUIDs

This commit is contained in:
Yoshi Askharoun
2021-11-21 05:40:15 -06:00
parent 2c54d098f2
commit c8a7279986
15 changed files with 67 additions and 83 deletions
+6 -7
View File
@@ -1,10 +1,9 @@
using System.Runtime.CompilerServices;
using Microsoft.VisualC;
[MiscellaneousBits(64)]
[DebugInfoInPDB]
[NativeCppClass]
internal enum EBillingPaymentType
{
Unknown = -1,
None,
CreditCard,
DirectDebit,
Wholesale,
Token
}
@@ -55,7 +55,7 @@ namespace Microsoft.Zune.Configuration
//IL_0034: Expected I, but got I8
IService* ptr = null;
int num = 0;
if (Module.GetSingleton((_GUID)Module._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&ptr)) >= 0)
if (Module.GetSingleton((_GUID)Module.GUID_IService, (void**)(&ptr)) >= 0)
{
IService* intPtr = ptr;
num = ((delegate* unmanaged[Cdecl, Cdecl]<IntPtr, int>)(*(ulong*)(*(long*)intPtr + 200)))((nint)intPtr);
@@ -107,7 +107,7 @@ namespace Microsoft.Zune.Configuration
//IL_0077: Expected I, but got I8
//IL_007b: Expected I, but got I8
IService* ptr = null;
int singleton = Module.GetSingleton((_GUID)Module._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&ptr));
int singleton = Module.GetSingleton((_GUID)Module.GUID_IService, (void**)(&ptr));
RefreshCallback* ptr2 = (RefreshCallback*)Module.@new(24uL);
RefreshCallback* ptr3;
try
@@ -150,7 +150,7 @@ namespace Microsoft.Zune.Configuration
//IL_0090: Expected I, but got I8
//IL_0094: Expected I, but got I8
IService* ptr = null;
int singleton = Module.GetSingleton((_GUID)Module._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&ptr));
int singleton = Module.GetSingleton((_GUID)Module.GUID_IService, (void**)(&ptr));
DeregisterCallback* ptr2 = (DeregisterCallback*)Module.@new(24uL);
DeregisterCallback* ptr3;
try
@@ -166,9 +166,9 @@ namespace Microsoft.Zune.Configuration
singleton = (((long)(nint)ptr3 == 0) ? (-2147024882) : singleton);
if (singleton >= 0)
{
fixed (char* info.m_tunerIdPtr = info.m_tunerId.ToCharArray())
fixed (char* infoTunerIdPtr = info.m_tunerId.ToCharArray())
{
ushort* ptr4 = (ushort*)info.m_tunerIdPtr;
ushort* ptr4 = (ushort*)infoTunerIdPtr;
try
{
long num = *(long*)ptr + 560;
@@ -297,9 +297,9 @@ namespace Microsoft.Zune.Configuration
}
do
{
fixed (char* list[num].m_tunerIdPtr = list[num].m_tunerId.ToCharArray())
fixed (char* currentTunerIdPtr = list[num].m_tunerId.ToCharArray())
{
ushort* ptr = (ushort*)list[num].m_tunerIdPtr;
ushort* ptr = (ushort*)currentTunerIdPtr;
try
{
if (2 == Module.CompareStringW(1033u, 1u, pwszTunerId, -1, ptr, -1))
@@ -1579,7 +1579,7 @@ namespace Microsoft.Zune.Service
*(long*)(&cComPtrNtv_003CIService_003E) = 0L;
try
{
num = Module.GetSingleton((_GUID)Module._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&cComPtrNtv_003CIService_003E));
num = Module.GetSingleton((_GUID)Module.GUID_IService, (void**)(&cComPtrNtv_003CIService_003E));
CComPtrNtv_003CIUnknown_003E cComPtrNtv_003CIUnknown_003E;
*(long*)(&cComPtrNtv_003CIUnknown_003E) = 0L;
try
@@ -527,7 +527,7 @@ namespace Microsoft.Zune.Service
int num;
try
{
num = Module.GetSingleton((_GUID)Module._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&cComPtrNtv_003CIService_003E));
num = Module.GetSingleton((_GUID)Module.GUID_IService, (void**)(&cComPtrNtv_003CIService_003E));
CComPtrNtv_003CIHttpWebRequest_003E cComPtrNtv_003CIHttpWebRequest_003E;
*(long*)(&cComPtrNtv_003CIHttpWebRequest_003E) = 0L;
try
+5 -36
View File
@@ -34,46 +34,16 @@ namespace Microsoft.Zune.Service
//IL_0008: Expected I, but got I8
//IL_0011: Expected I, but got I8
IService* pService = null;
if (Module.GetSingleton((_GUID)Module._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&pService)) >= 0)
if (Module.GetSingleton((_GUID)Module.GUID_IService, (void**)(&pService)) >= 0)
{
m_pService = pService;
}
}
private unsafe static int PaymentTypeToBillingPaymentType(PaymentType ePaymentType, EBillingPaymentType* pePaymentType)
private unsafe static int PaymentTypeToBillingPaymentType(PaymentType ePaymentType, ref EBillingPaymentType pePaymentType)
{
if (pePaymentType == null)
{
Module._ZuneShipAssert(1001u, 501u);
return -2147467261;
}
int result = 0;
switch (ePaymentType)
{
default:
Module._ZuneShipAssert(1003u, 532u);
result = -2147024809;
break;
case PaymentType.Token:
*pePaymentType = (EBillingPaymentType)4;
break;
case PaymentType.Wholesale:
*pePaymentType = (EBillingPaymentType)3;
break;
case PaymentType.DirectDebit:
*pePaymentType = (EBillingPaymentType)2;
break;
case PaymentType.CreditCard:
*pePaymentType = (EBillingPaymentType)1;
break;
case PaymentType.None:
*pePaymentType = (EBillingPaymentType)0;
break;
case PaymentType.Unknown:
*pePaymentType = (EBillingPaymentType)(-1);
break;
}
return result;
pePaymentType = (EBillingPaymentType)(int)ePaymentType;
return 0;
}
private unsafe static int PaymentTypeToMediaPaymentType(PaymentType ePaymentType, EMediaPaymentType* pePaymentType)
@@ -574,8 +544,7 @@ namespace Microsoft.Zune.Service
IService* pService = m_pService;
if (((delegate* unmanaged[Cdecl, Cdecl]<IntPtr, ushort*, int*, int>)(*(ulong*)num2))((nint)pService, ptr, &num) >= 0)
{
bool flag = ((num != 0) ? true : false);
result = flag;
result = num != 0;
}
}
catch
@@ -308,7 +308,7 @@ namespace Microsoft.Zune.Service
*(long*)(&cComPtrNtv_003CIService_003E) = 0L;
try
{
num = Module.GetSingleton((_GUID)Module._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&cComPtrNtv_003CIService_003E));
num = Module.GetSingleton((_GUID)Module.GUID_IService, (void**)(&cComPtrNtv_003CIService_003E));
CComPtrNtv_003CIUnknown_003E cComPtrNtv_003CIUnknown_003E;
*(long*)(&cComPtrNtv_003CIUnknown_003E) = 0L;
try
@@ -217,7 +217,7 @@ namespace Microsoft.Zune.Subscription
int num = 1;
int nSeriesId = -1;
int nEpisodeId = -1;
int singleton = Module.GetSingleton((_GUID)Module._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&ptr));
int singleton = Module.GetSingleton((_GUID)Module.GUID_IService, (void**)(&ptr));
if (singleton >= 0)
{
IService* intPtr = ptr;
@@ -378,7 +378,7 @@ namespace Microsoft.Zune.Subscription
}
IService* ptr = null;
int num = 1;
int num2 = Module.GetSingleton((_GUID)Module._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&ptr));
int num2 = Module.GetSingleton((_GUID)Module.GUID_IService, (void**)(&ptr));
if (num2 >= 0)
{
IService* intPtr = ptr;
@@ -832,7 +832,7 @@ namespace Microsoft.Zune.Subscription
//IL_003b: Expected I, but got I8
int result = 1;
IService* ptr = null;
if (Module.GetSingleton((_GUID)Module._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&ptr)) >= 0)
if (Module.GetSingleton((_GUID)Module.GUID_IService, (void**)(&ptr)) >= 0)
{
IService* intPtr = ptr;
((delegate* unmanaged[Cdecl, Cdecl]<IntPtr, _GUID*, int*, int>)(*(ulong*)(*(long*)ptr + 384)))((nint)intPtr, null, &result);
+4 -4
View File
@@ -51,7 +51,7 @@ namespace Microsoft.Zune.User
int num;
try
{
num = Module.GetSingleton((_GUID)Module._GUID_c9e0f18a_6c53_47d0_991e_dbd4fe395101, (void**)(&ptr));
num = Module.GetSingleton(Module.GUID_IUserManager, (void**)(&ptr));
if (num >= 0)
{
IUserManager* intPtr = ptr;
@@ -99,7 +99,7 @@ namespace Microsoft.Zune.User
fixed (char* passportIdPtr = passportId.ToCharArray())
{
ushort* ptr2 = (ushort*)passportIdPtr;
int num2 = Module.GetSingleton((_GUID)Module._GUID_c9e0f18a_6c53_47d0_991e_dbd4fe395101, (void**)(&ptr));
int num2 = Module.GetSingleton(Module.GUID_IUserManager, (void**)(&ptr));
if (num2 >= 0)
{
long num3 = *(long*)ptr + 40;
@@ -125,7 +125,7 @@ namespace Microsoft.Zune.User
//IL_0022: Expected I, but got I8
//IL_0035: Expected I, but got I8
IUserManager* ptr = null;
int num = Module.GetSingleton((_GUID)Module._GUID_c9e0f18a_6c53_47d0_991e_dbd4fe395101, (void**)(&ptr));
int num = Module.GetSingleton(Module.GUID_IUserManager, (void**)(&ptr));
if (num >= 0)
{
IUserManager* intPtr = ptr;
@@ -145,7 +145,7 @@ namespace Microsoft.Zune.User
//IL_0022: Expected I, but got I8
//IL_0035: Expected I, but got I8
IUserManager* ptr = null;
int num = Module.GetSingleton((_GUID)Module._GUID_c9e0f18a_6c53_47d0_991e_dbd4fe395101, (void**)(&ptr));
int num = Module.GetSingleton(Module.GUID_IUserManager, (void**)(&ptr));
if (num >= 0)
{
IUserManager* intPtr = ptr;
@@ -13,7 +13,7 @@ namespace Microsoft.Zune.Util
//IL_0037: Expected I, but got I8
IFeatureEnablementManager* ptr = null;
bool result = false;
if (Module.GetSingleton((_GUID)Module._GUID_9581b41a_b5cf_4ebf_9d1a_975477e081ca, (void**)(&ptr)) >= 0)
if (Module.GetSingleton(Module.GUID_IFeatureEnablementManager, (void**)(&ptr)) >= 0)
{
IFeatureEnablementManager* intPtr = ptr;
((delegate* unmanaged[Cdecl, Cdecl]<IntPtr, EFeatures, bool*, int>)(*(ulong*)(*(long*)ptr + 24)))((nint)intPtr, (EFeatures)eFeature, &result);
@@ -32,7 +32,7 @@ namespace Microsoft.Zune.Util
//IL_0020: Expected I, but got I8
//IL_0033: Expected I, but got I8
IFeatureEnablementManager* ptr = null;
if (Module.GetSingleton((_GUID)Module._GUID_9581b41a_b5cf_4ebf_9d1a_975477e081ca, (void**)(&ptr)) >= 0)
if (Module.GetSingleton(Module.GUID_IFeatureEnablementManager, (void**)(&ptr)) >= 0)
{
IFeatureEnablementManager* intPtr = ptr;
((delegate* unmanaged[Cdecl, Cdecl]<IntPtr, EFeatures, int>)(*(ulong*)(*(long*)ptr + 32)))((nint)intPtr, (EFeatures)eFeature);
@@ -53,7 +53,7 @@ namespace Microsoft.Zune.Util
IFeatureEnablementManager* ptr = null;
string result = null;
ushort* ptr2 = null;
if (Module.GetSingleton((_GUID)Module._GUID_9581b41a_b5cf_4ebf_9d1a_975477e081ca, (void**)(&ptr)) >= 0)
if (Module.GetSingleton(Module.GUID_IFeatureEnablementManager, (void**)(&ptr)) >= 0)
{
IFeatureEnablementManager* intPtr = ptr;
if (((delegate* unmanaged[Cdecl, Cdecl]<IntPtr, ushort**, int>)(*(ulong*)(*(long*)ptr + 40)))((nint)intPtr, &ptr2) >= 0)
@@ -78,7 +78,7 @@ namespace Microsoft.Zune.Util
IFeatureEnablementManager* ptr = null;
uint num = uint.MaxValue;
uint num2 = uint.MaxValue;
if (Module.GetSingleton((_GUID)Module._GUID_9581b41a_b5cf_4ebf_9d1a_975477e081ca, (void**)(&ptr)) >= 0)
if (Module.GetSingleton(Module.GUID_IFeatureEnablementManager, (void**)(&ptr)) >= 0)
{
IFeatureEnablementManager* intPtr = ptr;
num = ((((delegate* unmanaged[Cdecl, Cdecl]<IntPtr, uint*, int>)(*(ulong*)(*(long*)ptr + 56)))((nint)intPtr, &num2) >= 0) ? num2 : num);
@@ -98,7 +98,7 @@ namespace Microsoft.Zune.Util
//IL_0033: Expected I, but got I8
IFeatureEnablementManager* ptr = null;
int result = -1;
if (Module.GetSingleton((_GUID)Module._GUID_9581b41a_b5cf_4ebf_9d1a_975477e081ca, (void**)(&ptr)) >= 0)
if (Module.GetSingleton(Module.GUID_IFeatureEnablementManager, (void**)(&ptr)) >= 0)
{
IFeatureEnablementManager* intPtr = ptr;
result = (int)((delegate* unmanaged[Cdecl, Cdecl]<IntPtr, uint>)(*(ulong*)(*(long*)intPtr + 64)))((nint)intPtr);
@@ -119,7 +119,7 @@ namespace Microsoft.Zune.Util
//IL_003d: Expected I, but got I8
IFeatureEnablementManager* ptr = null;
bool result = false;
if (Module.GetSingleton((_GUID)Module._GUID_9581b41a_b5cf_4ebf_9d1a_975477e081ca, (void**)(&ptr)) >= 0)
if (Module.GetSingleton(Module.GUID_IFeatureEnablementManager, (void**)(&ptr)) >= 0)
{
IFeatureEnablementManager* intPtr = ptr;
bool flag = ((((delegate* unmanaged[Cdecl, Cdecl]<IntPtr, int>)(*(ulong*)(*(long*)intPtr + 72)))((nint)intPtr) != 0) ? true : false);
@@ -147,7 +147,7 @@ namespace Microsoft.Zune.Util
string result;
try
{
int singleton = Module.GetSingleton((_GUID)Module._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&cComPtrNtv_003CIService_003E));
int singleton = Module.GetSingleton(Module.GUID_IService, (void**)(&cComPtrNtv_003CIService_003E));
result = null;
if (singleton >= 0)
{
@@ -212,7 +212,7 @@ namespace Microsoft.Zune.Util
string result;
try
{
if (Module.GetSingleton((_GUID)Module._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&cComPtrNtv_003CIService_003E)) >= 0)
if (Module.GetSingleton(Module.GUID_IService, (void**)(&cComPtrNtv_003CIService_003E)) >= 0)
{
WBSTRString wBSTRString;
Module.WBSTRString_002E_007Bctor_007D(&wBSTRString);
@@ -290,7 +290,7 @@ namespace Microsoft.Zune.Util
string result;
try
{
int singleton = Module.GetSingleton((_GUID)Module._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&cComPtrNtv_003CIService_003E));
int singleton = Module.GetSingleton(Module.GUID_IService, (void**)(&cComPtrNtv_003CIService_003E));
result = null;
if (singleton >= 0)
{
@@ -355,7 +355,7 @@ namespace Microsoft.Zune.Util
string result;
try
{
int singleton = Module.GetSingleton((_GUID)Module._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&cComPtrNtv_003CIService_003E));
int singleton = Module.GetSingleton(Module.GUID_IService, (void**)(&cComPtrNtv_003CIService_003E));
result = null;
if (singleton >= 0)
{
@@ -46,7 +46,7 @@ namespace Microsoft.Zune.Util
m_featuresChangedHandler = (FeaturesChangedHandler)Delegate.Combine(m_featuresChangedHandler, value);
bool featuresHaveChanged = false;
IFeatureEnablementManager* ptr = null;
int singleton = Module.GetSingleton((_GUID)Module._GUID_9581b41a_b5cf_4ebf_9d1a_975477e081ca, (void**)(&ptr));
int singleton = Module.GetSingleton(Module.GUID_IFeatureEnablementManager, (void**)(&ptr));
if (singleton >= 0)
{
IFeatureEnablementManager* intPtr = ptr;
@@ -118,7 +118,7 @@ namespace Microsoft.Zune.Util
bool result = false;
if (Unsafe.As<CComPtrNtv_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003AITrayDeskBand_003E, long>(ref Module.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand) == 0)
{
Module.CoCreateInstance((GUID*)Unsafe.AsPointer(ref Module.CLSID_TrayDeskBand), null, 4u, (_GUID*)Unsafe.AsPointer(ref Module.IID_ITrayDeskBand), (void**)Unsafe.AsPointer(ref Module.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand));
Module.CoCreateInstance(Module.CLSID_TrayDeskBand, null, 4u, Module.IID_ITrayDeskBand, (void**)Unsafe.AsPointer(ref Module.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand));
}
if (Unsafe.As<CComPtrNtv_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003AITrayDeskBand_003E, long>(ref Module.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand) != 0L)
{
@@ -141,7 +141,7 @@ namespace Microsoft.Zune.Util
//IL_009b: Expected I, but got I8
if (Unsafe.As<CComPtrNtv_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003AITrayDeskBand_003E, long>(ref Module.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand) == 0)
{
Module.CoCreateInstance((_GUID*)Unsafe.AsPointer(ref Module.CLSID_TrayDeskBand), null, 4u, (_GUID*)Unsafe.AsPointer(ref Module.IID_ITrayDeskBand), (void**)Unsafe.AsPointer(ref Module.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand));
Module.CoCreateInstance(Module.CLSID_TrayDeskBand, null, 4u, Module.IID_ITrayDeskBand, (void**)Unsafe.AsPointer(ref Module.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand));
}
if (Unsafe.As<CComPtrNtv_003CMicrosoft_003A_003AZune_003A_003AUtil_003A_003AITrayDeskBand_003E, long>(ref Module.Microsoft_002EZune_002EUtil_002E_003FA0x0277dc26_002Es_spTrayDeskBand) != 0L)
{
@@ -21,27 +21,27 @@ namespace Microsoft.Zune.Util
foreach (DictionaryEntry item in dictionary)
{
int num2 = 0;
if (((DictionaryEntry)item).Key.GetType() == typeof(string))
if (item.Key.GetType() == typeof(string))
{
VARIANT tagVARIANT;
IntPtr pDstNativeVariant = (IntPtr)(&tagVARIANT);
Marshal.GetNativeVariantForObject(((DictionaryEntry)item).Key, pDstNativeVariant);
Marshal.GetNativeVariantForObject(item.Key, pDstNativeVariant);
VARIANT tagVARIANT2;
if (((DictionaryEntry)item).Value.GetType() == typeof(Guid))
if (item.Value.GetType() == typeof(Guid))
{
string obj = ((DictionaryEntry)item).Value.ToString();
string obj = item.Value.ToString();
IntPtr pDstNativeVariant2 = (IntPtr)(&tagVARIANT2);
Marshal.GetNativeVariantForObject(obj, pDstNativeVariant2);
}
else
{
if (((DictionaryEntry)item).Value.GetType() != typeof(string) && ((DictionaryEntry)item).Value.GetType() != typeof(int) && ((DictionaryEntry)item).Value.GetType() != typeof(long))
if (item.Value.GetType() != typeof(string) && item.Value.GetType() != typeof(int) && item.Value.GetType() != typeof(long))
{
num2 = -2147024809;
continue;
}
IntPtr pDstNativeVariant3 = (IntPtr)(&tagVARIANT2);
Marshal.GetNativeVariantForObject(((DictionaryEntry)item).Value, pDstNativeVariant3);
Marshal.GetNativeVariantForObject(item.Value, pDstNativeVariant3);
}
Module.SafeArrayPutElement(ptr, &num, &tagVARIANT);
Module.SafeArrayPutElement(ptr2, &num, &tagVARIANT2);
@@ -56,7 +56,7 @@ namespace Microsoft.Zune.Util
*(long*)(&cComPtrNtv_003CITelemetryManager_003E) = 0L;
try
{
if (Module.GetSingleton((_GUID)Module._GUID_ab28333b_a55c_4312_a7a3_2dd60d4a7154, (void**)(&cComPtrNtv_003CITelemetryManager_003E)) >= 0)
if (Module.GetSingleton(Module.GUID_ITelemetryManager, (void**)(&cComPtrNtv_003CITelemetryManager_003E)) >= 0)
{
long num3 = *(long*)(*(ulong*)(&cComPtrNtv_003CITelemetryManager_003E)) + 48;
long num4 = *(long*)(&cComPtrNtv_003CITelemetryManager_003E);
@@ -92,7 +92,7 @@ namespace Microsoft.Zune.Util
*(long*)(&cComPtrNtv_003CITelemetryManager_003E) = 0L;
try
{
if (Module.GetSingleton((_GUID)Module._GUID_ab28333b_a55c_4312_a7a3_2dd60d4a7154, (void**)(&cComPtrNtv_003CITelemetryManager_003E)) >= 0)
if (Module.GetSingleton(Module.GUID_ITelemetryManager, (void**)(&cComPtrNtv_003CITelemetryManager_003E)) >= 0)
{
long num = *(long*)(*(ulong*)(&cComPtrNtv_003CITelemetryManager_003E)) + 64;
long num2 = *(long*)(&cComPtrNtv_003CITelemetryManager_003E);
@@ -120,7 +120,7 @@ namespace Microsoft.Zune.Util
*(long*)(&cComPtrNtv_003CITelemetryManager_003E) = 0L;
try
{
if (Module.GetSingleton((_GUID)Module._GUID_ab28333b_a55c_4312_a7a3_2dd60d4a7154, (void**)(&cComPtrNtv_003CITelemetryManager_003E)) >= 0)
if (Module.GetSingleton(Module.GUID_ITelemetryManager, (void**)(&cComPtrNtv_003CITelemetryManager_003E)) >= 0)
{
long num = *(long*)(*(ulong*)(&cComPtrNtv_003CITelemetryManager_003E)) + 56;
long num2 = *(long*)(&cComPtrNtv_003CITelemetryManager_003E);
@@ -1236,7 +1236,7 @@ namespace MicrosoftZuneLibrary
}
}
IService* ptr3 = null;
if (Module.GetSingleton((_GUID)Module._GUID_bb2d1edd_1bd5_4be1_8d38_36d4f0849911, (void**)(&ptr3)) >= 0)
if (Module.GetSingleton((_GUID)Module.GUID_IService, (void**)(&ptr3)) >= 0)
{
IService* intPtr2 = ptr3;
_GUID gUID;
+16
View File
@@ -10,9 +10,11 @@ global using static Vanara.PInvoke.AdvApi32;
global using ZuneDBApi;
global using GC = System.GC;
global using HRESULT = ZuneUI.HRESULT;
global using _GUID = System.Guid;
using System;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
namespace ZuneDBApi
{
@@ -20,6 +22,16 @@ namespace ZuneDBApi
{
private static bool s_bIsLonghornOrBetter;
private static bool s_bIsLonghornOrBetterInitialized;
internal static readonly string WINDOWCLASS_MsnMsgrUIManager = "MsnMsgrUIManager";
internal static readonly _GUID GUID_IService = new("bb2d1edd-1bd5-4be1-8d38-36d4f0849911");
internal static readonly _GUID GUID_IUserManager = new("c9e0f18a-6c53-47d0-991e-dbd4fe395101");
internal static readonly _GUID GUID_IFeatureEnablementManager = new("9581b41a-b5cf-4ebf-9d1a-975477e081ca");
internal static readonly _GUID GUID_ITelemetryManager = new("ab28333b-a55c-4312-a7a3-2dd60d4a7154");
internal static void _ZuneShipAssert(uint v1, uint v2)
{
System.Diagnostics.Debug.WriteLine($"ShipAssert: {v1:X2} {v2:X2}");
}
public static HANDLE ToHandle(void* h) => new(new IntPtr(h));
public static void* ToPointer(this HANDLE h) => h.DangerousGetHandle().ToPointer();
@@ -230,6 +242,10 @@ namespace ZuneDBApi
return Gdi32.GetObject(new(new IntPtr(hgdiobj)), bufferSize, new IntPtr(lpvObject));
}
[DllImport("ZuneService", CallingConvention = CallingConvention.Cdecl, SetLastError = true)]
[MethodImpl(MethodImplOptions.Unmanaged)]
public unsafe static extern int GetServiceEndPointUri(EServiceEndpointId endpointId, ushort** uri);
public static int GetVersionExW(ref OSVERSIONINFOEX lpVersionInformation)
{
return Kernel32.GetVersionEx(ref lpVersionInformation) ? 1 : 0;