Click here to Skip to main content
15,929,439 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionhow to know which procces['s] have access to a file Pin
combo_ci27-Nov-07 3:46
combo_ci27-Nov-07 3:46 
AnswerRe: how to know which procces['s] have access to a file Pin
Dave Kreskowiak27-Nov-07 5:43
mveDave Kreskowiak27-Nov-07 5:43 
Questionvb.net versus c# problem Pin
cstrader23227-Nov-07 3:36
cstrader23227-Nov-07 3:36 
AnswerRe: vb.net versus c# problem Pin
Dave Kreskowiak27-Nov-07 5:10
mveDave Kreskowiak27-Nov-07 5:10 
GeneralRe: vb.net versus c# problem Pin
cstrader23227-Nov-07 5:35
cstrader23227-Nov-07 5:35 
GeneralRe: vb.net versus c# problem Pin
Dave Kreskowiak27-Nov-07 6:13
mveDave Kreskowiak27-Nov-07 6:13 
GeneralRe: vb.net versus c# problem Pin
cstrader23227-Nov-07 6:56
cstrader23227-Nov-07 6:56 
GeneralRe: vb.net versus c# problem Pin
Dave Kreskowiak27-Nov-07 8:19
mveDave Kreskowiak27-Nov-07 8:19 
OK. I wen't back to what you were doing, and it's not exactly like it is in the code you linked to.

You have two seperate projects, one supplying the class library, the other creating the AppDomain and loading the class library into it.

You have to supply the fully qualified name, including the namespace, to CreateInstanceAndUnwrap. The name of the DLL is also part of the namespace! You're code should look like:
Sub Main
    Dim ad As AppDomain = AppDomain.CreateDomain("New Domain")
    Dim as As Assembly = Reflection.Assembly.LoadFrom("C:\ClassLibrary1.dll")
    Dim remoteCode As Indicator = DirectCast( _
            ad.CreateInstanceAndUnwrap(as.FullName, "ClassLibrary1.Indicators.Indicator"), _
            Indicator)

    Console.WriteLine("Value returned: {0}", remoteCode.Calculate())



A guide to posting questions on CodeProject[^]

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


GeneralRe: vb.net versus c# problem Pin
cstrader23227-Nov-07 12:07
cstrader23227-Nov-07 12:07 
GeneralRe: vb.net versus c# problem Pin
Dave Kreskowiak27-Nov-07 14:32
mveDave Kreskowiak27-Nov-07 14:32 
GeneralRe: vb.net versus c# problem Pin
cstrader23227-Nov-07 14:59
cstrader23227-Nov-07 14:59 
GeneralRe: vb.net versus c# problem Pin
cstrader23227-Nov-07 15:01
cstrader23227-Nov-07 15:01 
GeneralRe: vb.net versus c# problem Pin
Dave Kreskowiak27-Nov-07 15:29
mveDave Kreskowiak27-Nov-07 15:29 
GeneralRe: vb.net versus c# problem Pin
cstrader23227-Nov-07 16:58
cstrader23227-Nov-07 16:58 
GeneralRe: vb.net versus c# problem Pin
cstrader23227-Nov-07 17:22
cstrader23227-Nov-07 17:22 
GeneralRe: vb.net versus c# problem Pin
Dave Kreskowiak28-Nov-07 3:29
mveDave Kreskowiak28-Nov-07 3:29 
GeneralRe: vb.net versus c# problem Pin
Luc Pattyn27-Nov-07 15:35
sitebuilderLuc Pattyn27-Nov-07 15:35 
GeneralRe: vb.net versus c# problem Pin
cstrader23227-Nov-07 17:04
cstrader23227-Nov-07 17:04 
QuestionCode error.Please help..What error is this? Pin
kc_renji27-Nov-07 2:27
kc_renji27-Nov-07 2:27 
AnswerRe: Code error.Please help..What error is this? Pin
pmarfleet27-Nov-07 2:31
pmarfleet27-Nov-07 2:31 
Questionwant to read a field line by line. Pin
kokilaB26-Nov-07 23:59
kokilaB26-Nov-07 23:59 
AnswerRe: want to read a field line by line. Pin
Colin Angus Mackay27-Nov-07 0:09
Colin Angus Mackay27-Nov-07 0:09 
GeneralRe: want to read a field line by line. Pin
kokilaB27-Nov-07 0:21
kokilaB27-Nov-07 0:21 
GeneralRe: want to read a field line by line. Pin
kokilaB27-Nov-07 1:15
kokilaB27-Nov-07 1:15 
Questionlistbox code problem Pin
soniasan26-Nov-07 23:54
soniasan26-Nov-07 23:54 

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.