示例#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;
     }
 }