I was have this DLL I wrote a while ago in Delphi 2. Each function reutrns a possible error code. I was thinking it might be better to raise an exception and have the calling app catch it.
First, do you think this would be a better way of implementing error handling from within a DLL?
Second, how might I raise my own exceptions from within the DLL? For example, perhaps I want to raise something like
Third, could you supply some sample code...just a really small example of the code in the DLL and the Delphi app (perhaps a C++ app too, if you have time, tho not necessary).