New options added to CallMappedDLLModuleExport #20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Based on the changes addressing the Issue #17 I added two additional options (CanLoadFromDisk, Overload) to CallMappedDLLModuleExport and GetExportAddress. Using these flags when a module is forwarded (e.g., SAMCLI.dll) it is possible to control if the module will be loaded from disk and how it will be loaded (direct / overload).
I am not 100% sure if this make sense, because is also increasing the complexity of the code, but can be handy under certain scenarios. If I am trying to overload the parent module does not make sense to end loading the forwarded one which could be even more suspicious. Happy to discuss is there is a better approach (or if that even makes sense).
Test code
I did some "regression" testing with some of the DInvoke examples and DInvisibleRegistry (https://github.com/NVISO-BE/DInvisibleRegistry) everything seems to work OK.
To check the new flags, there is a quick example reusing the same: