There is nothing wrong with this snippet (but yes, use dynamic_cast).
Maybe you set the breakpoint wrong, You're saying something with a DLL and an EXE, so if the code of Main() is in the DLL, how did you set the breakpoint?
You can try instead to show a MessageBox.