Search Results

Search found 247 results on 10 pages for 'createinstance'.

Page 5/10 | < Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • CodePlex Daily Summary for Thursday, November 10, 2011

    CodePlex Daily Summary for Thursday, November 10, 2011Popular ReleasesCODE Framework: 4.0.11110.0: Various minor fixes and tweaks.Extensions for Reactive Extensions (Rxx): Rxx 1.2: What's NewRelated Work Items Please read the latest release notes for details about what's new. Content SummaryRxx provides the following features. See the Documentation for details. Many IObservable<T> extension methods and IEnumerable<T> extension methods. Many useful types such as ViewModel, CommandSubject, ListSubject, DictionarySubject, ObservableDynamicObject, Either<TLeft, TRight>, Maybe<T> and others. Various interactive labs that illustrate the runtime behavior of the extensio...Composite C1 CMS: Composite C1 3.0 RC2 (3.0.4331.234): This is currently a Release Candidate. Upgrade guidelines and "what's new" are pending.Player Framework by Microsoft: HTML5 Player Framework 1.0: Additional DownloadsHTML5 Player Framework Examples - This is a set of examples showing how to setup and initialize the HTML5 Player Framework. This includes examples of how to use the Player Framework with both the HTML5 video tag and Silverlight player. Note: Be sure to unblock the zip file before using. Note: In order to test Silverlight fallback in the included sample app, you need to run the html and xap files over http (e.g. over localhost). Silverlight Players - Visit the Silverlig...MapWindow 4: MapWindow GIS v4.8.6 - Final release - 64Bit: What’s New in 4.8.6 (Final release)A few minor issues have been fixed What’s New in 4.8.5 (Beta release)Assign projection tool. (Sergei Leschinsky) Projection dialects. (Sergei Leschinsky) Projections database converted to SQLite format. (Sergei Leschinsky) Basic code for database support - will be developed further (ShapefileDataClient class, IDataProvider interface). (Sergei Leschinsky) 'Export shapefile to database' tool. (Sergei Leschinsky) Made the GEOS library static. geos.dl...NewLife XCode ??????: XCode v8.2.2011.1107、XCoder v4.5.2011.1108: v8.2.2011.1107 ?IEntityOperate.Create?Entity.CreateInstance??????forEdit,????????(FindByKeyForEdit)???,???false ??????Entity.CreateInstance,????forEdit,???????????????????? v8.2.2011.1103 ??MS????,??MaxMin??(????????)、NotIn??(????)、?Top??(??NotIn)、RowNumber??(?????) v8.2.2011.1101 SqlServer?????????DataPath,?????????????????????? Oracle?????????DllPath,????OCI??,???????????ORACLE_HOME?? Oracle?????XCode.Oracle.IsUseOwner,???????????Ow...Facebook C# SDK: v5.3.2: This is a RTW release which adds new features and bug fixes to v5.2.1. Query/QueryAsync methods uses graph api instead of legacy rest api. removed dependency from Code Contracts enabled Task Parallel Support in .NET 4.0+ (experimental) added support for early preview for .NET 4.5 (binaries not distributed in codeplex nor nuget.org, will need to manually build from Facebook-Net45.sln) added additional method overloads for .NET 4.5 to support IProgress<T> for upload progress added ne...Delete Inactive TS Ports: List and delete the Inactive TS Ports: UPDATEAdded support for windows 2003 servers and removed some null reference errors when the registry key was not present List and delete the Inactive TS Ports - The InactiveTSPortList.EXE accepts command line arguments The InactiveTSPortList.Standalone.WithoutPrompt.exe runs as a standalone exe without the need for any command line arguments.Ribbon Editor for Microsoft Dynamics CRM 2011: Ribbon Editor (0.1.2207.267): BUG FIXES: - Cannot add multiple JavaScript and Url under Actions - Cannot add <Or> node under <OrGroup> - Adding a rule under <Or> node put the new rule node at the wrong placeDNN Quick Form: DNN Quick Form 1.0.0: Initial Release for DNN Quick Form Requires DotNetNuke 6.1ClosedXML - The easy way to OpenXML: ClosedXML 0.60.0: Added almost full support for auto filters (missing custom date filters). See examples Filter Values, Custom Filters Fixed issues 7016, 7391, 7388, 7389, 7198, 7196, 7194, 7186, 7067, 7115, 7144Microsoft Research Boogie: Nightly builds: This download category contains automatically released nightly builds, reflecting the current state of Boogie's development. We try to make sure each nightly build passes the test suite. If you suspect that was not the case, please try the previous nightly build to see if that really is the problem. Also, please see the installation instructions.GoogleMap Control: GoogleMap Control 6.0: Major design changes to the control in order to achieve better scalability and extensibility for the new features comming with GoogleMaps API. GoogleMap control switched to GoogleMaps API v3 and .NET 4.0. GoogleMap control is 100% ScriptControl now, it requires ScriptManager to be registered on the pages where and before it is used. Markers, polylines, polygons and directions were implemented as ExtenderControl, instead of being inner properties of GoogleMap control. Better perfomance. Better...SubExtractor: Release 1020: Feature: added "baseline double quotes" character to selector box Feature: added option to save SRT files as ANSI (instead of previous UTF-8 only) Feature: made "Save Sup files to Source directory" apply to both Sup and Idx source files. Fix: removed SDH text (...) or [...] that is split over 2 lines Fix: better decision-making in when to prefix a line with a '-' because SDH was removedAcDown????? - Anime&Comic Downloader: AcDown????? v3.6.1: ?? ● AcDown??????????、??????,??????????????????????,???????Acfun、Bilibili、???、???、???、Tucao.cc、SF???、?????80????,???????????、?????????。 ● AcDown???????????????????????????,???,???????????????????。 ● AcDown???????C#??,????.NET Framework 2.0??。?????"Acfun?????"。 ????32??64? Windows XP/Vista/7 ????????????? ??:????????Windows XP???,?????????.NET Framework 2.0???(x86)?.NET Framework 2.0???(x64),?????"?????????"??? ??????????????,??????????: ??"AcDown?????"????????? ?? v3.6.1?? ??.hlv...Track Folder Changes: Track Folder Changes 1.1: Fixed exception when right-clicking the root nodeKinect Toolbox: Kinect Toolbox v1.1.0.2: This version adds support for the Kinect for Windows SDK beta 2.Kinect Mouse Cursor: Kinect Mouse Cursor 1.1: Updated for Kinect for Windows SDK v1.0 Beta 2!Coding4Fun Kinect Toolkit: Coding4Fun Kinect Toolkit 1.1: Updated for Kinect for Windows SDK v1.0 Beta 2!Media Companion: MC 3.421b Weekly: Ensure .NET 4.0 Full Framework is installed. (Available from http://www.microsoft.com/download/en/details.aspx?id=17718) Ensure the NFO ID fix is applied when transitioning from versions prior to 3.416b. (Details here) TV Show Resolutions... Fix to show the season-specials.tbn when selecting an episode from season 00. Before, MC would try & load season00.tbn Fix for issue #197 - new show added by 'Manually Add Path' not being picked up. Also made non-visible the same thing in Root Folders...New ProjectsAlgoritmoGeneticoVB: Proyecto para la cátedra de Inteligencia Artificial de la UCSEAudio Pitch & Shift: Audio Pitch & Shift is a simple audio tool intended to be useful for musicians who wants to slow down or change the pitch of the music. This software takes advantage of Bass audio library technology, wich is multi platform and x64 compatible.Betz: Start with financial binary bet system first... But hope to have a gaming platform in the end. Cheers!Composite Data Service Framework: The Composite Data Service Framework is a toolkit that extends the functionality of the WCF Data Services APIs by allowing a set of OData Services from distinct data sources to be aggregated into a single Data Service, with client-side APIs to help with common tasks.Crayons Static Version: GIS vector-based spatial data overlay processing is much more complex than raster data processing. The GIS data files can be huge and their overlay processing is computationally intensive. CrmXpress SmartSoapLogger for Microsoft Dynamics CRM 2011: SmartSoapLogger autoamtes the process of generating SOAP messages as well as JavaScript functions to use them. All you do is write C# code and click on a button[You have few options as well]to get SOAP messages as well as the Script. Custom File Generators: This project includes Visual Studio Custom Tools that aid in development of Silverlight, Windows Phone, and WPF applications or any MVVM project for that matter. The custom tool creates properties from backing fields that have a specific attribute. The properties are then used in binding and raise their changed event.eDay - Verbräuche: Dieses Programm ermöglicht die Erfassung der monatlichen Verbräuche von Strom, Gas und Wasser. Sie stellt die Werte tabellarisch dar und zeigt sie zusätzlich in einer Statistik.Godfather: An application for administration of sponsorship agencies developed by the .NET Open Space User Group of Vienna Austria in the process of a charity coding event on Nov. 26, 2011.Greek News: Instantly get the latest headlines from multiple Greek news sources in news, sports, technology and opinions with one click onto your Windows Phone. Uses RSS feeds. Sources are customizable from settings page. Based on news.codeplex.com.HMAC MD5: This is a simple implementation of the MD5 cryptographic hashing algorithm and HMAC-MD5. This class consists of fully transparent C# code, suitable for use in .NET, Silverlight and WP7 applications.KonMvc-?? .NET 3.5???????MVC??: ????C#?????MVC??, ????: 1.??APP ????????, 2,?GLOBAL??????? write???(???) ?????????????? 3.???????? MVC???????? ,??????? ??: ???? ,??????????? ????? ????CACHE?????????????Mini Proxy - a light-weight local proxy: a light-weight proxy written in C# (around 200 lines in total), it allows intercept HTTP traffic and hook custom code. Its initial scenario is to capture Http headers sent from a HttpWebRequest object. Limitations: Http 1.0 proxy Range header not forwardedMultimodal User Interface Builder: This project integrates several tools, frameworks and components in order to provide a graphical environment for the development of multimodal user interfaces. The Multimodal User Interface Builder provides development guidance based on mutimodal design patterns research.Om MVC: This is a simple hello world MVC project.Phone Net Tools: A collection of tools to overcome certain limitations of networking on the Windows Phone platform, in particular regarding DNS.Ps3RemoteSleep: A workaround to place the Sony Playstation 3 (PS3) Blu-ray Remote Control in sleep/sniff mode using the integrated Microsoft Bluetooth stack. For use with EventGhost/XBMC Windows 7 32/64 compatible. Simple CQRS Sample: A simple sample for a CQRS designet application. Includes: - RavenDB for Event- and ReadModel-Sorce - MessageBus based on Reactive Framework Rx - Razor MVC3 WebUI - Some more stuffSoftware Lab SDK: A collection of code helping in developmentSolution Import for Microsoft Dynamics CRM 2011: Solution Import for Microsoft Dynamics CRM 2011 makes it easier for developers and customizers of Microsoft Dynamics CRM 2011 to import a solution Zip file or a extracted solution folder to the server in one single operation.Team Badass: Class projectWCF step by step guide: This is an WCF step by step guide that explains how to make Web hosting and Self-hosting of services, and how to consume the services. It is intended for beginners. It's developed in C#When Pigs Fly: Flying PigsWindows Phone Wi-Fi Sensor JangKengPong: Windows Phone 7.5's Wi-Fi socket multicast group communication and Sensor sample application. This project includes Group Communication on LAN and Simple Gesture Recognition library.WPF Turn-based Strategy Wargame: This is a project to create a turn-based strategy game using the Windows Presentation Foundation. The technological foundations of the software allow new game maps to be easily stipulated in XAML, theoretically enabling support for multiple games.

    Read the article

  • POS For .NET: Failed to set property properties of PosPrinter.

    - by StreamT
    I can't set properties of PosPritnter class. For example PageModeStation, PageModeVerticalPosition, PageModePrintArea etc. PosPrinter posPrinter = (PosPrinter)posExplorer.CreateInstance(posPrinterInfo); posPrinter.Open(); posPrinter.Claim(1000); posPrinter.DeviceEnabled = true; posPrinter.PageModeVerticalPosition = 10; //<--- Exception thrown: Failed to set property PageModeVerticalPosition Exception details: Microsoft.PointOfService.PosControlException was unhandled Message="Failed to set property PageModeVerticalPosition." Source="Microsoft.PointOfService" ErrorCodeExtended=0 StackTrace: at Microsoft.PointOfService.Legacy.LegacyProxy.SetProperty(String propertyName, Object propertyValue) at Microsoft.PointOfService.Legacy.LegacyPosPrinter.set_PageModeVerticalPosition(Int32 value) .... Any suggestions?

    Read the article

  • Using Castle Windsor with FluentValidation In MVC

    - by user332022
    I'm working on getting FluentValidation working with Castle Windsor. I already have a wrapper around Castle Windsor. Here is the code for that: public class ResolveType { private static IWindsorContainer _windsorContainer; public static void Initialize( IWindsorContainer windsorContainer ) { _windsorContainer = windsorContainer; } public static T Of() { return _windsorContainer.Resolve(); } } I am trying to build the FluentValidation factory as is explained at http://www.jeremyskinner.co.uk/2010/02/22/using-fluentvalidation-with-an-ioc-container The article uses StructureMap, but I thought I could adapt it to Castle Windsor like this: public class CastleWindsorValidatorFactory : ValidatorFactoryBase { public override IValidator CreateInstance( Type validatorType) { return ResolveType.Of(); } } Notice, I'm just trying to call into my wrapper so that Windsor can resolve the type reference. The problem is that this doesn't compile. I get 'The type or namespace name 'validatorType' could not be found (are you missing a using directive or an assembly reference?)' How can I make this work?

    Read the article

  • Get CLSID by PIA interface Type

    - by Charles
    How can I get the CLSID for a given interface within a Primary Interop Assembly? Here's what I'm talking about: // The c# compiler does some interesting magic. // The following code ... var app = new Microsoft.Office.Interop.Outlook.Application(); // ... is compiled like so (disassembled with Reflector): var app =((Microsoft.Office.Interop.Outlook.Application) Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid("0006F03A-0000-0000-C000-000000000046")))); Microsoft.Office.Interop.Outlook.Application is an interface, and therefore it cannot be instantiated directly. What's interesting here is that c# lets you treat these COM interfaces as if there where classes that you can instantiate with the new keyword. What I want to know is, given the System.Type for a given interface, how can I get the CLSID? Note: I ultimately want to be able to create an instance given the interface's System.Type - I don't really care how. I'm assuming here that the easiest way to do this would be to get CLSID given the Type, just as the c# compiler does.

    Read the article

  • Using Bitmap.LockBits and Marshal.Copy in IronPython not changing image as expected

    - by Leonard H Martin
    Hi all, I have written the following IronPython code: import clr clr.AddReference("System.Drawing") from System import * from System.Drawing import * from System.Drawing.Imaging import * originalImage = Bitmap("Test.bmp") def RedTint(bitmap): bmData = bitmap.LockBits(Rectangle(0, 0, bitmap.Width, bitmap.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb) ptr = bmData.Scan0 bytes = bmData.Stride * bitmap.Height rgbValues = Array.CreateInstance(Byte, bytes) Runtime.InteropServices.Marshal.Copy(ptr, rgbValues, 0, bytes) for i in rgbValues[::3]: i = 255 Runtime.InteropServices.Marshal.Copy(rgbValues, 0, ptr, bytes) bitmap.UnlockBits(bmData) return bitmap newPic = RedTint(originalImage) newPic.Save("New.bmp") Which is my interpretation of this MSDN code sample: http://msdn.microsoft.com/en-us/library/5ey6h79d.aspx except that I am saving the altered bitmap instead of displaying it in a Form. The code runs, however the newly saved bitmap is an exact copy of the original image with no sign of any changes having occurred (it's supposed to create a red tint). Could anyone advise what's wrong with my code? The image I'm using is simply a 24bpp bitmap I created in Paint (it's just a big white rectangle!), using IronPython 2.6 and on Windows 7 (x64) with .Net Framework 3.5 SP1 installed.

    Read the article

  • Base class for windows service

    - by user187020
    My new project has a design in which there are number windows services for performing different tasks. I have been given a task to create base class from which all of the windows service will inherit. This base class will perform common functions like creating instances of other windows services by iterating through the config file (may be like Activator.CreateInstance), do event logging on onStart, onStop etc. and may contain some more functionality. Before I start developing stuff, wondering if there is any pattern already in place or someone has good understanding of how to implement this kind of functionality. Any help appreciated.

    Read the article

  • xpcom array can transfer in different xul files ?

    - by jin
    Now I am developing a firefox extension, can I define a global array in a js with the main xul . and I found when I use it in another js with another xul , it could not worked , so I searched the document of Firefox development. I found a common array can not be transfered between two js files with different xul files. and then I difined a xpcom mutablearray in a js: var eleList = Components.classes["@mozilla.org/array;1"] .createInstance(Components.interfaces.nsIMutableArray); but when I want to use it in another js : it still not work , why? Thank you very much!

    Read the article

  • How do you: Symfony functional test on a secure app?

    - by Dan Tudor
    Im trying to perform some function tests in symfony 1.4. My application is secure so the tests return 401 response codes not 200 as expected. I've tried creating a context and authentication the user prior to performing the test but to no avail. Any suggestions? Do I need to pass sfContext to the sfTestFunctional? Thanks include(dirname(FILE).'/../../bootstrap/functional.php'); $configuration = ProjectConfiguration::getApplicationConfiguration('backend', 'test', true); $context = sfContext::createInstance($configuration); new sfDatabaseManager($configuration); $loader = new sfPropelData(); $loader-loadData(sfConfig::get('sf_test_dir').'/fixtures'); // load test data $user = sfGuardUserPeer::retrieveByUsername('test'); $context-getUser()-signin($user); $browser = new sfTestFunctional(new sfBrowser()); $browser- get('/')- with('request')-begin()- isParameter('module', 'video')- isParameter('action', 'index')- end()- with('response')-begin()- isStatusCode(200)- //checkElement('body', '!/This is a temporary page/')- end() ;

    Read the article

  • Microsoft.Biztalk.explorerom.dll reference in asp.net application resulting system.nullreferenceexce

    - by sheetal.oza
    Hi, I have a asp.net application in order to start/stop applications and ports of Biztalk server 2006 r2. I have used "Microsoft.Biztalk.explorerom.dll (C:/Program Files/Biztalk Server 2006/Developer tool) " to achieve this. This is working fine on development machine since biz talk server is installed on local machine. But in the production environment (asp.net web server ,windows 2003 and iis 6.0)...this give System.nullreferenceexception (object reference not set..) at BtsCatalogExplorer explorer = (BtsCatalogExplorer)myGroup.CreateInstance(typeof(BtsCatalogExplorer)) my biztalk server and sql server are on two different box. In my setup (asp.net web application)..adding Microsoft.Biztalk.explorerom.dll and Microsoft.Biztalk.Applicationdeployment.engine.dll to GAC. But still no luck. Do i need to install biz talk server on my local machine even though I am connecting to different biz talk server?? And help is appreciated...

    Read the article

  • Casting Error with Reflection

    - by Mitchel Sellers
    I have an application that uses plugins that are managed via an interface I then dynamically load the plugin classes and cast them to the interface to work with them. I have the following line of code, assume that IPlugin is my interface. IPlugin _plugin = (IPlugin)Activator.CreateInstance(oInfo.Assembly, oInfo.FullyQualifiedName) This should be pretty simple, create the instance and cast it to the interface. I know that the assembly and fully qualified name values are correct, but I am getting the following exception. Exception= System.InvalidCastException: Unable to cast object of type ‘System.Runtime.Remoting.ObjectHandle’ to type ‘MyNamespace.Components.Integration.IPlugin’. at MyNamespace.Components.Integration.PluginProxy..ctor(Int32 instanceId) Any ideas what could cause this?

    Read the article

  • Reflection, invoke

    - by Alaa'
    Hi, I have a dll file, and i took an object from it and called the functions inside this dll by the object, like this way: Command testClass = (Command)assembly.CreateInstance(creatObject); testClass.Execute(); anyway, the i used reflection from some reason. so i need to use invoke function & set values for variables, then calling the basic function Execute. Before: i wrote the following: object returnValue = objectType.GetMethod("setValues").Invoke(classObject, arguments); testClass.Execute(); but it wasnt useful for me. i used the following: object returnValue = objectType.GetMethod("setValues").Invoke(classObject, arguments); object returnValue1 = objectType.GetMethod("Execute").Invoke(classObject, null); i just want to ask if this is right, to calling the execute in this way, and by the way it works! Thank you.

    Read the article

  • Retrieving accessors in IronRuby

    - by rsteckly
    I'm trying to figure out how to retrieve the value stored in the Person class. The problem is just that after I define an instance of the Person class, I don't know how to retrieve it within the IronRuby code because the instance name is in the .NET part. /*class Person attr_accessor :name def initialize(strname) self.name=strname end end*/ //We start the DLR, in this case starting the Ruby version ScriptEngine engine = IronRuby.Ruby.CreateEngine(); ScriptScope scope = engine.ExecuteFile("c:\\Users\\ron\\RubymineProjects\\untitled\\person.rb"); //We get the class type object person = engine.Runtime.Globals.GetVariable("Person"); //We create an instance object marcy = engine.Operations.CreateInstance(person, "marcy");

    Read the article

  • XMLHttpRequest fails in observer method

    - by Michael
    I'm developing a Firefox extension and this code belongs to javascript module. var ajax = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(); ajax.open('GET', "http://www.google.com", true); ajax.onload = function () { Reader.log("Got News"); }; ajax.onerror = function () { Reader.log("Got Error"); }; ajax.send(null); This small code always fails (onerror) if calling from observe method invoked by preference "@mozilla.org/preferences-service;1" Anyone knows how to make this work in observe method?

    Read the article

  • Throwing Exception in CTOR and Smart Pointers

    - by David Relihan
    Is it OK to have the following code in my constructor to load an XML document into a member variable - throwing to caller if there are any problems: MSXML2::IXMLDOMDocumentPtr m_docPtr; //member Configuration() { try { HRESULT hr = m_docPtr.CreateInstance(__uuidof(MSXML2::DOMDocument40)); if ( SUCCEEDED(hr)) { m_docPtr->loadXML(CreateXML()); } else { //throw exception to caller } } catch(...) { //throw exception to caller } } Based on Scott Myers RAII implementations in More Effective C++ I believe I am alright in just allowing exceptions to be thrown from CTOR as I am using a smart pointer(IXMLDOMDocumentPtr). Let me know what you think....

    Read the article

  • javascript binding

    - by Michael
    MyObj = { ajax: null, init: function() { this.ajax = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(); this.ajax.onload = function() { return function() {this.onload.apply(this, [null]);} }; }, onload: function () { Reader.log("I really hope I can use `this.ajax` here"); } } isn't it correct way to bind onload to MyObj? For some reason onload never called. However if I avoid binding and just put this.ajax.onload = this.onload then onload invoked. How to get binding work?

    Read the article

  • Asp.net JSON Deserialize problem

    - by Billy
    I want to deserialize the following JSON string: [ {"name":"photos","fql_result_set":[{"owner":"123456","caption":"Caption 1", "object_id":123},{"owner":"223456","caption":"Caption 2", "object_id":456}]}, {"name":"likes","fql_result_set":[{"object_id":123,"user_id":12156144},{"object_id":456,"user_id":140342725}]} ] and get the POCO like [DataContract] public class Photo{ [DataMember] public string owner{get;set;} [DataMember] public string caption{get;set;} [DataMember] public string object_id{get;set;} } [DataContract] public class Like { [DataMember] public string object_id { get; set; } [DataMember] public string user_id { get; set; } } What should I do? I already have this piece of code: public class JSONUtil { public static T Deserialize<T>(string json) { T obj = Activator.CreateInstance<T>(); MemoryStream ms = new MemoryStream(Encoding.Unicode.GetBytes(json)); System.Runtime.Serialization.Json.DataContractJsonSerializer serializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(obj.GetType()); obj = (T)serializer.ReadObject(ms); ms.Close(); return obj; }

    Read the article

  • How to Create a Generic Method and Create Instance of The Type

    - by DaveDev
    Hi Guys I want to create a helper method that I can imagine has a signature similar to this: public static MyHtmlTag GenerateTag<T>(this HtmlHelper htmlHelper, object obj) { // how do I create an instance of MyAnchor? // this returns MyAnchor, which has a MyHtmlTag base } When I invoke the method, I want to specify a type of MyHtmlTag, such as MyAnchor, e.g.: <%= Html.GenerateTag<MyAnchor>(obj) %> or <%= Html.GenerateTag<MySpan>(obj) %> Can someone show me how to create this method? Also, what's involved in creating an instance of the type I specified? Activator.CreateInstance()? Thanks Dave

    Read the article

  • Calling a COM+ Component remotely using C#

    - by Arturo Caballero
    Hello, I have a little COM+ component as a service on a remote server. I´m trying to execute a method of this component using: Type type = Type.GetTypeFromProgID("ComPlusTest.ComTestClass",serverName); // Create Service Object service = Activator.CreateInstance(type); // Execute Method String result = service.GetType().InvokeMember("LaunchPackage", BindingFlags.InvokeMethod, null, parameters, null).ToString(); The type is returned as null. What is the best way to do this?? The server is Windows 2003 Enterprise, the service is a .NET component wraped as COM+ (I know that I don´t have to do it that way, but the purpose is to itegrate a legacy App with a .NET component) The purpose of this is just to test that the .NET COM+ Component works. Thanks in advance!

    Read the article

  • C++ and Scripting.Dictionary from scrrun.dll

    - by MaxFX
    Hello. I have some trouble with Scripting.Dictionary in C++. I'm trying to use interface IDictionary via smart pointer but methods of creating object don't work and I can't understand why. CoInitialize(NULL); IDictionaryPtr dict; dict.CreateInstance(__uuidof(Dictionary)); _variant_t num1 = 1; _variant_t num2 = 2; dict->Add(&num1, &num2); long i; dict->get_Count(&i); cout << i << "\n"; But method Add does not work and cout of elements in dictionary is always 0. How correct to use Scripting.Dictionary in that case. PS.: I'm getting Scripting interfaces by #import "scrrun.dll"

    Read the article

  • setting value to the instance of primitive types

    - by Samreen
    I have a function which performs some operation i.e. fetches some data from database. The generic it takes is primitive type always i.e. int, char, bool, string etc. I can easily create its instance. But I can't set the value that I have fetched from database to this instance. public T PerformOperation<T>() { object instance = (T)Activator.CreateInstance(typeof(T)); object result=FetchData(); instance = (T)result; //It gives error on this statement } The function is called as: int result = PerformOperation<int>(); Is there some way of casting the object Type to any generic type which is always primitive?

    Read the article

  • Combining SpecFlow table and Moq mocked object

    - by Confused
    I have a situation where I want to use a mocked object (using Moq) so I can create setup and expectations, but also want to supply some of the property values using the SpecFlow Table. Is there a convenient way to create a mock and supply the table for the seed values? // Specflow feature Scenario Outline: MyOutline Given I have a MyObject object as | Field | Value | | Title | The Title | | Id | The Id | // Specflow step code Mock<MyObject> _myMock; [Given(@"I have a MyObject object as")] public void GivenIHaveAMyObjectObjectAs(Table table) { var obj = table.CreateInstance<MyObject>(); _myMock = new Mock<MyObject>(); // How do I easily combine the two? }

    Read the article

  • Constructor invocation returned null: what to do?

    - by strager
    I have code which looks like: private static DirectiveNode CreateInstance(Type nodeType, DirectiveInfo info) { var ctor = nodeType.GetConstructor(new[] { typeof(DirectiveInfo) }); if(ctor == null) { throw new MissingMethodException(nodeType.FullName, "ctor"); } var node = ctor.Invoke(new[] { info }) as DirectiveNode; if(node == null) { // ???; } return node; } I am looking for what to do (e.g. what type of exception to throw) when the Invoke method returns something which isn't a DirectiveNode or when it returns null (indicated by // ??? above). (By the method's contract, nodeType will always describe a subclass of DirectiveNode.) I am not sure when calling a constructor would return null, so I am not sure if I should handle anything at all, but I still want to be on the safe side and throw an exception if something goes wrong.

    Read the article

  • How to load COM object in smart device project?

    - by Daan
    I want to create a .NET CF application for Windows Mobile 5. In this application, I want to load a COM object based on the ProgID (or CLSID). How do I load this COM object in such a way that I can access its methods as if it were just another .NET object? In addition: how can I configure the projects / solutions in Visual Studio in such a way, that when I debug the application, I am sure that the COM object that is loaded is the one that is installed on the device, not one that may be accessible through the debugger? I have tried adding the .ocx file as a Reference, but I get an error, and I am not sure about 'question 2'. I have also tried loading the COM object using Type type = Type.GetTypeFromProgID("my.prog.id") MyObject myObject = (MyObject)Activator.CreateInstance(type) ...but this results in an InvalidCastException on the second line.

    Read the article

  • How to make use of c++ xpcom component from javascript xpcom component.

    - by Prashant
    I have developed a xpcom component using c++. I have GetHWND() method in my component. I have also developed another xpcom component using javascript. I want to make use of GetHWND function in javascript xpcom component. I am using following code to do so. netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); var myComponent = Components.classes['@dougt/WebLock'].createInstance(Components.interfaces.IWebLock); myComponent = myComponent.QueryInterface(Components.interfaces.IWebLock); var res = myComponent.GetHWND(mainWindow.content.document); But it is giving error as "ReferenceError: netscape is not defined". I did google search but did not find the solution to it. I am using Mozilla Firefox and I want it to get worked for the same. Please help me to come out of this problem. Thanks in advance.

    Read the article

  • Constructor invokation returned null: what to do?

    - by strager
    I have code which looks like: private static DirectiveNode CreateInstance(Type nodeType, DirectiveInfo info) { var ctor = nodeType.GetConstructor(new[] { typeof(DirectiveInfo) }); if(ctor == null) { throw new MissingMethodException(nodeType.FullName, "ctor"); } var node = ctor.Invoke(new[] { info }) as DirectiveNode; if(node == null) { // ???; } return node; } I am looking for what to do (e.g. what type of exception to throw) when the Invoke method returns something which isn't a DirectiveNode or when it returns null (indicated by // ??? above). (By the method's contract, nodeType will always describe a subclass of DirectiveNode.) I am not sure when calling a constructor would return null, so I am not sure if I should handle anything at all, but I still want to be on the safe side and throw an exception if something goes wrong.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >