Click here to Skip to main content
15,886,724 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: DiscUtils - a replacement? Im desperate to solve this problem. Pin
Eddy Vluggen22-Jul-16 2:59
professionalEddy Vluggen22-Jul-16 2:59 
GeneralRe: DiscUtils - a replacement? Im desperate to solve this problem. Pin
mInternauta22-Jul-16 3:13
mInternauta22-Jul-16 3:13 
GeneralRe: DiscUtils - a replacement? Im desperate to solve this problem. Pin
Eddy Vluggen22-Jul-16 3:25
professionalEddy Vluggen22-Jul-16 3:25 
AnswerRe: DiscUtils - a replacement? Im desperate to solve this problem. Pin
Gerry Schmitz19-Jul-16 6:17
mveGerry Schmitz19-Jul-16 6:17 
GeneralRe: DiscUtils - a replacement? Im desperate to solve this problem. Pin
mInternauta20-Jul-16 4:25
mInternauta20-Jul-16 4:25 
GeneralRe: DiscUtils - a replacement? Im desperate to solve this problem. Pin
Daniel Pfeffer20-Jul-16 20:58
professionalDaniel Pfeffer20-Jul-16 20:58 
GeneralRe: DiscUtils - a replacement? Im desperate to solve this problem. Pin
mInternauta21-Jul-16 1:54
mInternauta21-Jul-16 1:54 
QuestionUnmanaged Hosting of .NET Framework Version 4 Pin
Derek Tortonian5-Jul-16 10:29
Derek Tortonian5-Jul-16 10:29 
You should have a good sense of humor to read this question.
I'm writing an unmanaged project to host the .NET Framework CLR (version 4), and execute some of it's code. I'm writing the application in assembly language (but, you don't have to understand assmbly language to understand this question), and I don't have Visual Studio installed on my computer.
Anyway, I've got all the preliminaries working correctly. I've called Enumerate Installed Runtimes, and called ICLRMetaHost.GetRuntime which causes the CLR (version 4) to be loaded but not initialized,...and then, called, ICLRRuntimeHost.Start method successfully. When viewing the process with ProcessExplorer, I see the clr.dll (version 4) being loaded into the virtual address space.
Next, I call ICLRRuntimeInfo:GetInterface to retreive a pointer to the ICorRuntimeHost interface, and use that pointer to call
ICorRuntimeHost:GetDefaultDomain. Then, I call IUnknown:QueryInterface to retreive the DefaultDomain (IID_AppDomain) interface pointer. At this point, mscorlib.dll or one of its variants (mscorlib.ni.dll) is loaded by the CLR into the address space.
What I need now is to enumerate through some of the basic .NET types and methods, to retrieve addresses. And, what I need to do this, and don't have are definitions for the vtables of the interfaces of, for instance, _Assembly which expose the public members of the System.Reflection.Assembly class to unmanaged code. These are huge COM interfaces, and, to execute their methods correctly, one must know the offset of the method (function pointer) from the address of the interface virtual function table.
To actually call these interface methods in assembly you don't even have to prototype the function (although doing so makes your code much more readable and understandable), all you have to is push the appropriate parameters onto the stack, and call the function with the function pointer.
So, finally,...my question: where can I find the interface definition files, for mscorlib COM interfaces like: System.Runtime.InteropServices._Assembly, or, System._AppDomain interface, or, especially, System._Type...???
I've been using the OLE/COM Object Viewer to do this,...assuming that the mscorlib Type Library has the exact same interface definitions as the actual .NET Framework classes, types and methods,...but, I'm crashing my application with (presumably) incorrect parameters or signatures,...

modified 5-Jul-16 17:17pm.

AnswerRe: Unmanaged Hosting of .NET Framework Version 4 Pin
Super Lloyd5-Jul-16 16:08
Super Lloyd5-Jul-16 16:08 
AnswerRe: Unmanaged Hosting of .NET Framework Version 4 Pin
Super Lloyd5-Jul-16 19:55
Super Lloyd5-Jul-16 19:55 
GeneralRe: Unmanaged Hosting of .NET Framework Version 4 Pin
Derek Tortonian6-Jul-16 10:27
Derek Tortonian6-Jul-16 10:27 
GeneralRe: Unmanaged Hosting of .NET Framework Version 4 Pin
Super Lloyd6-Jul-16 13:25
Super Lloyd6-Jul-16 13:25 
GeneralRe: Unmanaged Hosting of .NET Framework Version 4 Pin
Derek Tortonian7-Jul-16 8:50
Derek Tortonian7-Jul-16 8:50 
GeneralRe: Unmanaged Hosting of .NET Framework Version 4 Pin
Super Lloyd7-Jul-16 14:35
Super Lloyd7-Jul-16 14:35 
GeneralRe: Unmanaged Hosting of .NET Framework Version 4 Pin
Derek Tortonian8-Jul-16 10:05
Derek Tortonian8-Jul-16 10:05 
GeneralPROBLEM SOLVED Pin
Derek Tortonian13-Jul-16 10:08
Derek Tortonian13-Jul-16 10:08 
GeneralRe: PROBLEM SOLVED Pin
Super Lloyd13-Jul-16 17:50
Super Lloyd13-Jul-16 17:50 
GeneralRe: PROBLEM SOLVED Pin
Derek Tortonian15-Jul-16 13:10
Derek Tortonian15-Jul-16 13:10 
GeneralRe: PROBLEM SOLVED Pin
Super Lloyd15-Jul-16 17:02
Super Lloyd15-Jul-16 17:02 
QuestionDapper Query Async calling a stored procedures with parameters Pin
DotNetFellow29-Jun-16 3:43
DotNetFellow29-Jun-16 3:43 
AnswerRe: Dapper Query Async calling a stored procedures with parameters Pin
Richard Deeming29-Jun-16 3:55
mveRichard Deeming29-Jun-16 3:55 
AnswerRe: Dapper Query Async calling a stored procedures with parameters Pin
Pratik_Scott30-Jun-16 6:47
Pratik_Scott30-Jun-16 6:47 
QuestionCode special to MVC Pin
larsp77728-Jun-16 2:13
larsp77728-Jun-16 2:13 
AnswerRe: Code special to MVC Pin
Dave Kreskowiak28-Jun-16 2:37
mveDave Kreskowiak28-Jun-16 2:37 
GeneralRe: Code special to MVC Pin
larsp77728-Jun-16 2:46
larsp77728-Jun-16 2:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.