SiteExperts.com Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu
 Forums
SiteExperts.com Forums
All Discussions

SiteExperts Feedback
The Lounge
Dynamic HTML
Site Design/ Critiques
HTML and CSS
XML Technologies
The Wireless Internet
Internet Explorer
Microsoft .NET
The Server
Technical Support

Sponsored Links

User Groups : Forums : SiteExperts : The Server :

Previous DiscussionNext Discussion
 Classic ASP Calling VB DLL that calls VC++ DLL

Need some big favor here.

Two scenarios, one works, the other doesn't.

Scenario one: VB6 EXE using CreateObject("MY_VBDLL.MY_CLASS") which in turn uses Declare Function MY_C_FUNC Lib "MY_VCDLL.DLL"... blablabla. Works fine.

Scenario two: ASP using CreateObject("MY_VBDLL.MY_CLASS") which in turn uses Declare Function MY_C_FUNC Lib "MY_VCDLL.DLL"... blablabla. Error '800a0035' File not found: MY_VCDLL.DLL


Note that logic or structure in bolded text are exactly the same, yet in Scene 2 I get this error that does not make any sense.

Reason that I think does not make sense:

1. Everything is there. Scene 1 proves that all code workds, and proves correct register of the VB DLL. ALL files involved (ASP, VB6 DLL, VC++ DLL) reside in the same directory.

2. I've used Dependency Walker to peek into the VC++ DLL and made sure the dependency files are there. (I am not a VC++ developer)

3. I've tried modifying the Lib part within the "Declare Function" statement, using either just the DLL file's name, with or without extension, plus the full absolute path to the VC++ DLL. Same results: Scene 1 works, not Scene 2.

4. I've tried setting the environments PATH and added the directory which contained all those files above. No success.

5. I've tried moving all the DLLs into system32, system32\inetsrv... No success.

6. I've googled and have failed to find even the simplest example as I have, nor have I have straight resolved answers to this issue.


Environment(s)

XP running IIS 5.1
Vista Home Premium running IIS 7.0
Server-side language: Classic ASP


ASP / VB EXE Code

<%
Dim c, lng
Set c = CreateObject("MY_VBDLL.MY_CLASS")
lng = c.DoThis("00000000000000000001") '------------- Dies on this line
Response.Write lng ' or MsgBox lng for the case of VB EXE Code
%>




MY_VBDLL.MY_CLASS Code

Option Explicit

Private Declare Function DoThat Lib "MY_VCDLL.DLL" Alias "_XXXXXXXXXX@4" (ByVal IN_szString As String) As Long

Public Function DoThis(ByVal IN_szString As String)
DoThis = DoThat(IN_szString)
End Function




MY_VCDLL.DLL

(Unknown, not controlled by me, but Scene 1 confirms that it works)



ASP Error

MY_VBDLL Error '800a0035'

File not found: MY_VCDLL.DLL

/DEFAULT.ASP, Line 3



Note on Error

As I have mentioned that I have also tried using a full absolute path referring to the VC++ DLL, and same error appears, showing me the full path of the DLL which EXISTS, yet stating "File not found", which is complete non-sense.



Question and rant

Has anybody got this to work? I mean calling a VC++ function from a VB6 Class from an ASP page?

Like always, I find Microsoft's error messages completely unhelpful for debugging.

Need some advise from someone who actually experienced this type of call and got it to work: What am I missing here?



Started By Terry Young on Sep 1, 2010 at 6:45:14 PM
This message has been edited.

10 Response(s) | Reply

Earlier Replies | Replies 2 to 3 of 10 | Later Replies
Goto Page: 2 1
bod1467 on Sep 2, 2010 at 12:36:11 AM (# 2)

No idea if it matters, but in ASP code I tend to use Server.CreateObject rather than just CreateObject.

And - welcome back. :)


Terry Young on Sep 2, 2010 at 12:59:04 AM (# 3)

Yes, I do realize the CreateObject vs Server.CreateObject fact. Tried both, if it matters. So, unfortunately, that's not related to the issue I'm facing.


Earlier Replies | Replies 2 to 3 of 10 | Later Replies
Goto Page: 2 1

To respond to a discussion, you must first logon.

If you are not registered, please register yourself to become a member of the SiteExperts.community.

User Name
Password
Copyright 1997-2004 InsideDHTML.com, LLC. All rights reserved.