clr

Reflection in SQL Server 2008?

别说谁变了你拦得住时间么 提交于 2019-12-11 02:51:13
问题 I want to know, is there any reflection support in SQL Server 2008, like as c# support reflection. Basically I am curious about how SQL Server implements all our (where, orderby, exists) clauses. How it would implement all these in behind the scenes. 回答1: It's not that long ago when if you compared SQLServer to most object-oriented languages, that you would have been struck by the fact that SQLServer reveals a lot more about its inner workings than they do. Its inherent to the concept of SQL

Loading CLR in C++, Start() problem

大城市里の小女人 提交于 2019-12-11 02:42:48
问题 So I'm trying to load up the .NET 4 runtime and run my own C# DLL. The Start() method is throwing a HRESULT=0x1 error. If I comment out the start code, the C# DLL loads and executes, then the Stop() method throws a HRESULT=0x8000ffff error. I've looked for hours and all the code looks like what I have below (I left out all my debugging/error handling). Thank you very much for any tips in advance! =) void DotNetLoad() { ICLRRuntimeHost *pClrHost = NULL; ICLRMetaHost *lpMetaHost = NULL;

Hidden Boxing in the BCL?

老子叫甜甜 提交于 2019-12-11 02:28:07
问题 Recently I became aware that there are some parts in the BCL that still use some "legacy" code that was probably written before generics were introduced in v2.0 of the framework. Apparently, parts of that "legacy" code may cause the CLR to perform numerous boxing/unboxing operations. Since excessive usage of boxing is never a good thing, I wanted to know whether there are some other, critical places in the BCL that you've noticed that boxing occur? Thanks 回答1: Note that, for the specific

Can a referenced DLL be loaded even if it's not called?

女生的网名这么多〃 提交于 2019-12-11 02:20:51
问题 Env.: .NET / VS2008 Hi All, My app uses a 3rd party DLL assembly separately installed on some systems (clearly identified) but not all of them. Which means that on some systems, the DLL is not there hence must not be called. To solve this, I have 2 versions of the app (using 2 configurations) for the 2 use cases. In one of them, all calls to the DLL are #if'ed out. Since there are no calls to the DLL compiled at all in the app(they're #if'ed out), is it safe to assume that the app won't try

Is there any class count limit in MFC project compiled with /CLR

孤者浪人 提交于 2019-12-11 01:34:57
问题 With the risk to fall into too specific question... Given a C++ MFC (mixed, not shaked) project compiled with /CLR, I have 200 classes already defined. When I add a new empty class to this project, an error raises when I compile and execute in debug mode. An unhandled exception of type 'System.IO.FileLoadException' occurred in Unknown Module. Additional information: Could not load file or assembly 'ProjectA, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.

VS 2012 SSDT build CLR with IEnumerable failing on generated syntax

*爱你&永不变心* 提交于 2019-12-11 01:05:41
问题 I'm attempting to reuse some code found here. After adding a new using the c# (shown below) seems to be fine. When I go to publish the database, however, the code generator does not seem to recognize the IEnumerable type and ends up producing an error. The actual error (Incorrect Syntax near AS) from the generated code below is obvious, so my question is how can I get SSDT to generate the correct code and avoid the cause of the error? (I assume that I can add the CLR manually, however, I

/Mt and /clr not compatible

故事扮演 提交于 2019-12-11 00:37:35
问题 I have been using EIGEN to solve systems of equation. the only way I was successful to compile my code is by using /CLR. When I try to build my project.I noticed that in order for my exe to work on other pc, I need to build it using /MT (not DLL). problem they are not compatible. if I remove /CLR, my project wont compile, and if I leave the DLL, my exe works on other pc but gives unrealistic value. Can someone advise on what to do. This is my first program I write. I am a mechanical engineer

Is overriding a final (IL) / sealed (C#) method with a different name legal?

被刻印的时光 ゝ 提交于 2019-12-11 00:00:00
问题 I have a hierarchy of classes: class C1 { virtual object M1(); } class C2: C1 { override sealed object M1(); } class C3: C2 { // I want to override M1() // CSC gives me an error, obviously override object M1(); } But it seems there is a way. In IL, you can override a method with a different name. So, we change the name ( M1_2() overrides M1() ), say it overrides the method on the base class ( C1::M1() ), a la explicit interface implementation, and the "final" on the intermediate ( C2 ) class

Failed to create assembly 'System.ServiceModel.Internals' in SQL

心已入冬 提交于 2019-12-10 23:44:47
问题 I am trying to create an assembly in SQL but I am not able to load the following DLL. System.ServiceModel.Internals create assembly [system.servicemodel.internals] from 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.ServiceModel.Internals.dll' with permission_set = safe; go I get this error: Msg 6218, Level 16, State 2, Line 2 CREATE ASSEMBLY for assembly 'System.ServiceModel.Internals' failed because assembly 'System.ServiceModel.Internals' failed verification. Check if the

Should ApplicationBase be different for the sandbox AppDomain?

只谈情不闲聊 提交于 2019-12-10 23:38:32
问题 What are the exact security implications of setting ApplicationBase of a slave sandbox domain to the same path as the hosting domain? I found MSDN guidelines that state that ApplicationBase should be different for the slave domain "If the ApplicationBase settings are the same, the partial-trust application can get the hosting application to load (as fully trusted) an exception it defines, thus exploiting it" (p. 3): http://msdn.microsoft.com/en-us/library/bb763046.aspx How exactly would this