Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 17th, 2003, 08:43 AM
Registered User
 
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamic Form in Different Application Domian

Hi. We've designed our application to dynamically create and call forms using a Different Application domain. We've almost got it working apart from when i want to run a sub that we created ourself. The reason we are doing this is for the application to first look in the G:\prod\Comp\DLLs folder and if it can't find the DLLs there it will look in eM1\Core\DLLs.

   Dim objDomain As AppDomain

   Dim objEvidence As Security.Policy.Evidence
   Dim strApplicationPath As String

   'Create a new domain and run the programs from there
    objEvidence = AppDomain.CurrentDomain.Evidence
    objDomain = AppDomain.CreateDomain("NewDomain", objEvidence, "G:\", "", False)

    objDomain.AppendPrivatePath("prod\Comp\DLLs")
    objDomain.AppendPrivatePath("eM1\Core\DLLs")

    Dim frmLogin = objDomain.CreateInstanceAndUnwrap("M1Main", "M1Main.frmLogin")

    ' Hide the system picker and show the login form
    Me.Hide()
    frmLogin.setdata(Me)

    CType(frmLogin, Form).Show()

It all works apart from the Line highlighted in red.

If you have any ideas please reply.

Thanks

Matt

 
Old September 17th, 2003, 08:50 AM
Registered User
 
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

sorry i should have mentioned that the error message i get is:

System.MissingMemberException: Public member 'setdata' on type 'MarshalByRefObject' not found.
   at Microsoft.VisualBasic.CompilerServices.LateBinding .InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)
   at Microsoft.VisualBasic.CompilerServices.LateBinding .LateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
   at SystemPicker.frmMain.ClickedConnectButton(Object sender, EventArgs e) in G:\M1.net\Development\Sourcecode\GlobalM1\SystemPi cker\frmMain.vb:line 225






Similar Threads
Thread Thread Starter Forum Replies Last Post
help writing dynamic form data to dynamic table ublend SQL Server ASP 1 June 1st, 2007 08:09 AM
help writing dynamic form data to dynamic table ublend Classic ASP Professional 1 June 1st, 2007 08:08 AM
Probelms with Dynamic table Application Object nancy Dreamweaver (all versions) 1 April 18th, 2005 01:28 PM





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