Debug DLL that I'm calling from VB

Hi, everybody!

I use Borland C++ 5.0 and VB5(SP3) under Win2000.
How can I debug my DLL written in BC++ 5.0 that I'm calling from VB?
My problem is: I can't catch breakpoint in my DLL

Thanks in advance

Roman
Roman2Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkrCommented:
>>My problem is: I can't catch breakpoint in my DLL

You can - just place a

DebugBreak();

or

__asm { int 3};

statement at the point of interest. This will cause an EXCEPTION_BREAKPOINT to be raised and invoke the debugger.
0
thienpnguyenCommented:
Debugging BCB\BC++ .Dll from Visual Basic - by Borland Developer Support Staff

http://bdn.borland.com/article/0,1410,16434,00.html
0
Roman2Author Commented:
Yes, I know this article ! But it doesn't work...
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

jkrCommented:
DebugBreak();

should work, though :o)
0
thienpnguyenCommented:
If it doesn't work, could you recheck

1. Maybe, your compute contains other version of that DLL .

2. Maybe, the code at your break point doesn't execute because "you think the program will execute that line but it doesn't" . Could you print some message to make sure that line code executes  .

3. Maybe, you miss some step in that article .
0
Roman2Author Commented:
Thienpnguyen !

I set the breakpoint just on first real operator in my function, so that is before any "if".
What do you mean "your compute contains other version of that DLL"?

Thanks
0
jkrCommented:
Is there any particular reason why you are consequently ignoring my suggestion?
0
Roman2Author Commented:
jkr!

There's no any reason, I just didn't try yet!
I promise, i will. I don't understand what the difference
between DebugBreak and when i set breakpoint with F5 for the same place.

Thanks
0
jkrCommented:
>>I don't understand what the difference between
>>DebugBreak and when i set breakpoint with F5 for the
>>same place

'DebugBreak()' will place a hard-coded breakpoint in your DLL. This comes in handy when you for various reasons cannot set a breakpoint manually. Even better, if you run the program and it reaches that statement, the debugger will be launched and attaches to the running process.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
thienpnguyenCommented:
Roman2 > What do you mean "your compute contains other version of that DLL"?

Assume your DLL is a.dll . Maybe, your system directory or a directory in PATH environment variable contains a.dll .... In that case, maybe system loads the different version of a.dll .

Sometime , you put the old version of a.dll in same directory with your execute file or in system directory . However, you debug the newest a.dll in other directory ==> system loads the wrong version of a.dll




 
0
jkrCommented:
Well, anything new on this one?
0
Roman2Author Commented:
Not really...
0
tinchosCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Delete/No Refund Points

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0
jkrCommented:
Hum, I sort of think that this Q had been answered...
0
tinchosCommented:
jkr

you're right, my mistake

I must have confused it with another question

I'm sorry
0
jkrCommented:
Hey, it it 4:15am here now, I have a *lot* of sympathy :o)
0
tinchosCommented:
It's 23:21 here and I'm having a lot of sympathy too

;)
0
jkrCommented:
;o)

Nevertheless, I'll head for the sheets! 'Night!
0
tinchosCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by: jkr

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.