Solved

Debugging VB6 DLL

Posted on 2003-12-03
4
482 Views
Last Modified: 2013-11-26
Hi, I have made a .dll project which I would like to call from asp. However when debugging nothing seems to happen. I have confirmed this by setting a breakpoint in my sub main(which is the startup for the project) in the project's module file which it doesn't get to. What am I doing wrong?
0
Comment
Question by:mdreesefc
4 Comments
 
LVL 16

Accepted Solution

by:
JohnBPrice earned 25 total points
Comment Utility
As I recall, you must start the project in the VB IDE first, otherwise Windows will load up your compiled DLL.  You can "Run" the DLL in the IDE, though nothing will happen until someone (your asp code) tries to access it.

If you are already doing that, then perhaps the DLL is already in memory, check task manager.  If windows still loads the actuall DLL, try deleting all copies of it.

If you already did all that, There are constraints on the IIS process that is cannot interact with the desktop, you could either allow the service to interact with the desktop (via the services control panel), or there was a way to run IIS as an application instead of as a service, seach MSDN.


0
 
LVL 10

Assisted Solution

by:MrClyfar
MrClyfar earned 25 total points
Comment Utility

Hi there.

If the above does not work, try this. If you are running XP:

Go to Start->Run and type dcomcnfg. In the component manager app that appears navigate the tree on the left of the screen: Component Services->Computers->My Computer. Right-click on My Computer and go to the Default COM Security tab. In Access Permissions click Edit Default... In the list that appears, make sure that INTERACTIVE and Internet Guest Account (<Your computer name>\IUSR_<Your computer name>) users are in the list. If either of these users are not in the list, click Add to include them.

Make sure, for both users, that the Access Permission has been set to Allow in the list at the bottom.

Click OK.

Now do the exact same for Launch Permissions, making sure the users are in the top list and that their permissions have been set.

Click OK, and if your still in My Computer Properties, click OK. Now you must reboot your computer.

After rebooting, start VB and load your DLL project. Run the project and put a breakpoint somewhere in the code, just so that we know if this is going to work. Then restart IIS. Go to your ASP page that uses the DLL and see what happens.

For Win 2000, you can run dcomcnfg as above, but you will get a slightly different screen. What will apear is just the small dialog that comes up when you right-click on My Computer in the XP component services. The Default COM Security tab is available on this dialog too, so just follow the instructions as above.

The above seems very long-winded, but this is the exact same technique I've had to use on a number of occassions in order to debug VB Dll's called from ASP pages. Let me know how you get on.

Hope this helps.
Jas.
0
 
LVL 29

Expert Comment

by:leonstryker
Comment Utility
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:

Split JohnBPrice, MrClyfar
 
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

leonstryker
EE Cleanup Volunteer
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now