All Projects → 3F → Dllexport

3F / Dllexport

Licence: mit
.NET DllExport with .NET Core support (aka 3F/DllExport)

Labels

Projects that are alternatives of or similar to Dllexport

Ergo
The management of multiple apps running over different ports made easy
Stars: ✭ 452 (-20.84%)
Mutual labels:  tools
Easywatermark
🔒 🖼 Securely, easily add a watermark to your sensitive photos. 安全、简单地为你的敏感照片添加水印,防止被小人泄露、利用
Stars: ✭ 519 (-9.11%)
Mutual labels:  tools
Nav
🔍 发现导航 , 一个非常强大的静态导航网站(支持SEO)
Stars: ✭ 544 (-4.73%)
Mutual labels:  tools
Pentestkit
Useful tools and scripts during Penetration Testing engagements
Stars: ✭ 463 (-18.91%)
Mutual labels:  tools
Appwrite
Appwrite is a secure end-to-end backend server for Web, Mobile, and Flutter developers that is packaged as a set of Docker containers for easy deployment 🚀
Stars: ✭ 14,592 (+2455.52%)
Mutual labels:  tools
Dearpygui
Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies
Stars: ✭ 6,631 (+1061.3%)
Mutual labels:  tools
Information collection handbook
Handbook of information collection for penetration testing and src
Stars: ✭ 447 (-21.72%)
Mutual labels:  tools
Ios
Most usable tools for iOS penetration testing
Stars: ✭ 563 (-1.4%)
Mutual labels:  tools
Terraforming Rails
Terraforming legacy Rails applications guides and tools
Stars: ✭ 517 (-9.46%)
Mutual labels:  tools
Tools
Some useful tools written in python.
Stars: ✭ 543 (-4.9%)
Mutual labels:  tools
Hackerpro
All in One Hacking Tool for Linux & Android (Termux). Make your linux environment into a Hacking Machine. Hackers are welcome in our blog
Stars: ✭ 474 (-16.99%)
Mutual labels:  tools
Prjxray
Documenting the Xilinx 7-series bit-stream format.
Stars: ✭ 491 (-14.01%)
Mutual labels:  tools
Yourview
YourView is a desktop App in MacOS based on Apple SceneKit. You may use it to view iOS App's view hierarchy 3D.
Stars: ✭ 528 (-7.53%)
Mutual labels:  tools
Bottomline
A full-on PHP manipulation utility-belt that provides support for the usual functional. 📦
Stars: ✭ 462 (-19.09%)
Mutual labels:  tools
Sherlock
🔎 Hunt down social media accounts by username across social networks
Stars: ✭ 28,569 (+4903.33%)
Mutual labels:  tools
Cli
the package manager for JavaScript
Stars: ✭ 5,277 (+824.17%)
Mutual labels:  tools
Github Serendipity.github.io
快速找到流行开源项目 browse and find high quality repo quickly and elegantly, with trending, rank, awesome, topics, similar dimensions
Stars: ✭ 524 (-8.23%)
Mutual labels:  tools
404starlink Project
Focus on promoting the evolution of tools in different aspects of security research.专注于推动安全研究各个领域工具化.
Stars: ✭ 569 (-0.35%)
Mutual labels:  tools
Ai Research Tools
🔨AI 方向好用的科研工具
Stars: ✭ 550 (-3.68%)
Mutual labels:  tools
404starlink2.0 Galaxy
404StarLink Project 2.0 - 推荐真正优质、有意义、有趣、坚持维护的开源项目
Stars: ✭ 538 (-5.78%)
Mutual labels:  tools

.NET DllExport

.NET DllExport with .NET Core support (aka 3F/DllExport)

Copyright (c) 2009-2015  Robert Giesecke
Copyright (c) 2016-2021  Denis Kuzmin <[email protected]> github/3F

Build status Latest-Release License coreclr_ILAsm Cecil MvsSln GetNuTool hMSBuild Conari

Build history

DllExport-action Configure [?]

[ Quick start ] [ Examples: C++, C#, Java ] -> { Wiki } { 🧪 Demo src }

[DllExport]
public static int entrypoint(IntPtr L)
{
    // ... it will be called from Lua script

    lua_pushcclosure(L, onProc, 0);
    lua_setglobal(L, "onKeyDown");

    return 0;
}
  • For work with Unmanaged memory including native or binary data from the heap and binding between .NET and unmanaged native C/C++ etc, use Conari
  • For related work with Lua (5.4, 5.3, 5.2, 5.1, ...), use LuNari
[DllExport("Init", CallingConvention.Cdecl)]
// __cdecl is the default calling convention for our library
[DllExport(CallingConvention.StdCall)]
[DllExport("MyFunc")]
[DllExport]

We're supporting the following PE modules: Library (.dll) and Executable (.exe) [?]

License

The MIT License (MIT)

.NET DllExport contributors: https://github.com/3F/DllExport/graphs/contributors

&_

How does it work

Current features has been implemented through ILDasm & ILAsm that prepares the all required steps via .export directive (it's specific directive for ILAsm compiler only).

What inside ? or how does work the .export directive ?

Read about format PE32/PE32+, start with grammar from asmparse and move to writer:

...
//yacc
if(PASM->m_pCurMethod->m_dwExportOrdinal == 0xFFFFFFFF)
{
  PASM->m_pCurMethod->m_dwExportOrdinal = $3;
  PASM->m_pCurMethod->m_szExportAlias = $6;
  if(PASM->m_pCurMethod->m_wVTEntry == 0) PASM->m_pCurMethod->m_wVTEntry = 1;
  if(PASM->m_pCurMethod->m_wVTSlot  == 0) PASM->m_pCurMethod->m_wVTSlot = $3 + 0x8000;
}
...
EATEntry*   pEATE = new EATEntry;
pEATE->dwOrdinal = pMD->m_dwExportOrdinal;
pEATE->szAlias = pMD->m_szExportAlias ? pMD->m_szExportAlias : pMD->m_szName;
pEATE->dwStubRVA = EmitExportStub(pGlobalLabel->m_GlobalOffset+dwDelta);
m_EATList.PUSH(pEATE);
...
// logic of definition of records into EXPORT_DIRECTORY (see details from PE format)
HRESULT Assembler::CreateExportDirectory()  
{
...
    IMAGE_EXPORT_DIRECTORY  exportDirIDD;
    DWORD                   exportDirDataSize;
    BYTE                   *exportDirData;
    EATEntry               *pEATE;
    unsigned                i, L, ordBase = 0xFFFFFFFF, Ldllname;
    ...
    ~ now we're ready to miracles ~

Read also my brief explanations here: AssemblyRef encoding / about mscoree / DllMain & the export-table / DllExport.dll / ordinals ...

How to get DllExport

tl;dr: put this inside solution folder, then click it there.

Since v1.6+ have no official support of NuGet clients ([?]), you need just use this inside your solution folder. Wiki: [ Quick start ]

Get our manager (~20 Kbytes) from any trusted place. Official GHR is recommended. But you can also get it from official packages via NuGet server NuGet package, etc. [ Documentation ]

How to Build .NET DllExport

Just use build.bat if you need final binaries (NuGet package as DllExport.<version>.nupkg, Manager, zip-archives, and others).

.\build Debug

Part of the build works through vssbe (including CI that uses CIM version). But you don't need to do anything at all. For Visual Studio IDE you can also use vsix version

Modified ILAsm + ILDasm on coreclr

We're using our modified versions on coreclr specially for our .NET DllExport project - https://github.com/3F/coreclr

This helps to avoid some problems (like this, or this) and more...

To build minimal version (it will not include all components as for original coreclr repo):

Restore git submodule or use repo: https://github.com/3F/coreclr.git

git submodule update --init --recursive

Make sure that you have installed CMake, then build simply:

build-s -all -x86 -x64 Release

You can also use our compiled versions: NuGet package

Donation

Please note again, the UnmanagedExports was created by Robert Giesecke. His page is here. [?]

But .NET DllExport is not related to him.

.NET DllExport is developed for you by GitHub/3F ([ GitHub ]; [ twitter ]).

If something is helpful from 3F/DllExport, donations are welcomed, and thanks !

[ ☕ Donate ]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].