mirror of
https://github.com/ZuneDev/ZuneShell.dll.git
synced 2026-07-27 13:11:51 -07:00
Added raw ZuneDBApi decomp
This commit is contained in:
@@ -0,0 +1,109 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using ZuneUI;
|
||||
|
||||
namespace MicrosoftZuneLibrary
|
||||
{
|
||||
public class FirmwareUpdateErrorInfo : IDisposable
|
||||
{
|
||||
private readonly CComPtrMgd_003CIFirmwareUpdateErrorInfo_003E m_spErrorInfo;
|
||||
|
||||
public unsafe string Url
|
||||
{
|
||||
get
|
||||
{
|
||||
//IL_0005: Expected I, but got I8
|
||||
//IL_0023: Expected I, but got I8
|
||||
string result = null;
|
||||
ushort* ptr = null;
|
||||
IFirmwareUpdateErrorInfo* p = m_spErrorInfo.p;
|
||||
if (p != null && ((delegate* unmanaged[Cdecl, Cdecl]<IntPtr, ushort**, int>)(*(ulong*)(*(long*)p + 40)))((nint)p, &ptr) >= 0)
|
||||
{
|
||||
result = new string((char*)ptr);
|
||||
_003CModule_003E.SysFreeString(ptr);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
//IL_0005: Expected I, but got I8
|
||||
//IL_0023: Expected I, but got I8
|
||||
string result = null;
|
||||
ushort* ptr = null;
|
||||
IFirmwareUpdateErrorInfo* p = m_spErrorInfo.p;
|
||||
if (p != null && ((delegate* unmanaged[Cdecl, Cdecl]<IntPtr, ushort**, int>)(*(ulong*)(*(long*)p + 32)))((nint)p, &ptr) >= 0)
|
||||
{
|
||||
result = new string((char*)ptr);
|
||||
_003CModule_003E.SysFreeString(ptr);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe HRESULT HrStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
//IL_0024: Expected I, but got I8
|
||||
int num = -2147467259;
|
||||
IFirmwareUpdateErrorInfo* p = m_spErrorInfo.p;
|
||||
if (p != null)
|
||||
{
|
||||
((delegate* unmanaged[Cdecl, Cdecl]<IntPtr, int*, int>)(*(ulong*)(*(long*)p + 24)))((nint)p, &num);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
}
|
||||
|
||||
internal unsafe FirmwareUpdateErrorInfo(IFirmwareUpdateErrorInfo* pErrorInfo)
|
||||
{
|
||||
CComPtrMgd_003CIFirmwareUpdateErrorInfo_003E spErrorInfo = new CComPtrMgd_003CIFirmwareUpdateErrorInfo_003E();
|
||||
try
|
||||
{
|
||||
m_spErrorInfo = spErrorInfo;
|
||||
base._002Ector();
|
||||
m_spErrorInfo.op_Assign(pErrorInfo);
|
||||
}
|
||||
catch
|
||||
{
|
||||
//try-fault
|
||||
((IDisposable)m_spErrorInfo).Dispose();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
private void _007EFirmwareUpdateErrorInfo()
|
||||
{
|
||||
m_spErrorInfo.Release();
|
||||
}
|
||||
|
||||
protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool P_0)
|
||||
{
|
||||
if (P_0)
|
||||
{
|
||||
try
|
||||
{
|
||||
_007EFirmwareUpdateErrorInfo();
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)m_spErrorInfo).Dispose();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Finalize();
|
||||
}
|
||||
}
|
||||
|
||||
public sealed override void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user