Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Debugging VB6 DLL

Posted on 2003-12-03
4
492 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
ID: 9866529
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
ID: 9867295

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
ID: 10212346
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
vb6 connector to SQL Server 2 37
Passing a Text Box name to a Sub 6 99
Help me. 3 60
Excel Automation VBA 19 88
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

809 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