[Mono-osx] Handle Question
Chris McKinnon
crmckinnon at shaw.ca
Sat Apr 21 00:35:53 UTC 2012
Thanks, that works.
On 2012-04-19, at 6:48 PM, Rodrigo Kumpera wrote:
OSError NewSomeApiPtr (ref IntPtr);
On Thu, Apr 19, 2012 at 8:09 PM, Chris McKinnon <crmckinnon at shaw.ca> wrote:
Hi,
I'm writing some new code that is calling through to native Mac OS libraries. For the most part I've found IntPtr works well for getting back values. How do you handle getting back a Handle (a pointer to a pointer)? For example:
struct SomeApiRecord {
long data[1];
};
typedef struct SomeApiRecord SomeApiRecord;
typedef SomeApiRecord * SomeApiPtr;
Then the function calls might be:
OSError NewSomeApiPtr(SomeApiPtr* ptr);
OSError DoSomething(SomeApiPtr ptr);
OSError DisposeSomeApiPtr(SomeApiPtr ptr);
Only the "New" call returns a handle. The rest use a pointer. Any help would be appreciated.
Thanks,
Chris McKinnon
_______________________________________________
Mono-osx mailing list
Mono-osx at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-osx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-osx/attachments/20120420/7d128d1a/attachment.html>
More information about the Mono-osx
mailing list