clr-hosting

Is it possible to load two versions of the .NET runtime in the same process?

There are two scenarios I need to clarify: An executable compiled with .NET 3.5 needs to use a library compiled with .NET 1.1 and the library must run on the 1.1 runtime. An executable compiled with .NET 1.1 needs to use a library compiled with .NET 3.5. I cannot find a reliable source stating that it is not possible to load two vers...

Hosting CLR - Bad parameters

Hello, I'm trying to host the CLR inside my C++ application and I'm having problems invoking the entry point of the managed application. The entry point is defined as usual: static void Main(string[] args) And here's the actual C++ code: CComPtr<_MethodInfo> entryPoint; hr = assembly->get_EntryPoint(&entryPoint); // this works just ...

Hosting .NET method in SQL Server CLR

I have been asked to create a function in SQL Server 2005 that is a CLR hosted function I have created in .NET 3.5. Do CLR functions hosted in SQL have access to App.Config files or do all config options need to be passed as paramaters? ...

How does Excel VSTO Work?

Hi How does Excel VSTO Work? If I create an Excel Workbook solution in Visual Studio 2005 then I can happily code away, access a full Excel object model and even treat the Excel sheet as a design surface. When I build the solution I get a .XLS file and a .DLL (containing my C# code). I can now start up the Excel sheet just by double ...

How to split Dot Net Hosting function when calling via C++ dll

I am exploring calling .net methods from unmanaged C++ code and have found the function below in How To Inject a Managed .NET Assembly (DLL) Into Another Process void StartTheDotNetRuntime() { // Bind to the CLR runtime.. ICLRRuntimeHost *pClrHost = NULL; HRESULT hr = CorBindToRuntimeEx( NULL, L"wks", 0, CLSID_CLRRun...

Injecting a CLR host into a running process - possible?

This way lies madness, I know. I have an executable (the source code to which I do not have access) that I would like to extend via .NET. It's a native executable, so I would need to inject a CLR host in order to do this. My basic idea is to provide scripting-like functionality via a .NET language (C#, for example) and provide hooks in ...

Is it possible to host the CLR in a C program?

Every example I can find is in C++, but I'm trying to keep my project in C. Is it even possible to host the CLR in a C program? If so, can you point me to an example? ...

error C2440: 'function' : cannot convert from 'const IID' to 'DWORD'

While trying to host the CLR, I keep getting this: error C2440: 'function' : cannot convert from 'const IID' to 'DWORD' My code: ICLRRuntimeHost *host = NULL; HRESULT result = CorBindToRuntime(NULL, L"wks", CLSID_CLRRuntimeHost, IID_ICLRRuntimeHost, (PVOID*)&host); This is in C, by the way. Not C++. EDIT: When I compile th...

Is it possible to reload the CLR?

I'm fiddling with a project where the CLR is hosted within a C application. Is there a supported way to unlink the CLR and relaunch it? ...

What/Where is the value of E_CLR_ALREADY_STARTED?

The docs for ICLRRuntimeHost::SetHostControl claim that it can return E_CLR_ALREADY_STARTED. I have been unable to find a definition for this value. Ideally, I'd like to know what the appropriate header to include is (it does not appear to be in corerror.h) but if someone can provide me with the canonical value too I can live with that. ...

What is CLR hosting?

What is CLR hosting? What is the use case for that? ...

Azure and native code

It looks like you can host native code on Azure: http://msdn.microsoft.com/en-us/library/dd573362.aspx. Is it possible to run a socket server (listening tcp/udp) here? And even hosting a CLR on top? ...

Cannot create a WPF UserControl in a Clr 4.0 self hosting application because of a stackoverflow error

Hi, I managed to host the CLR 2.0 in a Delphi win32 application that was able to create and host WPF controls inside a Delphi control, something similar to the ElementHost for WinForms applications. Now, I want to move my solution to the CLR 4.0 and everything works fine except when I try to create a UserControl that has an associated ...