{"action":"created","issue":{"url":"https://api.github.com/repos/dotMorten/AllJoynDotNet/issues/2","repository_url":"https://api.github.com/repos/dotMorten/AllJoynDotNet","labels_url":"https://api.github.com/repos/dotMorten/AllJoynDotNet/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/dotMorten/AllJoynDotNet/issues/2/comments","events_url":"https://api.github.com/repos/dotMorten/AllJoynDotNet/issues/2/events","html_url":"https://github.com/dotMorten/AllJoynDotNet/issues/2","id":152562659,"number":2,"title":"API Delegates might need a different attribute","user":{"login":"PeterRook","id":19151175,"avatar_url":"https://avatars.githubusercontent.com/u/19151175?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterRook","html_url":"https://github.com/PeterRook","followers_url":"https://api.github.com/users/PeterRook/followers","following_url":"https://api.github.com/users/PeterRook/following{/other_user}","gists_url":"https://api.github.com/users/PeterRook/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterRook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterRook/subscriptions","organizations_url":"https://api.github.com/users/PeterRook/orgs","repos_url":"https://api.github.com/users/PeterRook/repos","events_url":"https://api.github.com/users/PeterRook/events{/privacy}","received_events_url":"https://api.github.com/users/PeterRook/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-02T14:18:10Z","updated_at":"2016-05-02T15:09:57Z","closed_at":null,"body":"I have the same motivation as you for creating a more complete managed AllJoyn API than that of Windows.Devices.AllJoyn. I started with having a look at the AllJoyn 14.06.00 C# Unity implementation and , of course, your implementation. As a test case, I do not use a sample like you do, but I started implementing the unit tests in the AllJoyn 15.09.00 core (C++) implementation. I have not tested the AboutListener  part yet, but start with the BusListener. I really got stuck! Luckily,  In the C# Unity stuff I found that (the structure containing) callbacks need pinning to make sure the garbage collector does not move them around. Apart from that I had to define the delegates with the UnmanagedFunctionPointer with parameter CallingConvention.StdCall!!! I saw your API uses CallingConvention.CDecl., so you might run in the same problems. I am no expert in P/Invoke, but thought this might help you in your efforts! By the way, I am writing my API in VB, since this is my 'native' language."},"comment":{"url":"https://api.github.com/repos/dotMorten/AllJoynDotNet/issues/comments/216262665","html_url":"https://github.com/dotMorten/AllJoynDotNet/issues/2#issuecomment-216262665","issue_url":"https://api.github.com/repos/dotMorten/AllJoynDotNet/issues/2","id":216262665,"user":{"login":"dotMorten","id":1378165,"avatar_url":"https://avatars.githubusercontent.com/u/1378165?v=3","gravatar_id":"","url":"https://api.github.com/users/dotMorten","html_url":"https://github.com/dotMorten","followers_url":"https://api.github.com/users/dotMorten/followers","following_url":"https://api.github.com/users/dotMorten/following{/other_user}","gists_url":"https://api.github.com/users/dotMorten/gists{/gist_id}","starred_url":"https://api.github.com/users/dotMorten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotMorten/subscriptions","organizations_url":"https://api.github.com/users/dotMorten/orgs","repos_url":"https://api.github.com/users/dotMorten/repos","events_url":"https://api.github.com/users/dotMorten/events{/privacy}","received_events_url":"https://api.github.com/users/dotMorten/received_events","type":"User","site_admin":false},"created_at":"2016-05-02T15:09:57Z","updated_at":"2016-05-02T15:09:57Z","body":"Btw shouldn't matter if the library is written in C# or VB - you can still consume it from either language. However C# definitely has the best documentation and examples to go from, and the most experts to draw knowledge from, so if you're up for some C#, I would love to get some help making this library \"work\". For the most part right not it's just making the interop work as I go along and wrap the classes in \"nicer\" .NET classes. The nice thing about the code generator for the interop is \"fix once, fix everywhere\", and when a new AllJoyn version comes out, I just rerun the generator against the latest source code."}}