Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Components
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB Components Issues specific to components in VB.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Components section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 5th, 2006, 02:44 PM
Registered User
 
Join Date: Mar 2006
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to jdrake3
Default Error 48 Early Binding

Late binding my dll is not currently an option for me, so please do not just reply with "Use Late Binding", or any of the million plus links to MSKB or thread post proclaiming this advice.

This is an application that runs fine on Windows 2000. When running on Windows 2003 for the App server and Windows XP for the Client I am receiving Error 48 when trying to instantiate a dll that is installed on the Client using a proxy exported from the App server.

There are no event log messages, on the client or the server, and this is not likely a permission issue, since I the object can be instantiated late bound.

Thanks,
Joshua

Reply With Quote
  #2 (permalink)  
Old May 9th, 2006, 02:34 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

error 48 is about standard dll (like API's, no ActiveX), see:http://msdn2.microsoft.com/en-us/library/2c4wchf4.aspx

so I do not understand how you can instantiate it, either early or late bound. Can you be more specific?

Marco
Reply With Quote
  #3 (permalink)  
Old April 18th, 2007, 11:00 AM
Registered User
 
Join Date: Mar 2006
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to jdrake3
Default

Quote:
quote:Originally posted by marcostraf
 error 48 is about standard dll (like API's, no ActiveX), see:http://msdn2.microsoft.com/en-us/library/2c4wchf4.aspx

so I do not understand how you can instantiate it, either early or late bound. Can you be more specific?

Marco
CreateObject("Foo.Bar") works. Dim Baz As Foo.Bar does not.

Reply With Quote
  #4 (permalink)  
Old April 18th, 2007, 01:41 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I wish when people post about errors they would post the [u]text</u> of the message, rather than just the number . . . *sigh*

My guess, given the limited data so far, would be that you need to add a reference to the item containing Foo.Bar.

CreateObject(...) looks in the registry for the class by name, and finds the executable through the info about it contained therein. Dim <var> As . . . format uses references that the app has specific knowledge of. (As I recall, anyway . . . )
Reply With Quote
  #5 (permalink)  
Old April 20th, 2007, 04:55 PM
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well... the reference must be there or the code will not compile using the "Dim As" mechanism. But just because the reference is there doesn't mean the dll still exists.

However, as Marco has mentioned, this is the error you get when you are working with a library dll like Kernel32.dll, and not ActiveX dlls.

However - it is not specifically stated, so I am asking directly: Is the dll running in COM+ on the server machine? You state you have exported the proxy, so I assume you have exported the proxy using COM+. Is this correct? If you have done that, I must assume you have installed the proxy into COM+ on your client machine. Is this correct?

When you use "Dim Baz As Foo.Bar" how are you instantiating the object? Set Baz = New Foo.Bar?

When you say CreateObject("Foo.Bar") works, what do you mean by "works". Is it that all the functionality and all the method calls are working when you do this? Do you have methods that allow you to test and prove that the DLL is running on the server machine? Does it work using CreateObject using the COM+ proxy with the code running on the remote server? etc....

You are leaving out a lot of information if you expect anyone to be able to help you out.

Things like... what code is in the line code that causes the error? The "Dim" statement can't cause a runtime error - it isn't a line of code. It is just a declaration.

There could be a number of causes for this error.

Woody Z
http://www.learntoprogramnow.com
How to use a forum to help solve problems
Reply With Quote
  #6 (permalink)  
Old September 14th, 2007, 03:49 PM
Registered User
 
Join Date: Mar 2006
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to jdrake3
Default

Quote:
quote:Originally posted by woodyz
 Well... the reference must be there or the code will not compile using the "Dim As" mechanism. But just because the reference is there doesn't mean the dll still exists.

However, as Marco has mentioned, this is the error you get when you are working with a library dll like Kernel32.dll, and not ActiveX dlls.
Although it is possible that the dll relies on Windows calls this dll was created in VB.

Quote:
quote:
However - it is not specifically stated, so I am asking directly: Is the dll running in COM+ on the server machine? You state you have exported the proxy, so I assume you have exported the proxy using COM+. Is this correct? If you have done that, I must assume you have installed the proxy into COM+ on your client machine. Is this correct?
The dll is installed in a COM+ Package on the Application Server, and a Proxy is being exported from COM+

Quote:
quote:
When you use "Dim Baz As Foo.Bar" how are you instantiating the object? Set Baz = New Foo.Bar?

When you say CreateObject("Foo.Bar") works, what do you mean by "works". Is it that all the functionality and all the method calls are working when you do this? Do you have methods that allow you to test and prove that the DLL is running on the server machine? Does it work using CreateObject using the COM+ proxy with the code running on the remote server? etc....
To the first question, if I recall, still using CreateObject("Foo.Bar"). To the second yes, the client says "Object Created" and I can see the Component spin in COM+ on the App Server.

Quote:
quote:
You are leaving out a lot of information if you expect anyone to be able to help you out.

Things like... what code is in the line code that causes the error? The "Dim" statement can't cause a runtime error - it isn't a line of code. It is just a declaration.

There could be a number of causes for this error.
Sorry, the context in my head often overshadows the typing of my fingers. Sorry my reply took so long. I actually found this post again because I'm getting Error 48 again.

Reply With Quote
  #7 (permalink)  
Old September 14th, 2007, 04:41 PM
Registered User
 
Join Date: Mar 2006
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to jdrake3
Default

So it appears that you both hit it on the head. The issue was with the MDAC version on the machines. Thank you for your help.

Reply With Quote
  #8 (permalink)  
Old September 27th, 2007, 03:27 PM
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Cool. Glad you found the problem!

Woody Z
http://www.learntoprogramnow.com
How to use a forum to help solve problems
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Session variable expires early BananaJim Classic ASP Professional 0 May 14th, 2007 05:58 AM
missing DLL error (48) Loralee Access 0 December 18th, 2005 03:39 PM
early Adopter VoiceXML wizzard All Other Wrox Books 1 August 27th, 2003 10:21 AM



All times are GMT -4. The time now is 08:18 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.