Re: [Pharo-users] [FFI] Passing a null in argument

2016-06-24 Thread Merwan Ouddane
Yes it works, thank you Esteban On Thu, Jun 23, 2016 at 7:00 PM, Esteban Lorenzano wrote: > > > On 23 Jun 2016, at 18:54, Merwan Ouddane > wrote: > > > > On 23/06/2016 18:39, Esteban Lorenzano wrote: > >> which function? > > A function within a DLL file. > >> declared how? > > > > Something lik

Re: [Pharo-users] [FFI] Passing a null in argument

2016-06-23 Thread Esteban Lorenzano
> On 23 Jun 2016, at 18:54, Merwan Ouddane wrote: > > On 23/06/2016 18:39, Esteban Lorenzano wrote: >> which function? > A function within a DLL file. >> declared how? > > Something like: void foo( void *bar) > >> used how? > > MyClass foo: bar >^ self ffiCall: #(void foo( void *bar)) >

Re: [Pharo-users] [FFI] Passing a null in argument

2016-06-23 Thread Merwan Ouddane
On 23/06/2016 18:39, Esteban Lorenzano wrote: which function? A function within a DLL file. declared how? Something like: void foo( void *bar) used how? MyClass foo: bar ^ self ffiCall: #(void foo( void *bar)) MyClass foo: 0 MyClass foo: FFIExternalObject null Esteban On 23 Jun

Re: [Pharo-users] [FFI] Passing a null in argument

2016-06-23 Thread Esteban Lorenzano
which function? declared how? used how? Esteban > On 23 Jun 2016, at 18:07, Merwan Ouddane wrote: > > Hi, > > I wanted to call a function using null as argument but did not managed to do > so. > > I tried to use an integer, but the FFI forbids it. > > I tried to use FFIExternalObject null,

[Pharo-users] [FFI] Passing a null in argument

2016-06-23 Thread Merwan Ouddane
Hi, I wanted to call a function using null as argument but did not managed to do so. I tried to use an integer, but the FFI forbids it. I tried to use FFIExternalObject null, but the FFI vould not coerce the arguments. To make it work I had to duplicate the method and set 0 instead of an