Click here to Skip to main content
15,911,848 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to create a VB6 .dll object without having the .dll added as a reference? Pin
Dave Kreskowiak16-Dec-08 13:28
mveDave Kreskowiak16-Dec-08 13:28 
GeneralRe: How to create a VB6 .dll object without having the .dll added as a reference? Pin
astanton197816-Dec-08 3:23
astanton197816-Dec-08 3:23 
GeneralRe: How to create a VB6 .dll object without having the .dll added as a reference? Pin
Jon_Boy16-Dec-08 5:17
Jon_Boy16-Dec-08 5:17 
GeneralRe: How to create a VB6 .dll object without having the .dll added as a reference? Pin
Dave Kreskowiak16-Dec-08 13:33
mveDave Kreskowiak16-Dec-08 13:33 
GeneralRe: How to create a VB6 .dll object without having the .dll added as a reference? Pin
astanton197817-Dec-08 3:31
astanton197817-Dec-08 3:31 
GeneralRe: How to create a VB6 .dll object without having the .dll added as a reference? Pin
Dave Kreskowiak17-Dec-08 12:32
mveDave Kreskowiak17-Dec-08 12:32 
GeneralRe: How to create a VB6 .dll object without having the .dll added as a reference? Pin
astanton197818-Dec-08 4:30
astanton197818-Dec-08 4:30 
AnswerRe: How to create a VB6 .dll object without having the .dll added as a reference? Pin
Dave Kreskowiak15-Dec-08 8:39
mveDave Kreskowiak15-Dec-08 8:39 
It's possible using Reflection, but I highly recommend against it. Since you'll have no early binding, just writing the code will consists of constantly using Reflection to discover and call all the methods in the thing. You also lose all type checking at compile and runtime, and no Intellisense while in the IDE. A nightmare to say the least.

As for actually instantiating a COM-based object, you can do something like this:
Dim comType As Type = Type.GetTypeFromProgID("Scripting.FileSystemObject")
Dim comObject As Object = Activator.CreateInstance(comType)

This does not work unless the .DLL is regsitered properly. You cannot load it directly from the .DLL.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




GeneralRe: How to create a VB6 .dll object without having the .dll added as a reference? Pin
Jon_Boy15-Dec-08 8:57
Jon_Boy15-Dec-08 8:57 
QuestionSerialization Over A Network Stream Pin
Ryan Fleming15-Dec-08 3:34
Ryan Fleming15-Dec-08 3:34 
AnswerRe: Serialization Over A Network Stream Pin
Dave Kreskowiak15-Dec-08 9:17
mveDave Kreskowiak15-Dec-08 9:17 
QuestionXML Node count Pin
Shazz Rock14-Dec-08 23:30
Shazz Rock14-Dec-08 23:30 
AnswerRe: XML Node count Pin
astanton197815-Dec-08 8:15
astanton197815-Dec-08 8:15 
GeneralRe: XML Node count Pin
Shazz Rock16-Dec-08 20:58
Shazz Rock16-Dec-08 20:58 
GeneralRe: XML Node count Pin
astanton197817-Dec-08 3:25
astanton197817-Dec-08 3:25 
QuestionAbout API call Pin
Nanda_MR14-Dec-08 21:46
Nanda_MR14-Dec-08 21:46 
AnswerRe: About API call PinPopular
Christian Graus14-Dec-08 21:48
protectorChristian Graus14-Dec-08 21:48 
GeneralRe: About API call Pin
Nanda_MR14-Dec-08 22:29
Nanda_MR14-Dec-08 22:29 
GeneralRe: About API call Pin
Christian Graus14-Dec-08 22:55
protectorChristian Graus14-Dec-08 22:55 
GeneralRe: About API call Pin
dan!sh 14-Dec-08 23:35
professional dan!sh 14-Dec-08 23:35 
GeneralRe: About API call Pin
Christian Graus15-Dec-08 10:09
protectorChristian Graus15-Dec-08 10:09 
GeneralRe: About API call Pin
Colin Angus Mackay14-Dec-08 23:10
Colin Angus Mackay14-Dec-08 23:10 
GeneralRe: About API call Pin
Christian Graus15-Dec-08 10:10
protectorChristian Graus15-Dec-08 10:10 
GeneralRe: About API call Pin
Luc Pattyn15-Dec-08 1:29
sitebuilderLuc Pattyn15-Dec-08 1:29 
QuestionAPI call from VB.net Pin
hribek2514-Dec-08 21:37
hribek2514-Dec-08 21:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.