Link to home
Start Free TrialLog in
Avatar of yoyumkj
yoyumkj

asked on

Termination or Exception in win 32 Dll

I need some help to figure out the termination problem.
I used "throw A" to termination the program when some constaints do not match.
For example,

double __stdcall PP(const char* A)
{
   if ( *A != 'r')
   throw "A";
    ...
}

After I tried this way and created dll to call from excel and when I call the dll from excel, it shows error message and terminated the excel for some reasons.
How can I use the termination in this case?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Member_2_1001466
Member_2_1001466

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
SOLUTION
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 MiniDisc_2k2
MiniDisc_2k2

I think that both SteH and I were correct in assuming that the throw was not caught and thus caused the problem, so perhaps a split of points between us two would be warranted?

I could have also been right with the problem using == instead of strcmp()... either way, I think the question has been answered correctly and the points should somehow be distributed if the asker doesn't respond.

Thanks,
-- Matt