DLL in VB

Whether The DLL developed in VB requires VB runtime files? Why?
sanjusambheAsked:
Who is Participating?
 
SilentExpertConnect With a Mentor Commented:
The dll that one typically creates using Visual Basic (5,6) is actually a an ActiveX component. All of the com instantiation code, as well as any of the intrisic functions of the VB language you might use (e.g. functions such as Instr for instance) is all contained within the VB runtime.

There are some interesting caveats however - first, most machines have some flavour of Visual Basic Runtime on them, typically 6 as it is included with a bevy of MS products. You might be able to technically 'get away' with simply registering a dll on a PC with a more recent operating system or software library installed on it, *but*, if it were not there your dll would fail in dramatic fashion and you have no way of checking.

Second, there are some third party products that allow you to do some crazy stuff with VB such as combine C or asm code and create 'standard' (meaning non-registered) windows dlls. TweakVB is one such example. With TweakVB is technically possible to create a windows DLL using VB that did not use the VB runtime, but it would be tricky as one false step (such as creating some com object in code that the dll itself might need) would try to access the VB runtime. But it could be done.

http://www.tweakvb.com
0
 
cookreCommented:
Yes, because it too will, in all likelihood, make external library calls.
0
 
guidwayCommented:
For one, you need to have the latest runtime installed if you make any API calls from the dll since some features you could call may not reside on earlier systems and the user would get an error.
0
 
guidwayCommented:
sorry cookre, your post wasn't there when I started. :-)
0
 
cookreCommented:
Shoot, I do it all the time.  I start mashing keys, stop to look up something, take a phone call, then 20 minutes later hit submit and find 3 other posts.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.