clr

How do I decide whether to use ATL, MFC, Win32 or CLR for a new C++ project?

烈酒焚心 提交于 2019-11-28 15:46:40
I'm just starting my first C++ project. I'm using Visual Studio 2008 . It's a single-form Windows application that accesses a couple of databases and initiates a WebSphere MQ transaction. I basically understand the differences among ATL, MFC, Win32 (I'm a little hazy on that one actually) and CLR, but I'm at a loss as to how I should choose. Is one or more of these just there for backward-compatibility? Is CLR a bad idea ? Any suggestions appreciated. Edit: I've chosen C++ for this project for reasons I didn't go into in the post, which are not entirely technical. So, assuming C++ is the only

Are there any .NET CLR/DLR implementations of ECMAScript?

泄露秘密 提交于 2019-11-28 15:43:56
Does anyone know of real (i.. no vaporware) implementations of ECMAScript targeting the .NET CLR/DLR ? Ideally something like what Rhino is for Java . A solid port of Rhino running on .NET Framework / Mono Framework would be perfect. I've only seen a handful of projects mentioned but never seen any come to light or in reality anything that I've ever been able to run script on. Here's what I know about already: MSScriptControl ActiveX Control : AFAIK, this was Microsoft's last real ECMAScript-compliant implementaiton (runs JScript 5.7). I've integrated with MSScriptControl but don't consider

What can you do in MSIL that you cannot do in C# or VB.NET? [closed]

爱⌒轻易说出口 提交于 2019-11-28 14:55:04
All code written in .NET languages compiles to MSIL, but are there specific tasks / operations that you can do only using MSIL directly? Let us also have things done easier in MSIL than C#, VB.NET, F#, j# or any other .NET language. So far we have this: Tail recursion Generic Co/Contravariance Overloads which differ only in return types Override access modifiers Have a class which cannot inherit from System.Object Filtered exceptions (can be done in vb.net) Calling a virtual method of the current static class type. Get a handle on the boxed version of a value type. Do a try/fault. Usage of

Using boost threads when compiling with /clr

痴心易碎 提交于 2019-11-28 14:13:22
I have gave up on creating a GUI directly from the windows API so I'm going to use forms. I would like to multithread my app and wrap the GUI in a class and put it in a separate thread. When I click a button, etc, it would change a value in a struct that will be read from the main thread. My problem is, when I compile my application I get an error with the linker. 1>Core.obj : error LNK2022: metadata operation failed (8013119F) : A TypeRef exists which should, but does not, have a corresponding TypeDef: (dummy): (0x0100001f). My code for main is as follows. int main() { //create thread object

Unload event for the default Application Domain?

孤人 提交于 2019-11-28 12:42:00
Is there an Unload event, or any event, notification, message, mechanism, or hook, that i can use to be notified before the "default" application domain is unloaded? i have code that needs to know when the application domain (almost always the default domain) is ending. Note: i don't know what kind of application a developer will be creating when he uses my code. It could be: a console application a WinForms application an ASP.net application an ASP.net web-site Runtime Callable Wrapper (RCW) COM object a Windows Explorer shell extension or a Windows Service Either way, i need to know when the

Is CLR loaded and initialized everytime,when a new managed application is loaded?

和自甴很熟 提交于 2019-11-28 12:21:31
Is CLR loaded and initialized everytime, when a new managed application is loaded and there is a managed application already present? e.g. If on my machine, application "TestApp" is running and after that I start another application "DemoApp". In this case, wiill CLR be loaded again for DemoApp? Or it will use the same one which is loaded by TestApp? Yes, and assemblies are JIT compiled, heaps are allocated and so forth. The Windows image loader will help a bit but in general the CLR overhead is per process. Marek CLR is not fully loaded every time. The article linked below mentions a "hot

SQL Server - Using CLR integration to consume a Web Service

别来无恙 提交于 2019-11-28 12:17:56
There are a few tutorials on the web that describe consuming a Web Service using SQL Server 2005's CLR integration. For the most, the process seems pretty convoluted. I've run into several issues including the need to change my database's trust level, and using the sgen tool to create a static XmlSerializer assembly; and I still haven't gotten it working right... (I'm sure I just need to put a little more time and energy into it) What are the security, performance, and maintenance implications when going to this type of architecture? This would likely be a fairly heavily-used process, and ease

.NET Collections and the Large Object Heap (LOH)

孤街醉人 提交于 2019-11-28 12:06:40
Are .NET collections with large number of items apt to be stored in the LOH? I'm curious about List and Dictionary specifically. In my code, I store a large number (40k+) of relatively small objects (lets say 1k) in temporary Lists and Dictionarys for processing. Does the number of items in these collections increase the likelihood of being put on the LOH? For list, assuming that List is implemented as a doubly linked list, then the number of elements should not increase the size of the actual List object, but I'd like to know for sure. Thanks Objects will only be stored on the LOH if they are

How to make this CLR work with 2005?

时光毁灭记忆、已成空白 提交于 2019-11-28 12:01:24
问题 I am trying to make a clr stored procedure for a sql 2005 database that uses .net 3.5 assemblies So first I had to change sql 2005 to recognize system.core as unsafe what I am not too happy about(I rather have had it say SAFE). Now I get this error Msg 6522, Level 16, State 1, Procedure StoredProcedure1, Line 0 A .NET Framework error occurred during execution of user defined routine or aggregate 'StoredProcedure1': System.Security.HostProtectionException: Attempted to perform an operation

How does the GC update references after compaction occurs

谁说我不能喝 提交于 2019-11-28 11:59:51
The .NET Garbage Collector collects objects (reclaims their memory) and also performs memory compaction (to keep memory fragmentation to minimum). I am wondering, since an application may have many references to objects, how does the GC (or the CLR) manage these references to objects, when the object's address changes due to compaction being made by the GC. The concept is simple enough, the garbage collector simply updates any object references and re-points them to the moved object. Implementation is a bit trickier, there is no real difference between native and managed code, they are both