Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7993619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:54:27+00:00 2026-06-04T13:54:27+00:00

i have a advanced question which is related to remoting dlls in MEMORY. i

  • 0

i have a advanced question which is related to remoting dlls in MEMORY. i have wcf service that take Dlls(Starter.DLL entryType) Also there is a Process dll which is referenced to wpf application . i have some steps:

1) wcf takes Dlls (add to stream memory..)

2) Process dll read from wcf

3) Process dll adds dll to currentdomain


 foreach (byte[] binary in deCompressBinaries)
                        {
                            AppDomain.CurrentDomain.Load(binary);
                        }

4) wpf accesses Process’ CreateApplication method


  this._btnStartApp.Click += (s, args) => 
            {
               Process appMngr = new Process ();
                appMngr.CreateApplication();
            };

CreateApplication method :


  object obj = appLoader.CreateInstance(appLoader.EntryType);
            MethodInfo minfo = obj.GetType().GetMethod("Execute", BindingFlags.Instance | BindingFlags.Public | BindingFlags.CreateInstance);

but i can not see Execute method in getMethos result, if QuickWatching,How to run Execute method in another currentdomain ? this Dlls are adding Process Dll’s currewntdomain not wpf currentdomain.

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T13:54:28+00:00Added an answer on June 4, 2026 at 1:54 pm

    AppDomains are tricky to work with then dynamicly loading DLLs.

    First; if you cannot see the method then verify you can get the type of the object. If you can see the type the object should be laoded into the current domain. Then you can itterate over the methods and inspect those to see if something is missmatched with the GetMethod call, wich could make it fail to show up. The CreateInstance flag might be the issue, I beleive that one is used for constructors.

    Second; If you want things to run in a seperate appdomain (very important when you want to unload the dll later) then you have to build 3 things.

    1. create a set of classes that can handle all the loading and execution of the of the dynamic DLL.

    2. create an interface that allows your main code to talk to this set of classes; this iterface cannot return any types that came from the dynamic DLL; if it does you either laod that DLL or you crash. I recall marshal by ref may be needed, but uncertain, it has been a while.

    3. Attach event handlers to your main Appdomain that notify you when you load a DLL into that appdomain. This will be how you can debug if you are inadvertidly loading the DLL into your current AppDomain.
      http://msdn.microsoft.com/library/system.appdomain.assemblyload.aspx

    Now you can create a new Appdomain, call your loading code in there and get results trough the interface. If you can complete the call and you had no load events trigered you got it working. you can dispaose of the AppDomain when you are done and the loaded DLL goes along with it.

    Good luck, this was tricky to figure out and get working correctly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have an advanced search page that searches a number of fields in
I have a reasonably advanced (many patches and subpatches) quartz composition that was created
I see some related questions have been asked, but they're either too advanced for
I have two questions related to function objects and function pointers, Question : 1
This question is related to this other one . In my program (which uses
I have a problem which I think is related to forward declarations, but perhaps
Ok guys, this question is related to my previous one. If I have set
Actually I have two question related to storyboard, Whether I can reuse my xib
This is a very noobish question, so I apologize in advance! I have two
I have 2 advanced data grids, one above the other. They both have the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.