when we create an application in VC#, talking about .net 3.5 in particular, the are comipled to CLR, what i want is that they should be compiled to EXE executable code that doesn't require .NET Framework Environment for them to run. Is it possible
...
I've just read the following in the CLI specification regarding SecurityExceptions upon method calls:
The security check can occur when the CIL is converted to native code rather than at runtime.
How does Microsoft's implementation handle this?
If, for example, only a certain usergroup is allowed to access some class, and i have pla...
This page from SQL Server 2008 BOL, talks about CLR Stored Procedures and has a section labelled, "Table-Valued Parameters", which talks about how they can be advantageous. That's great - I'd love to use TVPs in my CLR procs, but unfortunately this seems to be the only reference in the universe to such a possibility, and the section does...
Is there a way to find out when a managed thread has changed user contexts due to impersonation? I'd like to be able to do this from unmanaged code that is observing the managed code using Microsoft's .NET Profiling APIs.
For example some managed code may be running in user context A, and then impersonate user B. The impersonation may h...
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 believe (correct me if i am wrong), according to the C# rule for value types, there is no default constructor. The CLR will define the one for zeroing out the field values.
For reference type :
class Test
{
private string Name;
}
Will the default constructor be supplied by C# or the CLR?
...
Extract from CLR via C# on Boxing / Unboxing value types ...
On Boxing: If the nullable instance is not null, the CLR takes the value out of the nullable instance and boxes it. In other words a Nullable < Int32 > with a value of 5 is boxed into a boxed-Int32 with a value of 5.
On Unboxing: Unboxing is simply the act of obtaining a refe...
I am working on a wxWidgets console application that I want to call into = a C# DLL from, via the CLR. Unfortunately, the application hiccups in the wxWidgets application initialization code because OleInitialize is failing. The error I'm seeing is a pop-up simply stating "Cannot initialize OLE."
It seems that this problem is usually ...
Is it possible to use reflection to know what the code is doing, not the types and methods, but rather what is inside the method (if statements, assignment and so on). I know I can disassemble it, but I need to analyze a class at runtime using C#, for example find out how many if conditions there are...
This tool needs to be in C#, any ...
In my application, I'm seeing that at times the Dispose method on my main form gets called for apparently no reason. I'm not closing the app through the UI, I'm not sending a close windows message or calling Close() anywhere, however the Dispose method still gets called. Here is the call stack:
Bitter.Shell.exe!Bitter.Shell.MainForm.Dis...
Hello,
I've come across a scenario where I want to pass a large amount of data to a Stored Procedure for generating some dynamic SQL.
The data I want to pass is stored in this Json/C# class object that I use in my ASP.NET MVC web project.
[
{
"code":"ABC123",
"Count": "12998",
"Params":
[
{"name": "Recent", "value": "0-12...
Guys lease help me out I think I'm close, but I'm missing something.
Background
I'm rewriting a SQL CLR assembly (stored procedure), my assembly contacts another resource and gets back XML. I want to return this XML as a recordset, NOT a scalar value.
From what I've seen, this is how to return a recordset:
SqlContext.Pipe.Send(mySqlD...
I would like to gather as much information as possible regarding API versioning in .NET/CLR, and specifically how API changes do or do not break client applications. First, let's define some terms:
API change - a change in the publicly visible definition of a type, including any of its public members. This includes changing type and mem...
I read some articles about Application Domain.The deep reading finally resulted in whirling
confusion.So I submit the questions to subject experts.
1) As CLR takes care of creating AppDomain as and when needed,could there be a critical
need to go for manual Application Domain Creation ?
2)I heard that one application domain can not...
If I create a dll called xaisoft.dll like this:
Using System;
Using System.Reflection;
[assembly:AssemblyVersion("1.0.0.0")]
public class XaiSoft
{
public string PrintName()
{
return "XaiSoft";
}
}
and then compile it with
csc /t:library lib.cs
and then create a process assembly to use my library like so:
Usin...
I'm writing a SQL CLR assembly that will be deployed to a third-party database server, but which needs to execute stored procedures residing in my database server. All the pieces are in place, but I don't know how to make the connection string configurable. Articles such as this: http://msdn.microsoft.com/en-us/library/ms345135%28SQL.90%...
I have an application that needs to do a lot of impersonation, due to moving and creating many files across protected network shares. I've created a simple static class that has a method takes a user, domain, password and a delegate that contains code you need run under the impersonation context.
The problem I've been running into is w...
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 ...
In .NET, the 'Platform Target: Any CPU' compiler option allows a .NET assembly to run as 64bit on a x64 machine, and 32bit on an x86 machine. It is also possible to force an assembly to run as x86 on an x64 machine using the 'Platform Target: x86' compiler option.
Is it possible to run an assembly with the 'Any CPU' flag, but determine ...
I was always a big fan of HyperTalk back in the days of Stacks in HyperCard. Are there any HyperTalk-like languages available for use with Visual Studio and the CLR? The benefits of using natural language syntax (e.g. Get the third line of text in the textbox named Comments) and strong-typing would be magnificant. The real goal is to ...