Bug 27852 - DllImport dllName should default to "__Internal"
Summary: DllImport dllName should default to "__Internal"
Status: RESOLVED FIXED
Alias: None
Product: Objective Sharpie
Classification: Desktop
Component: General ()
Version: 2.0.3
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Aaron Bockover [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-03-10 19:14 UTC by Dave Dunkin
Modified: 2015-03-11 00:58 UTC (History)
0 users

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Dave Dunkin 2015-03-10 19:14:21 UTC
The default dllName for functions is "<library-name>". Since bindings for third party libraries will always be statically linked, "__Internal" would be a more useful default.
Comment 1 Aaron Bockover [MSFT] 2015-03-11 00:58:57 UTC
Good idea. I had "<library-name>" as my intention was to expand on this via clang modules to actually try to deduce the library, but that really is only useful for our product bindings internal to Xamarin.

"__Internal" makes much more sense as a default for third party bindings, at least on iOS. Definitely better than "<library-name>".

Keep in mind that the P/Invoke binding in general is nowhere near as correct or complete as the Objective-C binding is (for instance, ObjC object pointers need to actually be unsafe pointers or IntPtr in the extern signature). You are definitely expected to have to flesh it out, but I wanted to add rudimentary support for it. I will add a [Verify] category for P/Invoke as well.

Fixed. Thanks!