FFI question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

FFI question

Niko Schwarz
Hi there, I'm trying to have a hold on Bonjour. I tried to convince FFI to apicall into the dll, but I failed, because I understand only little about C, and I have no idea, how to transfer this:

typedef struct _DNSServiceRef_t *DNSServiceRef;

into a smalltalk class. Note that _DNSServiceRef_t seems to be defined nowhere!

So what should "fields" return? I didn't bother to try #(()), because the method I'd like to invoke stores its result in the pointer of type DNSServiceRef*, which I'm supposed to give it, uninitialized.

niko
--


Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl

Reply | Threaded
Open this post in threaded view
|

Re: FFI question

Bert Freudenberg-3
Am 09.07.2006 um 17:02 schrieb Niko Schwarz:

> Hi there, I'm trying to have a hold on Bonjour. I tried to convince  
> FFI to apicall into the dll, but I failed, because I understand  
> only little about C, and I have no idea, how to transfer this:
>
> typedef struct _DNSServiceRef_t *DNSServiceRef;
>
> into a smalltalk class. Note that _DNSServiceRef_t seems to be  
> defined nowhere!
>
> So what should "fields" return? I didn't bother to try #(()),  
> because the method I'd like to invoke stores its result in the  
> pointer of type DNSServiceRef*, which I'm supposed to give it,  
> uninitialized.

Try
        #(nil 'void*')

which compiles an alias (because there is no array in the array).

- Bert -