Solved

Debugging VB6 DLL

Posted on 2003-12-03
4
488 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to skip loop 6 57
passing a value with stream reader AFTER a ";" 3 67
Copy a row 12 62
Crystal reports - Formula Field code need assistance with code 17 73
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

810 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