anchor.diff:  var
     originalacmDriverEnumCallback: ACMDRIVERENUMCB;
     originalacmFormatEnumCallback: ACMFORMATENUMCB;
  +
   function myacmDriverEnumCallback(hadid:HACMDRIVERID; dwInstance:DWORD; fdwSupport:DWORD):BOOL; stdcall;
   begin
  -  log('acmDriverEnumCallback('+IntToHex(hadid, 8)+', '+ IntToStr(dwInstance) + ', '+IntToStr(fdwSupport)+') start');
  +  //log('acmDriverEnumCallback('+IntToHex(hadid, 8)+', '+ IntToStr(dwInstance) + ', '+IntToStr(fdwSupport)+') start');
     result:=originalacmDriverEnumCallback(hadid, dwInstance, fdwSupport);
  -  log('acmDriverEnumCallback('+IntToHex(hadid, 8)+', '+ IntToStr(dwInstance) + ', '+IntToStr(fdwSupport)+') = '+BoolToStr(result, 'True', 'False'));
  +  //log('acmDriverEnumCallback('+IntToHex(hadid, 8)+', '+ IntToStr(dwInstance) + ', '+IntToStr(fdwSupport)+') = '+BoolToStr(result, 'True', 'False'));
   end;
   
   function myacmFormatEnumCallback(hadid:HACMDRIVERID;
  
positive.code:     ExitProcess(-1);
      Exit;
    end;
  
    BasePath:=Config.OutputPath;
    if Length(BasePath)=0 then
  
negative.code:                         fdwEnum: DWORD
                          ): MMResult; stdcall;
  begin
    //log('acmFormatEnum('+IntToHex(had, 8)+', ('+IntToStr(pafd.cbStruct)+', '+IntToStr(pafd.cbwfx)+', '+IntToStr(pafd.dwFormatIndex)+
    //', '+IntToStr(pafd.dwFormatTag)+', '+IntToStr(pafd.fdwSupport)+', "'+pafd.szFormat+'"), ..., '+IntToStr(dwInstance)+', '+IntToStr(fdwEnum)+') start');
  
    if not Assigned(fnCallback) then
    begin
      result:=TrampolineacmFormatEnum(had, pafd, fnCallback, dwInstance, fdwEnum);
      //log('no callback in acmFormatEnum');
    end else
    begin
      //if Assigned(originalacmFormatEnumCallback) then
      //  log('acmFormatEnum is being used multithreaded (or this code is broken). Either way, crap');
  
      originalacmFormatEnumCallback:=fnCallback;
      result:=TrampolineacmFormatEnum(had, pafd, @myacmFormatEnumCallback, dwInstance, fdwEnum);
      originalacmFormatEnumCallback:=nil;
    end;
    //log('acmFormatEnum('+IntToHex(had, 8)+', ('+IntToStr(pafd.cbStruct)+', '+IntToStr(pafd.cbwfx)+', '+IntToStr(pafd.dwFormatIndex)+
    //', '+IntToStr(pafd.dwFormatTag)+', '+IntToStr(pafd.fdwSupport)+', "'+pafd.szFormat+'"), ..., '+IntToStr(dwInstance)+', '+IntToStr(fdwEnum)+') = '+IntToStr(result));
    //LogFormat('pafd fmt', pafd.pwfx);
  end;
  
  
  