@Spook:
Mergebin ist auch im offiziellen Repository vom ADO.NET 2.0 Provider für SQLite auf Sourceforge verfügbar:
http://sqlite-dotnet2.cvs.sourceforge.net/viewvc/sqlite-dotnet2/SQLite.NET/tools/mergebin/
Ich konnte die VS-Solution problemlos in VS laden und kompilieren.
Allerdings muss die native DLL bestimmte Voraussetzungen erfüllen.
Zitat aus Ilmerge:
| Zitat: |
The native DLL must have an unused section in it, into which the
.NET assembly will be inserted. You can do this with the following code:
#pragma data_seg(".clr")
#pragma comment(linker, "/SECTION:.clr,ER")
char __ph[92316] = {0}; // 92316 is the number of bytes to reserve
#pragma data_seg()
You would then specify /SECTION:.CLR in the command-line for the location to
insert the .NET assembly. The number of bytes reserved in the section needs
to be equal to or more than the number of bytes returned by the /I parameter.
The native DLL must also export a function that calls _CorDllMain in
MSCOREE.DLL. This function must have the same parameters and calling
conventions as DllMain, and its name must have the word "CORDLLMAIN"
in it. |
Die verrausetzungen dürfte kaum eine DLL haben, da sie speziell kompiliert werden muss.
Da der Sourcecode benötigt wird, man genauso gut gleich eine Mixed Mode Assembly erstellen.
Siehe:
Gemischte (systemeigene und verwaltete) Assemblys
Tante Edit meint:
https://github.com/fancycode/MemoryModule
Ist im Endeffekt genau das was du suchst. Ist reiner C Code mit viel WIN-API.
Sowas hab ich auch schon mal gesucht. Der Code sollte sich (theoretisch) relativ leicht in .net Umsetzen lassen.
Mal schauen, solche Sachen (C/Native <-> .net Interop) finde ich immer sehr spannend, evtl. hab ich mal Lust und Laune und setzte mich mal da ran.