-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support of exported variables / constants #7
Labels
Milestone
Comments
3F
added a commit
that referenced
this issue
Dec 25, 2016
* IProvider: * `IExVar ExVar` - Access to exported variables. * `IProviderSvc Svc` - Additional services. ``` 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 ! ```
I added variant through new IExVar (plans for v1.3): 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 ! For old versions you can also use exported variables, but only via Provider or ConariL frontend + your custom wrapper: class MyConari: ConariL
{
public MyConari(string lib, string prefix = null)
: base((Config)lib, prefix)
{ }
// ... now you can get pointer via IProvider/IBinder and use NativeData, etc.
} |
3F
added a commit
that referenced
this issue
Dec 26, 2016
``` l.ExVar.DLR.ADDR_SPEC l.ExVar.DLR.ADDR_SPEC<UInt32>() l.ExVar.get("ADDR_SPEC") l.ExVar.get<UInt32>("ADDR_SPEC") ``` also: * Native.Core.Field: * +`user` - User object for any purpose. In general, we can store any additional information that's related for specific field. * +`IsValidForDLR` - Checks the correct name for DLR features.
+DLR: ((dynamic)l.ExVar).ADDR_SPEC
l.ExVar.DLR.ADDR_SPEC
l.ExVar.DLR.ADDR_SPEC<UInt32>() |
3F
added a commit
that referenced
this issue
Jan 27, 2017
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
3F/DllExport#24
Something like:
LIBAPI DWORD ADDR_SPEC = 0x00001CE8;
anyway, do not use
l.DLR
nodeThe text was updated successfully, but these errors were encountered: