コード例 #1
0
 public unsafe void *PreDidAlloc(void *pRequest, BOOL fSpyed)
 {
     Ole32.IMallocSpy current = CurrentSpy;
     return(current is null
         ? pRequest
         : current.PreDidAlloc(pRequest, fSpyed));
 }
コード例 #2
0
 public unsafe void *PostAlloc(void *pActual)
 {
     Ole32.IMallocSpy current = CurrentSpy;
     return(current is null
         ? pActual
         : current.PostAlloc(pActual));
 }
コード例 #3
0
 public unsafe void *PostRealloc(void *pActual, BOOL fSpyed)
 {
     Ole32.IMallocSpy current = CurrentSpy;
     return(current is null
         ? pActual
         : current.PostRealloc(pActual, fSpyed));
 }
コード例 #4
0
 public void SetSpy(Ole32.IMallocSpy spy, bool currentThreadOnly)
 {
     lock (_lock)
     {
         _currentSpy       = spy;
         _registeredThread = currentThreadOnly ? Kernel32.GetCurrentThreadId() : 0;
     }
 }