Managed Extensibility Framework ForumDiscuss the Managed Extensibility Framework (MEF), a set of building blocks that includes dependency injection (DI), structural matching (duck typing) and a naming and activation service for developing extensible and dynamic applications.© 2009 Microsoft Corporation. All rights reserved.Wed, 25 Nov 2009 08:55:06 Zccdfce7e-74f3-402b-a636-a7548faf29d3http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/6aa1687a-7130-4b42-b60f-7a2eb87581d6http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/6aa1687a-7130-4b42-b60f-7a2eb87581d6Fabrizio Chelohttp://social.msdn.microsoft.com/Profile/en-US/?user=Fabrizio%20CheloDTE and VS Express EditionsGood morning to everyone.<br/>Is there a way to make run the following code (or a similar one) in Express environment?<br/><br/>Type type = Type.GetTypeFromProgID(&quot;VisualStudio.DTE.9.0&quot;);<br/>DTE2 dte = (DTE2)Activator.CreateInstance(type);<br/><br/>We need this to make some design time processing on a web service (e.g.: rebuild the project file for redirecting web service and its web references to another host).<br/>We have an application that works in a workstation with VS TS on board and it should be good if it can run with an Express Environment.<br/>Thanks in advance.Wed, 25 Nov 2009 08:55:05 Z2009-11-25T08:55:06Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/9316640b-db3c-47c8-9dc4-48bec8f976c8http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/9316640b-db3c-47c8-9dc4-48bec8f976c8Prem Kumar Krishnanhttp://social.msdn.microsoft.com/Profile/en-US/?user=Prem%20Kumar%20KrishnanWord automationI want to create a word report using a predefined word template. In the predefined template i want to insert a dynamically generated images, datas, charts,graphs and shapes. <br/> <br/> I want to know where i can download the tutorials and send me some usefull links.<br/> <br/> <br/>Fri, 20 Nov 2009 09:10:02 Z2009-11-24T10:56:55Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/f3f2b338-26dc-4f71-bb39-31d0161f55aahttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/f3f2b338-26dc-4f71-bb39-31d0161f55aaolhappybhttp://social.msdn.microsoft.com/Profile/en-US/?user=olhappybhow many net frameworks do you need and can the others behow many net frameworks do you need i have 1.1 2.0 service pack 2, 3.<br/>0 service pack 2 3.5 sp1.  and how can i reinstall office home 2007 studentWed, 11 Nov 2009 19:31:59 Z2009-11-11T19:32:00Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/10a7c839-8307-411a-8a87-b295f155cf8dhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/10a7c839-8307-411a-8a87-b295f155cf8dfloriszwarteveenhttp://social.msdn.microsoft.com/Profile/en-US/?user=floriszwarteveenOSGI SupportIs Microsoft planning for OSGi support or not. I can see the issue has been mentioned in another question but I can not find any statement from Microsoft what they will do in the near future. I am very interested whether Microsoft will offer OSGi support or if they are planning to invest in building OSGi support in either MEF or for example Unity.Wed, 04 Nov 2009 22:17:44 Z2009-11-06T20:04:44Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/b6471447-5b78-4bc1-9057-aec8718928c1http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/b6471447-5b78-4bc1-9057-aec8718928c1Rodion Melnichenkohttp://social.msdn.microsoft.com/Profile/en-US/?user=Rodion%20MelnichenkoImportant question to professionals about MVCHello, All,<br/><br/>I am new in MVC but it look strange for me in comparisone with ASP.NET.<br/>Maybe my question is stupid and does not contain any sence but:<br/><br/>Here is an example of markup from standard MVC example (I think all of you know it).<br/><br/> <pre lang=x-aspx>&lt;% foreach (var item in Model) { %&gt; &lt;tr&gt; &lt;td&gt; &lt;%= Html.ActionLink(&quot;Edit&quot;, &quot;Edit&quot;, new { id=item.DinnerId }) %&gt; | &lt;%= Html.ActionLink(&quot;Details&quot;, &quot;Details&quot;, new { id=item.DinnerId })%&gt; &lt;/td&gt; &lt;td&gt; &lt;%= Html.Encode(item.DinnerId) %&gt; &lt;/td&gt; &lt;td&gt; &lt;%= Html.Encode(item.Title) %&gt; &lt;/td&gt; &lt;td&gt; &lt;%= Html.Encode(String.Format(&quot;{0:g}&quot;, item.EventDate)) %&gt; &lt;/td&gt; &lt;td&gt; &lt;%= Html.Encode(item.Description) %&gt; &lt;/td&gt; &lt;td&gt; &lt;%= Html.Encode(item.HostedBy) %&gt; &lt;/td&gt; &lt;/tr&gt; &lt;% } %&gt; </pre> <p>Why &lt;asp:Repeater /&gt; was not used here?</p> <p>Is it a proper and good way to show data in MVC?</p> <p>If so, please describe me why.</p> <p> </p> <p>Thank you in advance.</p>Tue, 20 Oct 2009 07:24:23 Z2009-11-01T03:46:58Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/db2e0c88-9d3d-4e84-8f9a-26c9280bec95http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/db2e0c88-9d3d-4e84-8f9a-26c9280bec95tomer70http://social.msdn.microsoft.com/Profile/en-US/?user=tomer70MEF or Prism?<br/> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Times New Roman;font-size:small">For our next application I wonder which should I use MEF or Prism</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Times New Roman;font-size:small">(Composite Application for WPF)<br/></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt;tab-stops:right 432.0pt"><span style="font-size:small"><span style="font-family:Times New Roman">The application is an extensible shell which should be used by our 3 different applications.<br/><span style=""><br/>Thanks in advance.<br/>           </span></span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Times New Roman;font-size:small"> </span></p>Fri, 23 Oct 2009 08:54:43 Z2009-10-30T08:28:44Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/1d446930-c243-48fd-9615-e03034ccdcdahttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/1d446930-c243-48fd-9615-e03034ccdcdasaxisahttp://social.msdn.microsoft.com/Profile/en-US/?user=saxisaPassing data with MEF questionIf I am using MEF, what is the correct way to pass data between assemblies?  For example, in my Application assembly, I pull a string array of data from a 3rd party UI package.  I need to then pass this string array to other classes in other assemblies.<br/> <br/> I have been focused mostly on using methods to pass data around, but there doesnt seem to be any way to implement a 'GetDataArray()' method (with no parameters) in the App assembly, and compose it against a method in a different assembly.  At least I havent succeeded in composition.<br/> <br/> But usually when I run into these kinds of problems, it means Im taking the wrong approach.  Is there, then a more correct way to pass data between assemblies?  A service perhaps?  Not very clear on how to implement something like this so any hints are appreciated!Mon, 26 Oct 2009 21:08:26 Z2009-11-18T22:33:49Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/84dbc5d1-544e-433b-93ef-f7f9d48e5a84http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/84dbc5d1-544e-433b-93ef-f7f9d48e5a84Ksujihttp://social.msdn.microsoft.com/Profile/en-US/?user=KsujiHow to make the Ajax Calendar Extender in a fixed position when a user scrolls down the page?<p>Hi, <br/><br/>In my screen, im using the AJAX Calendar Extender. In that, I'm facing a problem in my page, while scrolling down the page using mouse, the calendar control is also coming down as per the mouse scrolls. I just want to make the calendar control to b fixed or invisible when the users scrolls down the page.<br/><br/>Can any one help me in this regard?<br/><br/>Thanks.</p>Mon, 26 Oct 2009 13:09:59 Z2009-10-26T13:10:00Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/d9199d8c-addf-4205-a2f3-c4faf35b59f2http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/d9199d8c-addf-4205-a2f3-c4faf35b59f2Ksujihttp://social.msdn.microsoft.com/Profile/en-US/?user=KsujiHow to make AjaxCalendarExtender to be invisible on a scrollable window?<p>Hi, <br/><br/>In my screen, im using the AJAX Calendar Extender. In that, I'm facing a problem in my page, while scrolling down the page using mouse, the calendar control is also coming down as per the mouse scrolls. I just want to make the calendar control to b fixed or invisible when the users scrolls down the page.<br/><br/>Can any one help me in this regard?<br/><br/>Thanks.</p>Mon, 26 Oct 2009 12:55:23 Z2009-10-26T12:55:24Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/47fa876c-8693-4355-93e4-18fec5ce8efahttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/47fa876c-8693-4355-93e4-18fec5ce8efaRiana Rambonimananahttp://social.msdn.microsoft.com/Profile/en-US/?user=Riana%20RambonimananaDo MEF support WPF elements composition?Hi,<br/> <br/> <br/> I discovered MEF one hour ago and it seems that this Framework interest me a lot to program a plugin based application. <br/> However, I have some questions about it and I will be really glad if someone, who knows MEF, give me some answers.<br/> <br/> 1- Do each Plugin or Part can be configurable independently ?  I mean, is it possible to associate an &quot;App.Config&quot; file for each Plugin so that each one can be configurable independently ?<br/> 2- Do MEF allow WPF controls composition ? Suppose I have a plugin A and a plugin B. In each one I have a WPF component, a Panel in the plugin A and a Button in plugin B. I'd like to know if my Button in the plugin B can be added to my Panel in plugin A. In fact, I'd like to reproduce the Composite Application Library behavior with MEF. Is that possible?<br/> <br/> Thanks<br/> <br/> RianaThu, 11 Jun 2009 21:02:48 Z2009-10-25T15:28:38Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/221765f8-4c93-47da-8a95-9ed0e4fa83ebhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/221765f8-4c93-47da-8a95-9ed0e4fa83ebsaxisahttp://social.msdn.microsoft.com/Profile/en-US/?user=saxisaAdding new assembly to catalog?Right now I have something like this:<br/> var catalog = new AggregateCatalog();<br/> var assemblyCatalog = new AssemblyCatalog(Assembly.GetExecutingAssembly());<br/> catalog.Catalogs.Add(assemblyCatalog);<br/> <br/> But to add a new project assembly, is the only way to do something like this?<br/> catalog.Catalogs.Add(System.Reflection.Assembly.GetAssembly(typeof(MyProject.MyClass)));<br/> <br/> Seems fragile, what if I delete MyClass?  Is there a better way?Tue, 20 Oct 2009 19:57:41 Z2009-10-20T20:24:41Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/26362424-ee46-4c97-8289-9740af0f116chttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/26362424-ee46-4c97-8289-9740af0f116csaxisahttp://social.msdn.microsoft.com/Profile/en-US/?user=saxisaStill can't import an exported property?Very odd.&nbsp; Everything else works.&nbsp; My MainView gets called by App.xaml.cs, and is part of a composed batch.&nbsp; MainView imports MainViewModel, which in turn does an ImportMany on other models, such as DatabaseLoginModel.&nbsp; So in MainViewModel I have this:<br /><br />[ImportMany("CentralModel")]<br />private Lazy&lt;ViewModelBase, ICentralViewMetaData&gt;[] views = null;<br /><br />views, then, does indeed contain the models I want, which get displayed just fine.<br /><br />But this property, in MainViewModel:<br />[Export("SetActiveView")]<br />public string SetActiveView<br />{<br />&nbsp;&nbsp;&nbsp; set { _av = value; }<br />&nbsp;&nbsp;&nbsp; get { return _av; }<br />}<br /><br />Is still not being properly imported in DatabaseViewModel:<br />[Import("SetActiveView")]<br />public string SetActiveView { get; set; }<br /><br />Is it possibly because of the Lazy ImportMany of DatabseViewModel? <br /><br />What else could it be?&nbsp; As far as I can tell, all the right viewmodels are being created by MEF correctly, but I still cant inject a property.Mon, 12 Oct 2009 17:42:40 Z2009-10-12T20:31:15Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/fbeef2a6-aaeb-48fe-a2a0-c14061044f0bhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/fbeef2a6-aaeb-48fe-a2a0-c14061044f0bsaxisahttp://social.msdn.microsoft.com/Profile/en-US/?user=saxisaWhy can't I Export/Import a property?<p>I have a property in MainViewModel.cs:<br /><br />[Export("ActiveView", typeof(ViewModelBase))]<br />public ViewModelBase ActiveView<br />{<br />&nbsp;&nbsp;&nbsp; get { return _activeView; }<br />&nbsp;&nbsp;&nbsp; private set<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (value == _activeView)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _activeView = value;</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (_activeView != null)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _activeView.IsCurrentPage = true;</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.OnPropertyChanged(_activeView.ToString());<br />&nbsp;&nbsp;&nbsp; }<br />}<br /><br />And DatabasLoginModel class has [Import] on ActiveView:<br />[Import("ActiveView")]<br />public ViewModelBase ActiveView { get; set; }<br /><br />This is pretty much the same syntax as another export/import Im using for MainWindow (a la the MEFLook example) which works just fine.&nbsp; The MEF document pages show export/import of properties pretty much just like this.<br /><br />But in DatabaseLoginModel, ActiveView is null.&nbsp; I would have thought that it was supposed to basically reflect what MainViewModel ActiveView was, and even fire the appropriate notifications if I set it in DatabaseViewModel?<br /><br />What am I doing wrong?</p>Thu, 08 Oct 2009 18:15:04 Z2009-10-08T20:53:21Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/66bfb368-91cb-436b-b1d5-a3ca94517d61http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/66bfb368-91cb-436b-b1d5-a3ca94517d61VS2009http://social.msdn.microsoft.com/Profile/en-US/?user=VS2009C# and C++ communication<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: black; font-family: Verdana;">Container (written in C#) provides all the basic functionality (connects to database, sends order to exchange, subscribes market data etc). </span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: black; font-family: Verdana;">&nbsp;</span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: black; font-family: Verdana;">Service (written in C++) would use this container. </span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: black; font-family: Verdana;">&nbsp;</span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: black; font-family: Verdana;">One interface has been implemented in container with this functionality </span><span style="font-size: 8pt; font-family: Verdana; mso-fareast-font-family: Dotum; mso-bidi-font-family: Arial;">(event callbacks, sending orders, sending alerts, liveness) and it&rsquo;s used by service.</span><span style="font-size: 8pt; color: black; font-family: Verdana;"> </span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: black; font-family: Verdana;">&nbsp;</span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: black; font-family: Verdana;">Both service and container are running on different process. </span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: black; font-family: Verdana;">&nbsp;</span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: black; font-family: Verdana;">Communication: Service will send request to container to provide some data. Container has to call the callback function with data.</span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: black; font-family: Verdana;">&nbsp;</span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: black; font-family: Verdana;">How should service communicate to container? How does container send the callback to service as both are running on different process? </span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: black; font-family: Verdana;">&nbsp;</span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: black; font-family: Verdana;"><span style="mso-spacerun: yes;">&nbsp;</span></span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: black; font-family: Verdana;">&nbsp;</span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: black; font-family: Verdana;">&nbsp;</span></p> <p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="font-size: 8pt; color: black; font-family: Verdana;">&nbsp;</span></p>Thu, 08 Oct 2009 02:22:04 Z2009-10-08T02:22:04Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/c466ce23-853e-433e-8b88-e794476374b1http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/c466ce23-853e-433e-8b88-e794476374b1saxisahttp://social.msdn.microsoft.com/Profile/en-US/?user=saxisaBeginner MEF and MVVM questionsSo I am trying to implement MEF with my WPF MVVM project (nice mouthful there!).&nbsp; I have been reading the documents on the <a href="http://mef.codeplex.com/">http://mef.codeplex.com/</a>&nbsp;site, and have some questions.<br /><br />So first, the only example I was able to find using MEF and MVVM:<br /><a href="http://consultingblogs.emc.com/davidwynne/archive/2009/05/22/wpf-model-view-viewmodel-mvvm-mef-and-other-acronyms.aspx">http://consultingblogs.emc.com/davidwynne/archive/2009/05/22/wpf-model-view-viewmodel-mvvm-mef-and-other-acronyms.aspx</a><br /><br />And they really go to town, using MEF to actually manage their viewmodels and views.&nbsp; Not sure I want to go that far yet, although maybe I should.&nbsp; But what I DO want to do is pass messages between ViewModels.&nbsp; Or, even better, I see that you can inject properties using MEF.<br /><br />Does this mean if I have an ActiveView property in one view model that returns a ViewModelBase, I can access this property from another viewmodel?&nbsp; I tried (in my MainView):<br />[Export("ActiveView")]<br />public ViewModelBase ActiveView { get _activeView; set {...} }<br /><br />And in another viewmodel:<br />[Import("ActiveView")]<br />public ViewModelBase ActiveView { get; set; }<br /><br />Everything compiles but in the imported view model, ActiveView is null.<br /><br />Which brings me to the next question, I think this is failing because I did not compose these correctly.&nbsp; How do I do that?&nbsp; The example from the MEF site says 'skip this step if you are using ASP.NET or WPF'.&nbsp; Skip what step, the whole thing or just the beginning?<br /><br />I think Im missing how to setup this thing.<br /><br />Also, is there any issue trying to access the property directly like this?&nbsp; Or is it better to just send string messages around?&nbsp; I thought it would be cool to try and send a property, or even better objects around for reuse between ViewModels but I havent gotten that far yet.<br /><br />Thanks!<br /><br />PS&nbsp; The more I read the docs the more I think I dont really understand this at all :PWed, 07 Oct 2009 22:32:53 Z2009-10-30T17:20:02Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/61ea0193-8fb7-4f62-8ff5-2e7ae3897d10http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/61ea0193-8fb7-4f62-8ff5-2e7ae3897d10Mystagoguehttp://social.msdn.microsoft.com/Profile/en-US/?user=MystagogueSystem.AddIn?Elsewhere in this forum it was stated that MEF is similar to traditional IOC containers.&nbsp; Would it be correct to say that one way that it differs, is that MEF is the combination of the System.AddIn namespace together with an IOC Container?<br /><br />If yes, that means MEF can perform dependency injection&nbsp;even with plugins it&nbsp;dynamically discovered.&nbsp; Yes?&nbsp; If yes, does it handle appdomains simultaneously?<hr class="sig">-Brent AriasWed, 07 Oct 2009 07:20:20 Z2009-10-07T07:20:20Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/bf415ef3-f0d9-47c0-9847-dbb01bd01041http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/bf415ef3-f0d9-47c0-9847-dbb01bd01041surendiranhttp://social.msdn.microsoft.com/Profile/en-US/?user=surendiranhow to build ReSharper like application using C#how to build ReSharper like application using C#<hr class="sig">ilikemicrosoftTue, 29 Sep 2009 12:00:08 Z2009-09-29T12:00:08Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/8d319e97-fdfe-4b75-99f4-5a4bcbac7072http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/8d319e97-fdfe-4b75-99f4-5a4bcbac7072surendiranhttp://social.msdn.microsoft.com/Profile/en-US/?user=surendiranIs it possible to create c# like Editor controlIs it possible to create c# Editor.<br/><br/>i need a control that should work exactly like C# editor. It should do activities like intlisense,expression builder,statement builder,checking conditions etc...<br/>it should be like exactly an C# editor in Visual Studio .Net<hr class="sig">ilikemicrosoftTue, 29 Sep 2009 10:36:43 Z2009-09-29T10:36:43Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/9b40fb60-47bf-4112-9aa3-5486e3f47b80http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/9b40fb60-47bf-4112-9aa3-5486e3f47b80Sandeep Chauhanhttp://social.msdn.microsoft.com/Profile/en-US/?user=Sandeep%20ChauhanError in deploying C# application that uses a COM dll<p>Hi <br/><br/>I am new to the concepts of using COM dlls in C# application and have an issue when I try to deploy my C# application that uses a COM dll.<br/><br/>Scenario:</p> <p>I am trying to obtain some details of a project created in a commercial tool, by building a C# Windows Application.<br/>For this, I have installed the  tool and I am adding a reference of one of the dlls’ from the “.. /program files/ bin “ folder of the tool , into my C# Appln .<br/>In the development environment I am able to execute the application without any issues.<br/>The problem arises when I use the exe on other machines where the tool HAS BEEN installed.</p> <p>Sample Code:</p> <p>Using COMdll;</p> <p>COMdll.Application appln = new COMdll.Application();</p> <p>COMdll.Project prj ; </p> <p>prj = appln.Somefunction(); // This line throws the COM cast exception in TEST machines<br/>           <br/>COMdll.x Reqs;</p> <p>Reqs = prj.Somefunction();</p> <p><br/>I get a COM cast exception while trying to run this C# appln in any other macines. Some machines also show a Invalid cast exception in the 4th line.I am unable to reproduce these exceptions in the development environment.My understanding is that if the problem was actually that of the Invalid Cast, then this should have been raised in the development environment too.But this is not the case in the current scenario.</p> <p>I am now unsure if my code actually has a problem or this issue is because of COM dll not being deployed properly in the test machines.</p> <p>In case any other statements have to be used in my program to make it work on other machines,please let me know about it. I did some reading and found dllimport, PInvoke as common mentions. <br/><br/>P.S. The COM dll was developed in VB6<br/>This exception appears even after I try registering the COM dll in the test machines.<br/>The development environment and Test environments are similar.<br/><br/>Please help.<br/>Thank you.</p> <p>Regards,<br/>Sandeep</p> <p> </p>Tue, 29 Sep 2009 04:23:16 Z2009-09-29T04:26:02Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/66b36637-98ef-4ae1-a25c-cc2eea1fea59http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/66b36637-98ef-4ae1-a25c-cc2eea1fea59Jeff Braunhttp://social.msdn.microsoft.com/Profile/en-US/?user=Jeff%20BraunLooking for example of some usercontrol/tabitem exporting a ToolBar objectI have a main window with a TabControl that is populated with MEF loaded TabItem objects.  I want each of those TabItem's to have an &quot;EXPORT&quot;able ToolBar(s).  The TabItem will have a reference to the Toolbar so that it can control it's visibility.<br/> <br/> So I'm trying to find some good samples of this type of behavior.  The samples with MEF6 don't have any such ToolBars that they load using MEF.<br/> <br/> Thanks,<br/> JeffFri, 18 Sep 2009 17:48:31 Z2009-09-18T17:48:32Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/2c2aff25-3ea7-48d6-a2ed-a3510e9ac808http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/2c2aff25-3ea7-48d6-a2ed-a3510e9ac808thiru.Ahttp://social.msdn.microsoft.com/Profile/en-US/?user=thiru.AEMABHi there,<br/> <br/> I wanna use Exception Management Application Block, to log the error in a text file (C:\Inetpub\wwwroot\EMAB\Log.txt). So that the log.txt will be available in the internet.<br/> <br/> I have already ran the Exception Management Application Block.msi in the development m/c, <br/> pls lemme know how to proceed after that, I googled alot but no luck to get prefect article related to the topics.<br/> Looking forward ur expertise reply, thx<br/> <br/> Regards,<br/> thiru<br/>Thu, 17 Sep 2009 08:42:25 Z2009-09-17T08:42:25Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/49269dad-05e7-4a46-93cc-dc334f7452b3http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/49269dad-05e7-4a46-93cc-dc334f7452b3Madkrhttp://social.msdn.microsoft.com/Profile/en-US/?user=Madkrcan we design forms with MAPI to have custom regions in folder view areaCan we design the formserver so that the folder view can have a region attached to it. Like add-in express is doing it. Can we add a window to the folderview of outlook? Other than customizing the folder view.<br/><br/>Can we have a form for a folder, that can be displayed for any message type?Tue, 08 Sep 2009 10:56:42 Z2009-09-08T10:56:46Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/9f334a3b-29e3-4402-8c70-184f881462e0http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/9f334a3b-29e3-4402-8c70-184f881462e0miridfdhttp://social.msdn.microsoft.com/Profile/en-US/?user=miridfdWhy Addin is not loaded?Hi,<br/><br/>I've created an addin for the IDE of VS.<br/>I've checked the two relevant checkboxes in the Addin Manager. (Startup and its name).<br/>in the .addin xml file, everything just seem to be right written:<br/><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium"><font size=4 color="#0000ff"><font size=4 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=4 color="#0000ff"> <p> </p> </font></span> <p><span style="color:#a31515;font-size:medium"><span style="color:#a31515;font-size:medium">Assembly</span></span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium"> </span></span><span style="color:#ff0000;font-size:medium"><span style="color:#ff0000;font-size:medium">src</span></span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium">=</span></span><span style="font-size:medium">&quot;</span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium">file</span></span><span style="font-size:medium">&quot;</span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium">&gt;</span></span><span style="font-size:medium">C:\Program Files\Miners\trysofi\trysofi.dll</span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium">&lt;/</span></span><span style="color:#a31515;font-size:medium"><span style="color:#a31515;font-size:medium">Assembly</span></span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium">&gt;<font size=4 color="#0000ff"><font size=4 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=4 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:medium"><span style="color:#a31515;font-size:medium">FullClassName</span></span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium">&gt;</span></span><span style="font-size:medium">trysofi.Connect</span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium">&lt;/</span></span><span style="color:#a31515;font-size:medium"><span style="color:#a31515;font-size:medium">FullClassName</span></span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium">&gt;<font size=4 color="#0000ff"><font size=4 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=4 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:medium"><span style="color:#a31515;font-size:medium">LoadBehavior</span></span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium">&gt;</span></span><span style="font-size:medium">1</span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium">&lt;/</span></span><span style="color:#a31515;font-size:medium"><span style="color:#a31515;font-size:medium">LoadBehavior</span></span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium">&gt;<font size=4 color="#0000ff"><font size=4 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=4 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:medium"><span style="color:#a31515;font-size:medium">CommandPreload</span></span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium">&gt;</span></span><span style="font-size:medium">1</span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium">&lt;/</span></span><span style="color:#a31515;font-size:medium"><span style="color:#a31515;font-size:medium">CommandPreload</span></span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium">&gt;<font size=4 color="#0000ff"><font size=4 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=4 color="#0000ff"> <p> </p> </font></span></p> <p><span style="color:#a31515;font-size:medium"><span style="color:#a31515;font-size:medium">CommandLineSafe</span></span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium">&gt;</span></span><span style="font-size:medium">0</span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium">&lt;/</span></span><span style="color:#a31515;font-size:medium"><span style="color:#a31515;font-size:medium">CommandLineSafe</span></span><span style="color:#0000ff;font-size:medium"><span style="color:#0000ff;font-size:medium">&gt;</span></span></p> but, it is not getting loaded when launching VS.<br/><br/>Any idea?<br/><br/>Thanks<br/>Sat, 11 Jul 2009 19:31:12 Z2009-09-08T07:10:59Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/6fc34c96-4ff2-4c19-8147-79e411986773http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/6fc34c96-4ff2-4c19-8147-79e411986773Vishwas Srivastavahttp://social.msdn.microsoft.com/Profile/en-US/?user=Vishwas%20SrivastavaHow to deploy an Add-In...?Hi,<br/><br/>I have created one Addin using C# 2008, its working absloutly fine when i am trying to run it from VS addin project, but when i am trying to deploy it is throwing and error - &quot;Unknown Error&quot;.<br/><br/>When i am providing full path of my dll in .addin file it's running fine - <br/><br/><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff"><font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span> <p><span style="font-size:x-small;color:#a31515"><span style="font-size:x-small;color:#a31515">Assembly</span></span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">&gt;</span></span><span style="font-size:x-small">C:\Temp\AgentPlugins.dll</span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">&lt;/</span></span><span style="font-size:x-small;color:#a31515"><span style="font-size:x-small;color:#a31515">Assembly</span></span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">&gt;<br/>&lt;</span></span><span style="font-size:x-small;color:#a31515"><span style="font-size:x-small;color:#a31515">FullClassName</span></span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">&gt;</span></span><span style="font-size:x-small">AgentPlugins.Connect</span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">&lt;/</span></span><span style="font-size:x-small;color:#a31515"><span style="font-size:x-small;color:#a31515">FullClassName</span></span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">&gt;<br/><br/><br/>But when i am replacing my path with assembly reference its throwing error - <br/><br/><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff"><font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span> <p><span style="font-size:x-small;color:#a31515"><span style="font-size:x-small;color:#a31515">Assembly</span></span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">&gt;</span></span><span style="font-size:x-small;color:#000000">AgentPlugins, Version=1.0.3426.22629, Culture=Neutral, PublicKeyToken=2d9166dc10ec37ea</span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">&lt;/</span></span><span style="font-size:x-small;color:#a31515"><span style="font-size:x-small;color:#a31515">Assembly</span></span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">&gt;<br/>&lt;</span></span><span style="font-size:x-small;color:#a31515"><span style="font-size:x-small;color:#a31515">FullClassName</span></span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">&gt;</span></span><span style="font-size:x-small;color:#000000">AgentPlugins.Connect</span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">&lt;/</span></span><span style="font-size:x-small;color:#a31515"><span style="font-size:x-small;color:#a31515">FullClassName</span></span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">&gt;<br/><br/>i am not getting an idea what else is need to deploy an addin.<br/><br/><br/><br/>Thanks<br/>Vishwas.</span></span></p> </span></span></p><hr class="sig">vishwas SrivastavaTue, 19 May 2009 07:18:50 Z2009-09-08T07:11:17Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/d608de49-1722-46ba-a83d-95af30ce58c3http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/d608de49-1722-46ba-a83d-95af30ce58c3KevinHBeltwayhttp://social.msdn.microsoft.com/Profile/en-US/?user=KevinHBeltwayHow to pass an Enum to a FunctonI have several Enums defined and I would like to know if anyone knows how to pass an Enum to a function.<br/><br/><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff"><font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>Enum</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span> <p><span style="font-size:x-small"> eOne <p>eName</p> <p>eAddress</p> <p>eCity</p> <font size=2> <p> </p> </font></span></p> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">End</span></span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Enum</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Enum</span></span><span style="font-size:x-small"> eTwo <p>eDate</p> <p>eEmailAddress</p> <font size=2> <p> </p> </font></span></p> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">End</span></span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Enum</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#008000"><span style="font-size:x-small;color:#008000">''' </span></span><span style="font-size:x-small;color:#808080"><span style="font-size:x-small;color:#808080">&lt;summary&gt;</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#008000"><span style="font-size:x-small;color:#008000">''' Routine that passes enum,</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#008000"><span style="font-size:x-small;color:#008000">''' </span></span><span style="font-size:x-small;color:#808080"><span style="font-size:x-small;color:#808080">&lt;/summary&gt;</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#008000"><span style="font-size:x-small;color:#008000">''' </span></span><span style="font-size:x-small;color:#808080"><span style="font-size:x-small;color:#808080">&lt;param name=&quot;EnumGoesHere&quot;&gt;&lt;/param&gt;</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#008000"><span style="font-size:x-small;color:#008000">''' </span></span><span style="font-size:x-small;color:#808080"><span style="font-size:x-small;color:#808080">&lt;remarks&gt;&lt;/remarks&gt;</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Public</span></span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Sub</span></span><span style="font-size:x-small"> PassEnum(</span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">ByVal</span></span><span style="font-size:x-small"> EnumGoesHere)<font size=2> <p> </p> </font></span></p> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Dim</span></span><span style="font-size:x-small"> sqlString </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">As</span></span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">String</span></span><span style="font-size:x-small"> = </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Nothing</span></span></p> <span style="font-size:x-small"><font size=2> <p>sqlString =</p> </font></span> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Me</span></span><span style="font-size:x-small">.LoadHdrEnum()<font size=2> <p> </p> </font></span></p> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">End</span></span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Sub</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#008000"><span style="font-size:x-small;color:#008000">''' </span></span><span style="font-size:x-small;color:#808080"><span style="font-size:x-small;color:#808080">&lt;summary&gt;</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#008000"><span style="font-size:x-small;color:#008000">''' Routine that accepts enum.</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#008000"><span style="font-size:x-small;color:#008000">''' </span></span><span style="font-size:x-small;color:#808080"><span style="font-size:x-small;color:#808080">&lt;/summary&gt;</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#008000"><span style="font-size:x-small;color:#008000">''' </span></span><span style="font-size:x-small;color:#808080"><span style="font-size:x-small;color:#808080">&lt;param name=&quot;mode&quot;&gt;&lt;/param&gt;</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#008000"><span style="font-size:x-small;color:#008000">''' </span></span><span style="font-size:x-small;color:#808080"><span style="font-size:x-small;color:#808080">&lt;param name=&quot;sqlString&quot;&gt;&lt;/param&gt;</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#008000"><span style="font-size:x-small;color:#008000">''' </span></span><span style="font-size:x-small;color:#808080"><span style="font-size:x-small;color:#808080">&lt;param name=&quot;EnumGoesHere&quot;&gt;&lt;/param&gt;</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#008000"><span style="font-size:x-small;color:#008000">''' </span></span><span style="font-size:x-small;color:#808080"><span style="font-size:x-small;color:#808080">&lt;returns&gt;&lt;/returns&gt;</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#008000"><span style="font-size:x-small;color:#008000">''' </span></span><span style="font-size:x-small;color:#808080"><span style="font-size:x-small;color:#808080">&lt;remarks&gt;&lt;/remarks&gt;</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Public</span></span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Shared</span></span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Function</span></span><span style="font-size:x-small"> LoadHdrEnum(</span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">ByVal</span></span><span style="font-size:x-small"> mode </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">As</span></span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">String</span></span><span style="font-size:x-small">, </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">ByVal</span></span><span style="font-size:x-small"> sqlString </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">As</span></span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">String</span></span><span style="font-size:x-small">, </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">ByVal</span></span><span style="font-size:x-small"> EnumGoesHere) </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">As</span></span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">String</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Dim</span></span><span style="font-size:x-small"> i </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">As</span></span><span style="font-size:x-small"> Int16 = 0<font size=2> <p> </p> </font></span></p> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Dim</span></span><span style="font-size:x-small"> holdString </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">As</span></span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">String</span></span><span style="font-size:x-small"> = </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Nothing</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#008000"><span style="font-size:x-small;color:#008000">' Replace the Enum names with the numbers.</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">For</span></span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Each</span></span><span style="font-size:x-small"> enumType </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">In</span></span><span style="font-size:x-small"> [Enum].GetValues(</span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">GetType</span></span><span style="font-size:x-small">(EnumGoesHere))<font size=2> <p> </p> </font></span></p> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Dim</span></span><span style="font-size:x-small"> strMsgType </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">As</span></span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">String</span></span><span style="font-size:x-small"> = enumType.ToString()<font size=2> <p>sqlString = Replace(sqlString,</p> </font></span></p> <p><span style="font-size:x-small;color:#a31515"><span style="font-size:x-small;color:#a31515">&quot;hdr.&quot;</span></span><span style="font-size:x-small"> &amp; strMsgType, i) <p>i += 1</p> <font size=2> <p> </p> </font></span></p> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Next</span></span></p> <span style="font-size:x-small"><font size=2> <p> </p> </font></span> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Return</span></span><span style="font-size:x-small"> sqlString<font size=2> <p> </p> </font></span></p> <p><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">End</span></span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">Function</span></span></p>Fri, 12 Jun 2009 23:38:48 Z2009-10-21T01:53:51Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/725d57ee-edd7-460e-8372-12eb6194c203http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/725d57ee-edd7-460e-8372-12eb6194c203askrishttp://social.msdn.microsoft.com/Profile/en-US/?user=askrisnot able to call a vs 2005 c++ clr jni dll in java in machines without vs 2005?????hello buddies I have been hovering around this prob for quite some time still no solution... I actually have a third party .net dll which i want to use in java so i wrote a c++ jni dll using clr option The wrapper works fine in machines having vs 2005 but gives an error when running in machines without vs 2005. the error is in java as follows unsatisfied link error reinstalling the application can fix the prob!!!!! I am posting this quest here coz after a lol of googling i found some thing related to windowssxs,,,/md,/mt compilatin,,,,some runtime libraries should be copied etc...... but still the dll is getting loaded in machines with vs 2005???? kindly help me outThu, 27 Aug 2009 10:54:25 Z2009-08-27T10:54:26Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/883a8f0a-b1b9-48f1-b66d-549c827ff7afhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/883a8f0a-b1b9-48f1-b66d-549c827ff7afaskrishttp://social.msdn.microsoft.com/Profile/en-US/?user=askrisnot able to call vs 2005 c++ "clr" jni dll in other machines without vs 2005???????hello buddies<br/> <br/> I have been hovering around this prob for quite some time still no solution...<br/> <br/> I actually have a third party .net dll which i want to use in java so i wrote a c++ jni dll using clr option <br/> <br/> The wrapper works fine in machines having vs 2005<br/> <br/> but gives an error when running in machines without vs 2005.<br/> <br/> the error is in java as follows unsatisfied link error reinstalling the application can fix the prob!!!!!<br/> <br/> I am posting this quest here coz after a lol of googling i found some thing related to windowssxs,,,/md,/mt compilatin,,,,some runtime libraries should be copied etc......<br/> <br/> <br/> but still the dll is getting loaded in machines with vs 2005????<br/> <br/> <br/> kindly help me out<br/> <br/> <br/>Thu, 27 Aug 2009 10:52:13 Z2009-08-27T10:52:14Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/a3d15869-5dff-496e-a131-5de09189673bhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/a3d15869-5dff-496e-a131-5de09189673bamarlowehttp://social.msdn.microsoft.com/Profile/en-US/?user=amarloweFiring Tab Changed Events for a TabbedWorkspaceHello,<br/> <br/> I am using Composite UI Application Block for my app and using a TabbedWorkspace for my SmartParts, I am also using C#.  I need to be able to fire an event when tabs are selected so the Shell can update it's UI accordingly.  Does anyone have any suggestions for this?  I was trying to publish the SelectedTabChanged event in the workspace using event topics but I am having no luck, any suggestions would be appreciated.<br/> <br/> Thanks!Fri, 17 Jul 2009 17:22:56 Z2009-09-23T01:28:40Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/64a135b3-bdb1-48d5-9b96-c780fc8d8d7dhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/64a135b3-bdb1-48d5-9b96-c780fc8d8d7dGerhardhttp://social.msdn.microsoft.com/Profile/en-US/?user=GerhardMEF and singletonsHi,<br/><br/>I have an object with more than one interface and I want to resolve this dependancies with MEF. But its important, that the instance of the object is a singleton, so how can I tell MEF to do so?<br/><br/>Thanks<br/><br/>GerhardTue, 23 Jun 2009 09:47:22 Z2009-08-17T10:04:43Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/715c605f-ed6f-4856-8ee4-caba679302c3http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/715c605f-ed6f-4856-8ee4-caba679302c3writeacommenthttp://social.msdn.microsoft.com/Profile/en-US/?user=writeacommentwrong csv information showed up in csv file<div class=body>Hi,<br/><br/>     I was using the StreamWriter class to write row data to a cvs file.<br/><br/>     When I try to write &quot;0000&quot; to a column with stream-&gt;Write(&quot;0000&quot;), the result becomes 0.<br/>     When I try to write &quot;00e0&quot; it becomes 0.00E+00 and &quot;00e1&quot; becomes 0.00E+00.<br/>     I do not know why this coversion is taking place. What is causing the bug?<br/>     I am using the managed c++ for this class.<br/></div>Mon, 06 Jul 2009 08:31:03 Z2009-08-17T10:01:06Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/db3d2505-7964-493b-9ae4-dad6622adc00http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/db3d2505-7964-493b-9ae4-dad6622adc00Abdullah Sahinhttp://social.msdn.microsoft.com/Profile/en-US/?user=Abdullah%20Sahin"LoadLibrary" for "Com object" inside a dllHi everyone,<br/> <br/> I have an ActiveX object and I want to use it without registering. I need something like &quot;LoadLibrary&quot; function but loadlibrary is used to call functions of a dll, I need to call/instantiate one object inside a dll(a dll can contain more than one object). Is there any idea about how to do this?<br/> <br/> Thanks<br/>Fri, 07 Aug 2009 18:34:39 Z2009-08-16T06:35:38Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/7187faef-34fe-468e-ae65-5f05b00cbafehttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/7187faef-34fe-468e-ae65-5f05b00cbafexeeezhttp://social.msdn.microsoft.com/Profile/en-US/?user=xeeezError accessing a C++/CLI wrapper method from C#Hi,<br/> <br/> I have written a C++/CLI wrapper around a native c++ to use it in managed c# environment. I will give a simple example of what I did and the issue I'm facing:<br/> <br/> Native Lib:<br/> <pre>class a { }; class b { a Obj_a; };</pre> Wrapper DLL:<br/> <pre lang="x-c#">class a_wrap {... } class b_wrap { b * bnative; public: void seta(a_wrap obj) { bnative-&gt;Obj_a = obj.getNative(); } }</pre> Now in c# when a declare an object of  b_wrap it works ok. But when I call the function B.seta(a_wrap someobject), it gives me the error:<br/> <br/> error CS1501: No overload for method 'setsymbol' takes '1' arguments<br/> <br/> <br/> It takes one argument. I have passed the right parameter type. What can be the issue??<br/> <br/> <br/> Thanks,<br/> Xeeez<br/>Wed, 12 Aug 2009 13:44:25 Z2009-08-15T14:16:03Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/ef1c9b80-820c-41c4-9b92-2c88def0f011http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/ef1c9b80-820c-41c4-9b92-2c88def0f011Nisu Shahhttp://social.msdn.microsoft.com/Profile/en-US/?user=Nisu%20Shahpinvoke queryHello,<br/> <br/> I have found two functions to make radio on/off in windows mobile.<br/> These are  the native code(unmanaged) functions but i am developing small application in c#.net (managed  code) for smartphone(framwork 3.5).<br/> so i have to pinvoke these functions.<br/> Please tell me how can i  pinvoke these two functions mentioned below.<br/> <br/> Thanks in advance,<br/> Regards<br/> Nisu.<br/> <br/> LONG <strong>lineOpen</strong> (<br/>   HLINEAPP hLineApp, <br/>   DWORD dwDeviceID, <br/>   LPHLINE lphLine, <br/>   DWORD dwAPIVersion, <br/>   DWORD dwExtVersion, <br/>   DWORD dwCallbackInstance, <br/>   DWORD dwPrivileges, <br/>   DWORD dwMediaModes, <br/>   LPLINECALLPARAMS const lpCallParams<br/> );<br/> <br/> <br/> LONG WINAPI <strong>lineSetEquipmentState</strong> (<br/>   HLINE hLine,<br/>   DWORD dwState<br/> );<input type=hidden> <input type=hidden>Fri, 07 Aug 2009 06:38:06 Z2009-08-07T06:38:07Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/099f7aed-3089-42cb-bf5f-34c55360c5f6http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/099f7aed-3089-42cb-bf5f-34c55360c5f6bxsbankashttp://social.msdn.microsoft.com/Profile/en-US/?user=bxsbankasbxsbankasbxsbnkasWed, 05 Aug 2009 15:11:58 Z2009-08-05T15:11:59Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/9942a5d4-5b05-4d81-a3a2-c2a42680549dhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/9942a5d4-5b05-4d81-a3a2-c2a42680549dBala Prabhuhttp://social.msdn.microsoft.com/Profile/en-US/?user=Bala%20PrabhueditPoint.get_CodeElement(vsCMElement.vsCMElementEnum) returns null I have a c++ code wherein I have declared a enum as follows<br/><br/><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff"> <p>enum</p> <span style="font-size:x-small;color:#2b91af"><span style="font-size:x-small;color:#2b91af"> <p><span style="color:#2b91af">TextDocument</span> textDoc = (<span style="color:#2b91af"><span style="color:#2b91af">TextDocument</span></span>)<span style="color:#2b91af"><span style="color:#2b91af">Re</span></span>.ReDte.ActiveDocument.Object(<span style="color:#a31515"><span style="color:#a31515">&quot;TextDocument&quot;</span></span>);</p> <p class=MsoNormal><span style="font-size:x-small;font-family:Verdana"><span style="font-size:10pt;font-family:Verdana">                <span style="color:#2b91af"><span style="color:#2b91af">EditPoint</span></span> editPoint = textDoc.StartPoint.CreateEditPoint();</span></span></p> <p class=MsoNormal><span style="font-size:x-small;font-family:Verdana"><span style="font-size:10pt;font-family:Verdana">                editPoint.MoveToLineAndOffset(lineNumber, 1);</span></span></p> <p class=MsoNormal><span style="font-size:x-small;font-family:Verdana"><span style="font-size:10pt;font-family:Verdana">  </span></span><span style="font-size:x-small;font-family:Verdana"><span style="font-size:10pt;font-family:Verdana">                <span style="color:#2b91af"><span style="color:#2b91af">List</span></span>&lt;<span style="color:#0000ff"><span style="color:blue">string</span></span>&gt; enumElements = <span style="color:#0000ff"><span style="color:blue">new</span></span> <span style="color:#2b91af"><span style="color:#2b91af">List</span></span>&lt;<span style="color:#0000ff"><span style="color:blue">string</span></span>&gt;();</span></span></p> <span style="font-size:x-small;color:#2b91af"><span style="font-size:x-small;color:#2b91af"> <p class=MsoNormal><span style="font-size:x-small;font-family:Verdana"><span style="font-size:10pt;font-family:Verdana">                </span></span><span style="font-size:x-small;color:#2b91af;font-family:Verdana"><span style="font-size:10pt;color:#2b91af;font-family:Verdana" lang=FR>CodeElement</span></span><span style="font-size:x-small;font-family:Verdana"><span style="font-size:10pt;font-family:Verdana" lang=FR> element = editPoint.get_CodeElement(<span style="color:#2b91af"><span style="color:#2b91af">vsCMElement</span></span>.vsCMElementEnum);<br/>}</span></span></p> </span></span></span><span style="font-size:x-small;color:#2b91af"> <p class=MsoNormal> </p> </span></span><span style="color:#2b91af"><strong><br/>editPoint.get_CodeElement(<span style="color:#2b91af">vsCMElement</span>.vsCMElementEnum) returns null.<br/></strong></span><br/>Is there an issue in my code? because of which get_codeelement returns NULL?<br/></span></span></span></span><span style="font-size:x-small">weekday {monday, tuesday, wednesday, thursday, friday, saturday, sunday};<br/><br/><br/>The following is the code written in .NET extensible package that tries to interpret the above code.<br/><br/>{<br/></span> <p> </p>Thu, 23 Jul 2009 06:58:41 Z2009-07-23T06:58:42Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/2eaa2688-7a92-49d1-8039-32f884fe46bahttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/2eaa2688-7a92-49d1-8039-32f884fe46baJaunedeauhttp://social.msdn.microsoft.com/Profile/en-US/?user=JaunedeauSeveral contributors to unity configuration in app.config ?Hi,<br/> <br/>   I have an application with several layers. Each application contribute some &lt;typeAlias&gt; and some &lt;type&gt; to the &lt;unity&gt; node in app.config.<br/> <br/>   I want to split the big app.config file and have one (or several) for each layer because :<br/> -This file is getting too huge and is getting hard to maintain<br/> -Having mapping defined for other interfaces of layers impli that I must have the implementation assembly of those layers, which is bad for reuse and unit testing.<br/> <br/>   How can I merge all the isolated app.config files defining mappings for each layer so my final app can Resolve&lt;&gt;() every mapping in the end ? Is there a better way than running a custom tool that would do the merge at build time ?<br/> <br/> Regards,<br/> John.Wed, 27 May 2009 09:51:54 Z2009-05-27T09:51:54Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/c94165ae-ac48-401b-985d-c0e2dd8ac115http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/c94165ae-ac48-401b-985d-c0e2dd8ac115SANDY DONGhttp://social.msdn.microsoft.com/Profile/en-US/?user=SANDY%20DONGIs there any api to get start time of IIS webserver.I wants to know how we can get Start time of a IIS webserverWed, 27 May 2009 07:20:55 Z2009-05-27T07:20:55Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/ac1017e5-ab9b-4647-b1e0-4c58f5e38ce6http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/ac1017e5-ab9b-4647-b1e0-4c58f5e38ce6Vishwas Srivastavahttp://social.msdn.microsoft.com/Profile/en-US/?user=Vishwas%20SrivastavaHow to identify, Is current user a Administrator..?Hi,<br/><br/>Is there any registry key using which I can identify that weather the current user is Administrator or not...<br/>I need to do this so that i can exit my Setup if the current user is not an Admin.<br/><br/>Or recoment me if there is some other way to achieve the same.<br/><br/><br/><br/>Thanks,<br/><hr class="sig">vishwas SrivastavaThu, 21 May 2009 03:57:34 Z2009-09-21T07:00:21Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/0da1f922-572e-4164-aea7-e25cc59184fahttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/0da1f922-572e-4164-aea7-e25cc59184faSuresh Chakravarthy Annavarapuhttp://social.msdn.microsoft.com/Profile/en-US/?user=Suresh%20Chakravarthy%20Annavarapuhow to add or integrate download accelerator to IEDear All<br/> <br/> I created one download accelerator using vb.net. now I integrate that application in IE(i.e when user click on any download link it should open my application instead of normal download window.<br/> for example the system having Internet download manager(IDM) ,when we click on any download link in Internet explore it automatically open IDM instead of normal pop up. same thing I need to do in my application. please let me know how to integrate Application with IE.<br/> <br/> Thanks Advance.<hr class="sig">sureshMon, 25 May 2009 11:25:14 Z2009-05-25T11:25:14Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/cff90f5c-7aec-4d8d-a9d3-b547d70d7016http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/cff90f5c-7aec-4d8d-a9d3-b547d70d7016Serge Calderarahttp://social.msdn.microsoft.com/Profile/en-US/?user=Serge%20CalderaraWhat is MEF in clear words that every newbie will catch ??Dear all,<br/><br/><br/>I have read some styuff about MEF but I did not have a clear view about what all those terms used are lie IOC, injection ...<br/>IN addition I could find real world example project that could ring my bel and telling me &quot;humm right then I catch and will use it when I have the use for it&quot;<br/><br/>To used it we need to catch the idea behind and what are the scenarios where it can be used, becasue sometimes we are in a project and we used how old style to make things until you heard about something new which is so unclear that you skip it.<br/><br/>Anyone could explain in clear words what is all about with real world sample project scenario ?<br/><br/>thnaks for help<br/>serge<hr class="sig">Your experience is build from the one of othersWed, 22 Apr 2009 18:55:02 Z2009-05-16T13:42:38Z