-
-
Notifications
You must be signed in to change notification settings - Fork 134
Quick start
Start with:
DllExport
-action Configure
~ ~ ~ --- ~ ~ ~
Since v1.6 provides new embeddable manager, you can configure your projects in a few seconds by the following steps below.
- Get DllExport.bat
- Use command
-action Configure
- Select some available projects for install operations and configure this as you need.
- (optional) Define storage for settings.
- Click [Apply].
Now you're ready to provide exported-functions for unmanaged environments from .NET projects.
- Managed & Unmanaged PInvoke. C++ β€ C#.
- π Complex types (like structures) and Strings between unmanaged and managed env.
For creating your first function: Just define DllExport
attribute for your favorite static methods.
For example:
[DllExport]
public static void hello() { }
[DllExport]
public static int hello(IntPtr ptr)
{
return 0;
}
You can also define specific calling convention and custom name:
[DllExport("Init", CallingConvention.Cdecl)]
// __cdecl is the default calling convention for our library as and for C and C++ programs
[DllExport(CallingConvention.StdCall)]
[DllExport("MyFunc")]
Do not use complex types for arguments & for return value.
Only primitive types.
You should use pointer to allocated data for complex types if you need.
For example, IntPtr
instead of String
.
Related:
Except where otherwise noted, wiki content is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. (CC BY-SA 4.0).
π
- π Home
- π Quick start (+πΉ)
- π Configuring
- π First function
- π Data types
- π .Net Core
- π Export
- π Pre-processing
- π Conari support
- π ILMerge support
- π [x]AssemblyResolve
- π Post-processing
- π Examples
- π C++ β€ C# (+πΉ)
- π String & struct (+πΉ)
- π Complete Examples
π
- π DllExport Manager
π
- π’ Q/A