Link to home
Start Free TrialLog in
Avatar of Mirko
Mirko

asked on

Debugging dyn. loaded DLLs

Hi,

I have a problem using the MSVC 5.0:

I wrote an application that uses a statically linked DLL. This DLL itself can dynamically load so calld plugin-dlls.
No the problem: how can I debug such plugins? The debugger always says: Breakpoint cannot be set...

Regards
  Mirko
ASKER CERTIFIED SOLUTION
Avatar of nietod
nietod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nietod
nietod

For example,

BOOL WINAPI DllMain(HINSTANCE DLLHnd,                 // >> DLL module.                                //
               ULONG     Rsn,                    // Reason for calling function.                  //
               LPVOID    Rsv)                    // Reserved.                                     //
{
   switch (Rsn)
   {
   case DLL_PROCESS_ATTACH:
     _asm  int 3;
    break;
   case DLL_PROCESS_DETACH:
      break;
   case DLL_THREAD_ATTACH:
      break;
   case DLL_THREAD_DETACH:
      break;
   }
   return true;
}

Avatar of Mirko

ASKER

Hello nietod,
thank you very much for your fast response. It was exactly, what I needed.
Grade A.
Regards
  Mirko