mirror of
https://github.com/ZuneDev/ZuneShell.dll.git
synced 2026-07-27 13:11:51 -07:00
More fixes
This commit is contained in:
+10
-2
@@ -3,9 +3,9 @@
|
||||
internal unsafe class CComPtrNtv<TPtr> : IDisposable where TPtr : unmanaged
|
||||
{
|
||||
private bool disposedValue;
|
||||
public TPtr* p;
|
||||
public TPtr* p = (TPtr*)IntPtr.Zero.ToPointer();
|
||||
|
||||
public bool IsNullPtr => p == IntPtr.Zero.ToPointer();
|
||||
public bool IsNullPtr => p == null || p == IntPtr.Zero.ToPointer();
|
||||
|
||||
internal CComPtrNtv()
|
||||
{
|
||||
@@ -33,6 +33,14 @@ internal unsafe class CComPtrNtv<TPtr> : IDisposable where TPtr : unmanaged
|
||||
/// </summary>
|
||||
public static implicit operator bool(CComPtrNtv<TPtr> obj) => obj.IsNullPtr;
|
||||
|
||||
public TPtr** GetPtrToPtr()
|
||||
{
|
||||
fixed (TPtr** ptr = &p)
|
||||
{
|
||||
return ptr;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!disposedValue)
|
||||
|
||||
Reference in New Issue
Block a user