 
 #include "stdafx.h"
 
 #include "ldrexp.h"
 #include "LdrMgr.h"
 
 extern class CLdrMgr* LdrMgr;
 
 
 BOOL WINAPI StarterLoader(CString strLoadFile, int nOption) 
 {
  return LdrMgr->LoadFile(strLoadFile,nOption);
 } 

 void WINAPI LoadCmd(int argc , char * argv[])
 {
  LdrMgr->LoadCmd(argc , argv);
 }
 
 void WINAPI LdrGetFileLength(long& len)
 {
   LdrMgr->GetFileLength(len);
 }
 
 void WINAPI LdrGetFileCurPos(long& pos)
 {
   LdrMgr->GetFileCurPos(pos);
 }
 
 void WINAPI LdrGetStartAddress(U32& addr,int& nBank) 
 {
   LdrMgr->GetStartAddress(addr,nBank) ;
 }
  
 BOOL WINAPI LdrIsSymbolLoaded()
 {
   return LdrMgr->SrcIsLoaded();
 }
 
 BOOL WINAPI LdrIsUbrof()
 {
   return LdrMgr->SrcIsUbrof();
 }
 
 BOOL WINAPI LdrIsIEEE()
 {
   return LdrMgr->SrcIsIEEE();
 }

 BOOL WINAPI LdrIsOmf96()
 {
   return LdrMgr->SrcIsOmf96();
 }
 
 unsigned long WINAPI LdrGetLoadBytes()
 {
  return LdrMgr->GetCurLdrBytes();
 }
 
 int  WINAPI LdrStkNumConvToBank(int ul)
 {
  return LdrMgr->StkNumConvToBank(ul);
 }
 
 U32  WINAPI LdrStkAddrConvToBank(U32 ul)
 {
  return LdrMgr->StkAddrConvToBank(ul);
 }
 
 BOOL WINAPI LdrSrcSupportBankSwitch()
 {
  return LdrMgr->SrcSupportBankSwitch();
 }
 
 int WINAPI LdrSrcGetLoadPath(CString& strPath)
 {
  return LdrMgr->SrcGetLoadPath(strPath);
 }

 U32 WINAPI LdrGetRegOff(U16 regIndex)
 {
  return LdrMgr->GetRegOff(regIndex);
 }

 void WINAPI DelLdrDLL()
 {     
  if(LdrMgr) delete LdrMgr;
  LdrMgr = NULL;
 }

 BOOL WINAPI GetBankAddr(unsigned long& uCallAddr,unsigned long& uRetAddr)   
 {
   return LdrMgr->GetBankAddr(uCallAddr, uRetAddr);
 }
 
 void WINAPI GetRootBankValue(ADDRESS& addr)
 {
   LdrMgr->GetRootBankValue(addr);
 }
 

 ////////////////////////////////  
 
 
 
 
 
 
 
 
 
 
 
