mirror of
https://github.com/ZuneDev/ZuneShell.dll.git
synced 2026-07-27 13:11:51 -07:00
Implemented Module.delete
This commit is contained in:
@@ -324,15 +324,15 @@ namespace Microsoft.Zune.Playlist
|
||||
num2 = Module.Microsoft_002EZune_002EPlaylist_002EPlaylistAsyncOperation_002EAsyncSavePlaylistAsStatic(ptr2, playlistId, m_pPlaylistManager, playlistAsyncOperationCompleted);
|
||||
if (num2 >= 0)
|
||||
{
|
||||
goto IL_0066;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
if (ptr2 != null)
|
||||
{
|
||||
Module.Microsoft_002EZune_002EPlaylist_002EPlaylistAsyncOperation_002E__delDtor(ptr2, 1u);
|
||||
}
|
||||
goto IL_0066;
|
||||
IL_0066:
|
||||
goto done;
|
||||
done:
|
||||
return new HRESULT(num2);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,11 @@ namespace ZuneDBApi
|
||||
public static HINSTANCE ToHInstance(void* h) => new(new IntPtr(h));
|
||||
public static void* ToPointer(this HINSTANCE h) => h.DangerousGetHandle().ToPointer();
|
||||
|
||||
internal static void delete(void* ptr)
|
||||
{
|
||||
Marshal.FreeHGlobal((IntPtr)ptr);
|
||||
}
|
||||
|
||||
public static T AddByteOffset<T>(ref T obj, int offset)
|
||||
{
|
||||
return Unsafe.AddByteOffset(ref obj, new IntPtr(offset));
|
||||
@@ -268,6 +273,9 @@ namespace ZuneDBApi
|
||||
[MethodImpl(MethodImplOptions.Unmanaged)]
|
||||
public unsafe static extern int GetServiceEndPointUri(EServiceEndpointId endpointId, ushort** uri);
|
||||
|
||||
[MethodImpl(MethodImplOptions.Unmanaged | MethodImplOptions.PreserveSig)]
|
||||
public unsafe static extern int GetSingleton(_GUID guid, void** outReference);
|
||||
|
||||
public static int GetVersionExW(ref OSVERSIONINFOEX lpVersionInformation)
|
||||
{
|
||||
return Kernel32.GetVersionEx(ref lpVersionInformation) ? 1 : 0;
|
||||
@@ -620,5 +628,9 @@ namespace ZuneDBApi
|
||||
[DllImport(ZUNENATIVELIB_DLL, CallingConvention = CallingConvention.Cdecl, SetLastError = true)]
|
||||
[MethodImpl(MethodImplOptions.Unmanaged)]
|
||||
public unsafe static extern int CreateEmptyPlaylist(IPlaylist** outPlaylist);
|
||||
|
||||
[DllImport(ZUNENATIVELIB_DLL, CallingConvention = CallingConvention.Cdecl, SetLastError = true)]
|
||||
[MethodImpl(MethodImplOptions.Unmanaged)]
|
||||
public unsafe static extern int DoesFileExist(ushort* path, int* error);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user