I did some more tracing, and it looks like when I run under the debugger, I get this exception during the library load. (I can't even call SD_GetLastError, because it's the LoadLibrary call that throws it.) The exception code is 0xc06d007e. I can't find a symbolic definition for this code.
However, when I just execute the project, everything works fine. It even detects whether or not the dongle is present, and bypasses the dialog boxes by not loading the library.
Previously, it was working when I stepped through in the debugger, as long as I commented out the hasp-checking code and just called SD_Create().
I've been through several uninstalls and reinstalls of the HASP drivers, using haspdinst.exe and hinstall.exe, and am using SwiftDecoder 7.11. Is there a particular version of the HASP drivers I need to be using?
Thanks for the help.