Debugging VB6 DLL

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?
mdreesefcAsked:
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.

JohnBPriceCommented:
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

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
Jason EvansSenior Software DeveloperCommented:

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
leonstrykerCommented:
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
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
Visual Basic Classic

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.