Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Project won't stop when using ActiveX DLL

Status
Not open for further replies.

ponerse

Programmer
Feb 11, 2003
72
US
Hi, I have a weird problem that hopefully someone can give me some insight on. I have created a class that has a function that goes out on the Internet and downloads 1000+ websites using a loop. I turned the class into an ActiveX DLL. When I debug the DLL in visual basic, I'm able to stop it whenever I want to, no problem. I just click on the "End" button (that square button in the IDE). However, when I make a new project and include a complied version of the DLL in the project and run that function, it doesn't stop when I press the "End" button, it keeps running it's loop. This will make it very hard (impossible really) for someone to debug a project with this DLL attached. I put a DoEvents in the loop, but it keeps on running anyway. Is there any way I can tell the DLL to look for a termination command when it is running?


Be an idiot:
 
Dear friend:

Always create an EXE project and then change the project type to DLL why?
because when you compile the DLL you have to be 100 % sure that it is bugg free.
Let's say that you compiled the Dll and then you want to change the type to EXE, you must change from the Class property Instance to Multiuse and then run The EXE, otherwise it will give you Error.

Hope this helps.
 
Try this:

In your client (exe) project, go to file/add project.
Add your dll project here.
This will make a project group. Save the group.
You will find that the reference to your dll gets changed in the exe project to the dll's vbp file name.

Make sure that, in the Project explorer, your exe project is boldfaced. If not, right click on it and select set as start up.

You can then debug back and forth between the client and the dll, setting breakpoints wherever you like.

Just be careful that when you open the exe's vbp as opposed to the grp file, your references are where they need to be.

HTH

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top