HANDLE Proc;
HMODULE hDLL;
hDLL = LoadLibrary(TEXT("mscoree.dll"));
if(hDLL == NULL)
cout << "No Dll with Specified Name" << endl;
else
{
cout << "DLL Handle" << hDLL << endl<<endl;
cout << "Getting the process address..." << endl;
Proc = GetProcAddress(hDLL,"GetRequestedRuntimeVersion");
if(Proc == NULL)
{
FreeLibrary(hDLL)...
I was thinking many times, now days that we have Linq and other CLR language-specific built-in search, sort and other capabilities over tables, collections and object, why not have the 'SQL Server' or rather call it 'CLR Server' (not only OOP Server but CLR 3.5) which will be a CLR (or COM) DLL that exposes the data allowing users linqin...
I'm attempting to debug an ASP.NET application. It's particularly difficult as the bug only occurs in the released code deployed to production. It cannot be reproduced in the development or test environments.
I'd like to investigate further by creating a dump file at a particular line in the code where the problem is happening. However ...
I'm trying to understand why the second example below works with no issues, but the first example gives me the exception below. It seems to me that both examples should give an exception based on the description. Can anyone enlighten me?
Unhandled Exception:
System.TypeLoadException: Could not
load type 'StructTest.OuterType' fro...
Is there a way for me to hook the exit of managed threads (i.e. run some code on a thread, just before it exits?)
I've developed a mechanism for hooking thread exit that works for some threads. Step 1: develop a 'hook' STA COM class that takes a callback function and calls it in its destructor. Step 2: create a ThreadStatic instance of ...
Does the .NET CLR runtime know how to optimize/inline simple property getters at runtime? For example:
property int Length { get; set; }
Will this be executing the "Length__get" function (building a stack for it, jumping to execute the code, etc) once it is JIT'd at runtime? Or is the jitter smart, and knows that this can just be re...
I have a CLR stored procedure that references an assembly created in VS 2008 that uses Linq. Lets call this assembly 'MyLib'.
I can't seem to get 'MyLib' into my SQL 2005 database. I do the following:
CREATE ASSEMBLY [MyLib]
FROM 'C:\MyLib\bin\Release\MyLib.dll'
WITH PERMISSION_SET = UNSAFE
GO
But I get the error:
Assembly 'My...
I have a native C Dll that calls 'LoadLibrary' to load another Dll that has the /clr flag turned on. I then use 'GetProcAddress' to get a function and call it on dynamically loaded dll. I would like to step into the dynamic library in the debugger, but the symbols never load. Any idea?
And I should have said I'm using Visual Studio 2...
Essentially need to read the dependencies programmatically without loading the assembly itself, as then you can't unload them
...
Possible Duplicate:
How to protect dlls?
I am wondering how I may protect my DLL files from being used by other people. By "used" I mean, referenced/imported or whatever into projects and the functions and variables inside used.
I only wish it to be used by my applications... is there a way to protect it?
...
I read some where that the .net runtime was effectively Visual Basic 6 (albeit completely re-written)
How true is this? or is this just another .net Myth?
Darknight
...
We have two services developed in Visual Studio .NET 2008 with VB.NET. Both were developed completely separately by separate individuals (one of them being myself), but both are reporting the same error during boot: "service hung on starting" appears in the System event log after booting. The services proceed to start up fine after tha...
Let's say you write an app in C#, VB, anything with .NET
When you hit build, does it really compile your code? I thought so until I started using redgates reflector on some of my assemblies and saw my code verbatim. I would have expected loops to be unrolled and another plethora of optimizations, instead nothing.
So when does the compil...
Summary
We have to understand which part of our (or third party, probably CLR itself) code leads to boxing of integers.
Problem description
We have a rather big application where we observe high allocation rate of System.Int32 instances. With the help of Memory Profiler we see a small number of long existing Int32 instances (18, to be...
I would like to test my app under the Mono runtime (to see if the SIMD support can offer me any performance improvements). I am compiling my app with csc.exe (in Visual Studio 2005) and then running it as mono.exe --debug MyApp.exe. However, Mono is using their own implementation of the core libraries (System.IO, etc.) which have some...
Is it possible to build a .NET assembly callable from a native assembly writing in C# alone without using COM?
...
Have I stumbled upon implementation-defined behavior?
Here is the context:
public class GenericClass<T>
{
public class NestedGenericClass<U>
{
public void GenericMethod<K>()
{
}
}
}
Here's the behavior. This unit test passes as written. My actual questions are listed as the comment before the "wack...
Is there any way the .NET 4.0 (or earlier) reflection API to resolve a generic type parameter? See the two lines after my ArgumentException comment for my current attempt.
[TestMethod]
public void TestGenericParameterTokenResolution()
{
Type genericParameter = typeof(List<>).GetGenericArguments()[0];
Assert.IsTrue(genericParamet...
I know that Java's HotSpot JIT will sometimes skip JIT compiling a method if it expects the overhead of compilation to be lower than the overhead of running the method in interpreted mode. Does the .Net CLR have work based upon a similar heuristic?
...
I'm looking for books and literature on the inner workings of the CLR (and/or possibly the DLR), my long time goal is to implement a simple language on the CLR.
...