mirror of
https://github.com/ZuneDev/ZuneShell.dll.git
synced 2026-07-27 13:11:51 -07:00
[WIP] SubscriptionDataProviderItem
This commit is contained in:
@@ -1,19 +1,14 @@
|
||||
using Microsoft.VisualC;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Size = 24)]
|
||||
[NativeCppClass]
|
||||
[DebugInfoInPDB]
|
||||
[MiscellaneousBits(64)]
|
||||
[StructLayout(LayoutKind.Explicit, Size = 24)]
|
||||
internal struct CComPropVariant
|
||||
{
|
||||
[FieldOffset(0)]
|
||||
public VARTYPE vt;
|
||||
|
||||
public ushort wReserved1;
|
||||
public ushort wReserved2;
|
||||
public ushort wReserved3;
|
||||
|
||||
[FieldOffset(8)]
|
||||
public ulong val1;
|
||||
|
||||
[FieldOffset(16)]
|
||||
public ulong val2;
|
||||
}
|
||||
|
||||
@@ -3,27 +3,21 @@ using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
[DebugInfoInPDB]
|
||||
[MiscellaneousBits(65)]
|
||||
[NativeCppClass]
|
||||
internal unsafe struct IMSMediaSchemaPropertySet
|
||||
{
|
||||
private long _alignment1;
|
||||
[FieldOffset(8)]
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, uint> addRef;
|
||||
|
||||
// 8
|
||||
public delegate* unmanaged[Cdecl, Cdecl]<IntPtr, uint> addRef;
|
||||
[FieldOffset(16)]
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, uint> dispose;
|
||||
|
||||
// 16
|
||||
public delegate* unmanaged[Cdecl, Cdecl]<IntPtr, uint> dispose;
|
||||
[FieldOffset(48)]
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, uint, uint, tagPROPVARIANT*, int> readValue;
|
||||
|
||||
private long _alignment4;
|
||||
private long _alignment5;
|
||||
private long _alignment6;
|
||||
|
||||
// 48
|
||||
public delegate* unmanaged[Cdecl, Cdecl]<IntPtr, uint, uint, tagPROPVARIANT*, int> readValue;
|
||||
|
||||
// 56
|
||||
public delegate* unmanaged[Cdecl, Cdecl]<IntPtr, uint, tagPROPVARIANT, int> setValue;
|
||||
[FieldOffset(56)]
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, uint, tagPROPVARIANT, int> setValue;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.VisualC;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Size = 8)]
|
||||
[MiscellaneousBits(65)]
|
||||
[NativeCppClass]
|
||||
[DebugInfoInPDB]
|
||||
internal static struct IService
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
internal unsafe struct IService
|
||||
{
|
||||
private long _003Calignment_0020member_003E;
|
||||
[FieldOffset(384)]
|
||||
public delegate* unmanaged[Cdecl, Cdecl]<IntPtr, _GUID*, int*, int> _method1;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ZuneDBApi.Interop;
|
||||
@@ -23,4 +24,7 @@ internal static class VCString
|
||||
|
||||
return array;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static unsafe ushort* AsPtr(ref ushort[] str) => (ushort*)Unsafe.AsPointer(ref str);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -29,52 +29,52 @@ public class SubscriptionSeriesInfo : DataProviderObject
|
||||
[
|
||||
new()
|
||||
{
|
||||
propertyName = (ushort*)Unsafe.AsPointer(ref _003CModule_003E.PROPNAME_FeedUrl),
|
||||
propertyName = VCString.AsPtr(ref _003CModule_003E.PROPNAME_FeedUrl),
|
||||
propertyId = 0x8000103
|
||||
},
|
||||
new()
|
||||
{
|
||||
propertyName = (ushort*)Unsafe.AsPointer(ref _003CModule_003E.PROPNAME_ErrorCode),
|
||||
propertyName = VCString.AsPtr(ref _003CModule_003E.PROPNAME_ErrorCode),
|
||||
propertyId = 0x600010A
|
||||
},
|
||||
new()
|
||||
{
|
||||
propertyName = (ushort*)Unsafe.AsPointer(ref _003CModule_003E.PROPNAME_Title),
|
||||
propertyName = VCString.AsPtr(ref _003CModule_003E.PROPNAME_Title),
|
||||
propertyId = PROPID_Title
|
||||
},
|
||||
new()
|
||||
{
|
||||
propertyName = (ushort*)Unsafe.AsPointer(ref _003CModule_003E.PROPNAME_HomeUrl),
|
||||
propertyName = VCString.AsPtr(ref _003CModule_003E.PROPNAME_HomeUrl),
|
||||
propertyId = 0x800600C
|
||||
},
|
||||
new()
|
||||
{
|
||||
propertyName = (ushort*)Unsafe.AsPointer(ref _003CModule_003E.PROPNAME_ArtUrl),
|
||||
propertyName = VCString.AsPtr(ref _003CModule_003E.PROPNAME_ArtUrl),
|
||||
propertyId = 0x800600D
|
||||
},
|
||||
new()
|
||||
{
|
||||
propertyName = (ushort*)Unsafe.AsPointer(ref _003CModule_003E.PROPNAME_Description),
|
||||
propertyName = VCString.AsPtr(ref _003CModule_003E.PROPNAME_Description),
|
||||
propertyId = 0x8006002
|
||||
},
|
||||
new()
|
||||
{
|
||||
propertyName = (ushort*)Unsafe.AsPointer(ref _003CModule_003E.PROPNAME_Explicit),
|
||||
propertyName = VCString.AsPtr(ref _003CModule_003E.PROPNAME_Explicit),
|
||||
propertyId = 0x5006006
|
||||
},
|
||||
new()
|
||||
{
|
||||
propertyName = (ushort*)Unsafe.AsPointer(ref _003CModule_003E.PROPNAME_Copyright),
|
||||
propertyName = VCString.AsPtr(ref _003CModule_003E.PROPNAME_Copyright),
|
||||
propertyId = 0x1006009
|
||||
},
|
||||
new()
|
||||
{
|
||||
propertyName = (ushort*)Unsafe.AsPointer(ref _003CModule_003E.PROPNAME_Author),
|
||||
propertyName = VCString.AsPtr(ref _003CModule_003E.PROPNAME_Author),
|
||||
propertyId = 0x1006004
|
||||
},
|
||||
new()
|
||||
{
|
||||
propertyName = (ushort*)Unsafe.AsPointer(ref _003CModule_003E.PROPNAME_OwnerName),
|
||||
propertyName = VCString.AsPtr(ref _003CModule_003E.PROPNAME_OwnerName),
|
||||
propertyId = 0x1006007
|
||||
},
|
||||
];
|
||||
@@ -87,9 +87,9 @@ public class SubscriptionSeriesInfo : DataProviderObject
|
||||
{
|
||||
fixed (ushort* pPropertyName = VCString.ToWide(propertyName))
|
||||
{
|
||||
if (_003CModule_003E._wcsicmp(pPropertyName, (ushort*)Unsafe.AsPointer(ref _003CModule_003E.PROPNAME_LibraryId)) != 0
|
||||
&& _003CModule_003E._wcsicmp(pPropertyName, (ushort*)Unsafe.AsPointer(ref _003CModule_003E.PROPNAME_SeriesState)) != 0
|
||||
&& _003CModule_003E._wcsicmp(pPropertyName, (ushort*)Unsafe.AsPointer(ref _003CModule_003E.PROPNAME_NumberOfEpisodes)) != 0
|
||||
if (_003CModule_003E._wcsicmp(pPropertyName, VCString.AsPtr(ref _003CModule_003E.PROPNAME_LibraryId)) != 0
|
||||
&& _003CModule_003E._wcsicmp(pPropertyName, VCString.AsPtr(ref _003CModule_003E.PROPNAME_SeriesState)) != 0
|
||||
&& _003CModule_003E._wcsicmp(pPropertyName, VCString.AsPtr(ref _003CModule_003E.PROPNAME_NumberOfEpisodes)) != 0
|
||||
&& m_pSeriesPropertySet != null)
|
||||
{
|
||||
for (int currentMapIndex = 0; currentMapIndex < propertyToPidMaps.Length; currentMapIndex++)
|
||||
|
||||
Reference in New Issue
Block a user