mirror of
https://github.com/ZuneDev/ZuneShell.dll.git
synced 2026-07-27 13:11:51 -07:00
Added fields for NewsletterOptions
This commit is contained in:
@@ -1125,10 +1125,12 @@ namespace Microsoft.Zune.Service
|
||||
num = ((delegate* unmanaged[Cdecl, Cdecl]<IntPtr, INewsletterSettings**, int>)(*(ulong*)(*(long*)p + 48)))((nint)p, (INewsletterSettings**)(cComPtrNtv_003CINewsletterSettings_003E.p));
|
||||
if (num >= 0)
|
||||
{
|
||||
NewsletterOptions newsletterOptions;
|
||||
*(EmailFormat*)(&newsletterOptions) = accountSettings.EmailFormat;
|
||||
Unsafe.As<NewsletterOptions, int>(ref Unsafe.AddByteOffset(ref newsletterOptions, 4)) = (accountSettings.AllowZuneEmails ? 1 : 0);
|
||||
Unsafe.As<NewsletterOptions, int>(ref Unsafe.AddByteOffset(ref newsletterOptions, 8)) = (accountSettings.AllowPartnerEmails ? 1 : 0);
|
||||
NewsletterOptions newsletterOptions = new()
|
||||
{
|
||||
emailFormat = accountSettings.EmailFormat,
|
||||
allowZuneEmails = accountSettings.AllowZuneEmails ? 1 : 0,
|
||||
allowPartnerEmails = accountSettings.AllowPartnerEmails ? 1 : 0
|
||||
};
|
||||
long num2 = *(long*)(cComPtrNtv_003CINewsletterSettings_003E.p);
|
||||
NewsletterOptions newsletterOptions2 = newsletterOptions;
|
||||
num = ((delegate* unmanaged[Cdecl, Cdecl]<IntPtr, NewsletterOptions, int>)(*(ulong*)(*(long*)(*(ulong*)(cComPtrNtv_003CINewsletterSettings_003E.p)) + 24)))((nint)num2, newsletterOptions2);
|
||||
|
||||
@@ -78,8 +78,8 @@ namespace Microsoft.Zune.Service
|
||||
return;
|
||||
}
|
||||
m_emailFormat = *(EmailFormat*)(&newsletterOptions);
|
||||
bool flag = (m_allowZuneEmails = ((Unsafe.As<NewsletterOptions, int>(ref Unsafe.AddByteOffset(ref newsletterOptions, 4)) != 0) ? true : false));
|
||||
bool flag2 = (m_allowPartnerEmails = ((Unsafe.As<NewsletterOptions, int>(ref Unsafe.AddByteOffset(ref newsletterOptions, 8)) != 0) ? true : false));
|
||||
m_allowZuneEmails = newsletterOptions.allowZuneEmails != 0;
|
||||
m_allowPartnerEmails = newsletterOptions.allowPartnerEmails != 0;
|
||||
int num = ((delegate* unmanaged[Cdecl, Cdecl]<IntPtr, int>)(*(ulong*)(*(long*)pPrivacySettings + 32)))((nint)pPrivacySettings);
|
||||
int num2 = 0;
|
||||
if (0 >= num)
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using Microsoft.Zune.Service;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Size = 12)]
|
||||
[NativeCppClass]
|
||||
public struct NewsletterOptions
|
||||
{
|
||||
private int _003Calignment_0020member_003E;
|
||||
public EmailFormat emailFormat;
|
||||
public int allowZuneEmails = 0;
|
||||
public int allowPartnerEmails = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user