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

10 Response(s) | Reply

View All Replies | Goto Page: 2 1
Terry Young on Sep 21, 2010 at 7:06:55 AM

Thanks for your attempts. Unfortunately, I'm still stuck in this deep pile of Microsoft dung.

OK. For some unknown reason, putting the VC++ DLLs into system32 "seems" to work. But I'm seeing initial results or returned values that just doesn't add up (Long story, specific to what I have in hand, which I'll skip here) And I do not want them to be in system32. I just can't believe there are no alternatives.

And, setting PATH won't work, that hasn't change.

What shocks me is I can't Google this one up, not even examples or tutorials,... nothing. I never believed there would be such a day where I have spent days and nights trying to search this damn thing and end up with absolutely nothing. I just cannot believe I am the only one trying to do this without getting system32 involved.

I damn myself for not being a C++ coder, but that's the current fact, otherwise, I just couldn't accept defeat.

I can't believe there's not even one article or example out there that demonstrates this.

~sigh~ ~rant over~ ~for now~


View All 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-2000 InsideDHTML.com, LLC. All rights reserved.