Skip to content

Commit

Permalink
public release of the Conari engine - v1.3:
Browse files Browse the repository at this point in the history
    NEW: Improved speed >80% (DLR) & >90% (Lambda)
         `*` results for regXwild x64 (Unicode) via snet tester - https://github.com/3F/regXwild

    NEW: Improved DLR. Automatic detection for ByRef types & null-values for any reference-types that pushed with out/ref modifier.
         * +UseCallingContext - To use information about types from CallingContext if it's possible.
         * +UseByRef - To use ByRef& (reference-types) for all sent types.

    NEW: Added `NullType<T>` as optional way for work with reference-types. And for other purpose to store additional information about basic type for any null values.
    NEW: Added IProvider.NewProcAddress event - When handling new non-zero ProcAddress.
    NEW: Started support of Exported-Variables via IExVar & DLR - Issue #7
            ```
            l.ExVar.DLR.ADDR_SPEC; // 0x00001CE8
            l.ExVar.get<UInt32>("ADDR_SPEC"); // 0x00001CE8
            l.ExVar.getField(typeof(UInt32).NativeSize(), "ADDR_SPEC"); // Native.Core.Field via raw size
            l.Svc.native("lpProcName"); // Raw access via NativeData & Native.Core !
            ```

    NEW: Implemented aliases for Exported-Functions and Variables - Issue #9
            ```
            l.Aliases["Flag"] = l.Aliases["getFlag"] = l.Aliases["xFunc"]; //Flag() -> getFlag() -> xFunc()->...
            l.DLR.getFlag<bool>();
            ```
            ```
            l.Aliases["gmn"] = new ProcAlias(
                "GetMagicNum",
                new AliasCfg() { NoPrefixR = true } // false by default
            );
            ```

    NEW: Native.Core improvements - Extensions & new `t` signatures for node (raw alignments via size and managed types)
         +`t(Type type, string name = null)`
         +`t(Type[] types, params string[] names)`
         +`t(int size, string name = null)`

    NEW: Aliases for 'empty' types:
         +`Action bindFunc(string lpProcName);`
         +`Action bind(string func);`

    NEW: New group of binding via regular arguments:
         +`Method bindFunc(string lpProcName, Type ret, params Type[] args);`
         +`Method<T, object> bindFunc<T>(string lpProcName, Type ret, params Type[] args);`
         +`Method bind(string func, Type ret, params Type[] args);`
         +`Method<T, object> bind<T>(string func, Type ret, params Type[] args);`

    FIXED: Fixed possible crashes - 'A heap has been corrupted' when use of shared pointer between several UnmanagedStructure.
    CHANGED: ILoader: minor incompatible changes for PE32/PE32+ features.
             * New `IPE PE` property for complex work with PE-file.
             * The `ExportFunctionNames` property has been removed as obsolete. Use same `PE.ExportedProcNamesArray`

    CHANGED: IProvider minor incompatible changes `funcName()` -> `procName()`
             `string funcName(string name);` has been renamed to `string procName(string name);`
              - as a common method for getting full lpProcName with main prefix etc.

    CHANGED: `TDyn IBinder.bind(MethodInfo mi, bool prefix = false);` removed as a deprecated, because for this can be a lot of misunderstandings.
              If you need something, use like: `prefix ? l.procName(mi.Name) : mi.Name` etc. for any available methods with MethodInfo.

    CHANGED: Added User object (+`user`) for Native.Core.Field. To store any additional information that's related for specific field.
  • Loading branch information
3F committed Jan 27, 2017
1 parent aa4e6b1 commit 4f14cec
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.0
1.3.0
4 changes: 2 additions & 2 deletions Conari.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Conari</id>
<version>1.2.0</version>
<version>1.3.0</version>
<title>[ Conari ] Binder of Unmanaged code for .NET</title>
<authors>github.com/3F/Conari</authors>
<owners>reg</owners>
Expand All @@ -22,7 +22,7 @@
~~~~~~~~
Get it via GetNuTool:
==========================================
gnt /p:ngpackages="Conari/1.2.0"
gnt /p:ngpackages="Conari/1.3.0"
==========================================
* https://github.com/3F/GetNuTool

Expand Down
6 changes: 3 additions & 3 deletions Conari/ConariVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ public struct ConariVersion
{
public static readonly Version number = new Version(S_NUM_REV);

public const string S_NUM = "1.2.0";
public const string S_REV = "37964";
public const string S_NUM = "1.3.0";
public const string S_REV = "39634";

public const string S_NUM_REV = S_NUM + "." + S_REV;

public const string BRANCH_SHA1 = "ce3e8a9";
public const string BRANCH_SHA1 = "aa4e6b1";
public const string BRANCH_NAME = "master";
public const string BRANCH_REVC = "45";

Expand Down
10 changes: 3 additions & 7 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Binder of Unmanaged code for .NET
The Conari engine represents flexible platform for work with unmanaged code (native C/C++ etc.): Libraries, Executable Modules, other native and binary data.
Lightweight and powerful binding with any exported-functions/variables, and much more.

*Did you know: The [LunaRoad](https://github.com/3F/LunaRoad) project works via Conari engine.*
*[List of Projects via Conari engine](https://github.com/3F/Conari/wiki/Projects)*

[![Build status](https://ci.appveyor.com/api/projects/status/qc1d3ofsso8fd67t/branch/master?svg=true)](https://ci.appveyor.com/project/3Fs/conari/branch/master)
[![release-src](https://img.shields.io/github/release/3F/Conari.svg)](https://github.com/3F/Conari/releases/latest)
Expand Down Expand Up @@ -149,25 +149,21 @@ l.Svc.native("lpProcName"); // Raw access via NativeData & Native.Core !
```csharp
// v1.3+
l.Aliases["getFlag"] = l.Aliases["flag"] = l.Aliases["getD_True"]; // getFlag() -> flag() -> getD_True() -> ...
l.Aliases["Flag"] = l.Aliases["getFlag"] = l.Aliases["xFunc"]; //Flag() -> getFlag() -> xFunc()->...
// ...
l.DLR.getFlag<bool>();
```

**Additional types:**

* BSTR, CharPtr, float_t, int_t, ptrdiff_t, size_t, uint_t, WCharPtr
* BSTR, CharPtr, WCharPtr, float_t, int_t, ptrdiff_t, size_t, uint_t
* UnmanagedString - to allocation of new unmanaged strings for your unmanaged code.
* ...

```csharp

size_t len;
CharPtr name = c.bind<FuncOut3<int, size_t, IntPtr>>("to")(1, out len);
...
string myName += name; // (IntPtr)name; .Raw; .Ansi; .Utf8; ...
...
uint_t v = dll.getU(2);
```

**Events**:
Expand Down
7 changes: 6 additions & 1 deletion build.bat
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
@echo off

set reltype=%1
set _msbuild=tools/msbuild

if "%reltype%"=="" (
set reltype=Release
)


call gnt /p:ngconfig="packages.config" /nologo /v:m /m:4 || goto err
call %_msbuild% -notamd64 "Conari.sln" /v:normal /l:"packages\vsSBE.CI.MSBuild\bin\CI.MSBuild.dll" /m:4 /t:Rebuild /p:Configuration=Release || goto err
call %_msbuild% -notamd64 "Conari.sln" /v:normal /l:"packages\vsSBE.CI.MSBuild\bin\CI.MSBuild.dll" /m:4 /t:Rebuild /p:Configuration=%reltype% || goto err


goto exit
Expand Down
65 changes: 64 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,74 @@
- - - -
Conari
Conari :: https://github.com/3F/Conari
_ _ _ _

[v1.3]

NEW: Improved speed >80% (DLR) & >90% (Lambda)
`*` results for regXwild x64 (Unicode) via snet tester - https://github.com/3F/regXwild

NEW: Improved DLR. Automatic detection for ByRef types & null-values for any reference-types that pushed with out/ref modifier.
* +UseCallingContext - To use information about types from CallingContext if it's possible.
* +UseByRef - To use ByRef& (reference-types) for all sent types.

NEW: Added `NullType<T>` as optional way for work with reference-types. And for other purpose to store additional information about basic type for any null values.
NEW: Added IProvider.NewProcAddress event - When handling new non-zero ProcAddress.
NEW: Started support of Exported-Variables via IExVar & DLR - Issue #7
```
l.ExVar.DLR.ADDR_SPEC; // 0x00001CE8
l.ExVar.get<UInt32>("ADDR_SPEC"); // 0x00001CE8
l.ExVar.getField(typeof(UInt32).NativeSize(), "ADDR_SPEC"); // Native.Core.Field via raw size
l.Svc.native("lpProcName"); // Raw access via NativeData & Native.Core !
```

NEW: Implemented aliases for Exported-Functions and Variables - Issue #9
```
l.Aliases["Flag"] = l.Aliases["getFlag"] = l.Aliases["xFunc"]; //Flag() -> getFlag() -> xFunc()->...
l.DLR.getFlag<bool>();
```
```
l.Aliases["gmn"] = new ProcAlias(
"GetMagicNum",
new AliasCfg() { NoPrefixR = true } // false by default
);
```

NEW: Native.Core improvements - Extensions & new `t` signatures for node (raw alignments via size and managed types)
+`t(Type type, string name = null)`
+`t(Type[] types, params string[] names)`
+`t(int size, string name = null)`

NEW: Aliases for 'empty' types:
+`Action bindFunc(string lpProcName);`
+`Action bind(string func);`

NEW: New group of binding via regular arguments:
+`Method bindFunc(string lpProcName, Type ret, params Type[] args);`
+`Method<T, object> bindFunc<T>(string lpProcName, Type ret, params Type[] args);`
+`Method bind(string func, Type ret, params Type[] args);`
+`Method<T, object> bind<T>(string func, Type ret, params Type[] args);`

FIXED: Fixed possible crashes - 'A heap has been corrupted' when use of shared pointer between several UnmanagedStructure.
CHANGED: ILoader: minor incompatible changes for PE32/PE32+ features.
* New `IPE PE` property for complex work with PE-file.
* The `ExportFunctionNames` property has been removed as obsolete. Use same `PE.ExportedProcNamesArray`

CHANGED: IProvider minor incompatible changes `funcName()` -> `procName()`
`string funcName(string name);` has been renamed to `string procName(string name);`
- as a common method for getting full lpProcName with main prefix etc.

CHANGED: `TDyn IBinder.bind(MethodInfo mi, bool prefix = false);` removed as a deprecated, because for this can be a lot of misunderstandings.
If you need something, use like: `prefix ? l.procName(mi.Name) : mi.Name` etc. for any available methods with MethodInfo.

CHANGED: Added User object (+`user`) for Native.Core.Field. To store any additional information that's related for specific field.


[v1.2]

FIXED: Incorrect boolean values from unmanaged code #6
NEW: Added type for work with unmanaged structures - UnmanagedStructure


[v1.1]

NEW: DLR features for core with caching of dynamic types.
Expand All @@ -30,6 +92,7 @@ _ _ _ _
CHANGED: Updated CharPtr: +BSTR, +WCharPtr & added new UnmanagedString, that allocates strings for unmanaged code.
CHANGED: Other trivial fixes and improvements.


[v1.0]

* Initial release.
Expand Down

1 comment on commit 4f14cec

@3F
Copy link
Owner Author

@3F 3F commented on 4f14cec Jan 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New version of Conari engine contains major improvements and fixes with DLR features, ByRef types, new support of Exported-Variables, Aliases, improved Native.Core, ... But it also contains minor incompatible changes with previous versions.

Look here: https://github.com/3F/Conari/wiki/Upgrade-v1.3

Please sign in to comment.