|
|
Theres generally 2 ways of loading plugins, either into the current AppDomain or in to a new AppDomain.
The only way to unload an assembly is to unload the entire AppDomain, so if you require unloading of plugins you need a new AppDomain. This doesn't come for free however as serialization has to take place on any objects passing over AppDomain boundries and so incures a performance penalty.
If you load into the current AppDomain then things will run at full speed but as you have found you cannot unload the assembly.
If your application rarely changes plugins or is often restarted there is very little to gain from using a seperate AppDomain. And so conversly if the app is long running (and so is vunerable to a build up of assemblies) or has a large number of plugin changes then it might be worth taking the hit to allow cleaning up of the assemblies.
Personally I wouldn't bother about the unloading unless there is a real need for it ... it would be nice but it's not essential and you can always remove the plugins from use, you just can't remove them from memory.
One final note, the seperate AppDomain structure does have one bug advantage when running untrusted plugins. It allows you to place a different set of security restrictions on the code and keep it away from your own code to enhance security and stability. Basically it can be used as a sandbox.
|
|
|
|
|
Hi, does anyone know when Microsoft will stop offering MCSD tests for dotnet 2.0 and replace them with version 3.0? I'm thinking about taking the tests for MCSD, but not sure if I have enough time to study for all of the required tests before they are discontinued. Thank you in advance for your help.
-- modified at 21:52 Tuesday 28th August, 2007
|
|
|
|
|
ASPnoob wrote: does anyone know when Microsoft will stop offering MCSD tests for dotnet 2.0
Nope. The only people who know would be Microsoft. The .NET 2 tests will probably be around for at least a year after the release of Visual Studio 2008, whenever that happens...
|
|
|
|
|
Hi everyone, how long does it take the average person to study and pass the tests? Do you know of a free site that can help me speed up my study? I've been studying version 1.1 but did not finish it, and from what I have experienced it took forever for me to get everything down pat. Part of the problem was I was studying on my own, when I get stuck on something it takes a while to find the answer. I just want to get the MCSD under my belt as soon as I can, then try to get experience afterwards. Thanks for responding.
|
|
|
|
|
ASPnoob wrote: just want to get the MCSD under my belt as soon as I can, then try to get experience afterwards
The fact that this is possible is one of the many reasons that these tests are useless.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I don't know of any free sites, nor practice tests that are any good. Remember, you get what you pay for.
ASPnoob wrote: I just want to get the MCSD under my belt as soon as I can, then try to get experience afterwards.
This is why I don't bother with certifications. Too many "paper-pros" out there who can prove they passed the tests, but couldn't code their way out of a wet paper bag.
|
|
|
|
|
I understand where you are coming from Dave and Christian, but I'm not looking to go sell my ability as soon as I get certified. I just want to have it so that I can build up my skills afterwards without worrying about the tests for the version that I have studied for not being there when I'm ready to take them. I understand that there are people out there who misused the certification and degrade the values of the certification. How did you build your skills? I'm sure there was a time when you were as new to this thing as I am. What do you suggest I do to get real life experience? Any suggestions will be appreciated.
-- modified at 4:03 Wednesday 29th August, 2007
|
|
|
|
|
But, the test is *useless*. Just focus on getting the skills.
ASPnoob wrote: How did you build your skills?
Writing code. Downloading articles and making changes to the code to see what it did. Asking questions, and taking every answer and researching it until I understood why it worked. Buying books and reading them.
ASPnoob wrote: What do you suggest I do to get really life experience?
Imagine a system that, if you had built it, would have increased your skills in an area you care about, then do all of the above in the process of writing it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
When using a panel, I have enough on there that causes the scrollbar to show. the scrolling of this control is slow and causes ugly painting or is jumpy...
I tried the following in the Scroll Event to make the painting smoother...
- application.doevents
- me.refresh
- me.invalidate
- control.refresh
- control.invalidate
all improve but not one makes it "perfect"
anything else that can cause a faster paint of the screen?
Thanks...
Nathan
|
|
|
|
|
Can you tell more about the Panel's content: Controls (which? how many?),
direct drawing in OnPaint (show code!). Do you need to do CreateGraphics?
Do you create a lot of objects while painting, things you could reuse?
And the ones you don't reuse, do you Dispose() of them?
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I have at most 3 user controls on the panel. Each user control is made up of about 30 controls. creategraphics --> not sure how that would apply.
dispose --> haven't removed anything.
|
|
|
|
|
Hi,
I have no experience with scrolling UserControls, I would not be surprised
if that turns out to be somewhat slow.
I tend to do complex stuff in a lightweight fashion, i.e. by drawing directly
onto the Panel, without any added Controls. It is not the easiest way, but
it gives full control on what gets done how and when, hence also maximum
performance. So if the UserControls are three instances of the same class,
I would consider to redo that class without using any internal Controls.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I'm not surprised it's slow. You're painting 93 controls, plus the panel on every scroll movement. I don't know why you need all these PictureBox controls (BTW: It's the most abused control by new programmers). Painting everything yourself on the Panel control, or some other container control that you write would give you FAR better performance.
|
|
|
|
|
Dave Kreskowiak wrote: (BTW: It's the most abused control by new programmers).
Amen, and half of them expect it to be Paint or Powerpoint....
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
In this code...There are 3 user controls(sections) Each section has a groupbox that contains a number of radio buttons and labels, a combobox, and a button. The requirement is to have a user preference kind of thing where the user can reorder the sections, remove, add etc. I had to put all 3 on a panel because the form has a toolbar and a statusbar and I need those controls to be scrollable without effecting the toolbar or statusbar. putting me.invalidate helped dramatically but it still is jumpy.
by you saying "painting everything yourself"...never have done this. how do you handle that?
thanks.
|
|
|
|
|
nlarson11 wrote: by you saying "painting everything yourself"...never have done this. how do you handle that?
I thought you were doing what most newbies do when putting a game together. Using PictureBox controls for tiles and sprites. You can't find a more inefficient method of doing a game.
Simply put, putting 100 controls on a form is not going to paint smoothly, no matter what you do. You can get a bit of an improvement by turning on double-buffering on the form, maybe even if you did it on the Panel control, but don't expect much. It's still going to be jumpy because of the shear number of controls.
|
|
|
|
|
hi i m working on a billing system.i am getting problem for the main billing page.i have given space for customer name.invoice no,date and two check boxes.1)wholsale rate and 2)normal rate.then i have given a list view to see what items he selected.there are two combo boxes 1)select product 2)Qty.
i want that when i select an item its details should automatically be entered in the list view.and after entering the qty total amount should be calculate.
but the problem i am facing is that its not entering the data in the list view.
plz help
|
|
|
|
|
You haven't provided any useful deatils about how your code works. From where is the ListView supposed to be filled?? Some database? Is it supposed to be filled in upon the click of something? ...? ...? You haven't told anything we can use to tell you what's wrong. Not even a code snippet...
|
|
|
|
|
I am cleaning my code (going through making comments and trying to see if there is a better way of doing things) and wanted to know if anyone could answer this.
In parts of my code I am reading from a file and need to temporarily save the data. Currently I have created some Structures. Is this the best practice or would it be better to do arrays or something else. The reason I picked Structures is because in my code I can easily see that str.Ticket means ticket. If I do an array like arrayString(4) does not tell me what I am grabbing.
Any comments? Thank you.
|
|
|
|
|
Cory Kimble wrote: In parts of my code I am reading from a file and need to temporarily save the data. Currently I have created some Structures. Is this the best practice or would it be better to do arrays or something else. The reason I picked Structures is because in my code I can easily see that str.Ticket means ticket. If I do an array like arrayString(4) does not tell me what I am grabbing.
I would have gone with a class and created a custom object to do this (easier to serialize the data, etc), but structure will do it trick too. Are you mainly worried about your application speed / performance or more worried about good coding practices?
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Both speed Perfomance and practices.
|
|
|
|
|
Cory Kimble wrote: Both speed Perfomance and practices.
In terms of speed I would say an array would probably be the fastest. In terms of best practices, the prefered way would probably be to create an object for it.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Hi Cory,
Definitely classes and structures, and not heterogenous arrays.
The difference in performance would be only a couple of percent,
the difference in code readability is tremendous.
Once you have defined your classes/structures, if you need many of them.
put them together in either collections or arrays, depending on what kind
of operations you need. If arrays, these would be homogeneous arrays
(each element of the array has the same meaning).
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi every one,
I am developing a windows application which needs word and visio application to be embedded on to a form. I am using DSOFramer Active-X control to do the above.
My application reads data from the database (a BLOB Field - that contains the word or visio document) and creates a temporary file in the local directory and then opens that file using DSOFramer control. (http://support.microsoft.com/kb/311765)
All the manipulations are stored on the same temporary file and update the file contents on to that database (as BLOB).
It works fine most of the time but some times while saving the word document it through an exception - "the target of an invocation"
Inner Exception -System.Runtime.InteropServices.COMException (0x80030021): A lock violation has occurred.
This exception occurs while saving the document.
There is an even provided by DSOFramer control – ‘OnSaveCompleted’ which occurs on save completion.
After the file saved, I am opening the temporary file using IO.FileStream and reading the contents to byte() and updating the database with new binary data(BLOB Field)
I hope this explains wat I am trying to do.
Please could any one tell me where I am going wrong.
Thanks in advance
chirantan
|
|
|
|