> On 24 Jun 2016, at 14:40, Nicolai Hess <[email protected]> wrote:
> 
> 
> 
> 2016-06-24 14:32 GMT+02:00 Esteban Lorenzano <[email protected] 
> <mailto:[email protected]>>:
> … and I enhanced the example to not induce to confusion anymore :)
> 
> Esteban
> 
> Sorry, I must be stupid, it still does not work ( and it actually looks the 
> same as with the existing WinHandle type). 

well, that I don’t know… for me it works, I tested it in Win10 and it was fine. 
What exactly are you trying to do?

Esteban

> 
>  
> 
>> On 24 Jun 2016, at 14:27, Nicolai Hess <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> 
>> 
>> 2016-06-24 14:05 GMT+02:00 Esteban Lorenzano <[email protected] 
>> <mailto:[email protected]>>:
>> 
>>> On 24 Jun 2016, at 09:53, Nicolai Hess <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> 
>>> 
>>> 
>>> I’m sorry… I do not understand. This is solved in UFFI since some months, 
>>> and Torsten’s OSWindow uses it. 
>>> 
>>> Sorry then it is my fault. I know that Torsten already ported OSWindow to 
>>> UFFI, and that most things are already working. 
>>> 
>>> UFFI provides FFIConstantHandle type to deal with windows HANDLE types, as 
>>> comment says: 
>>> 
>>> I represent a constant HANDLE, as described in  *Windows 
>>> MSDN>https://msdn.microsoft.com/en-us/library/windows/desktop/ms724457(v=vs.85).aspx*
>>>  
>>> <https://msdn.microsoft.com/en-us/library/windows/desktop/ms724457(v=vs.85).aspx*>
>>> 
>>> A ==HANDLE== is a special kind of external object who is accessed through 
>>> numbers, therefore and ==ExternalAddress== is not appropriate to describe 
>>> it (since they are constants and external addresses represents disposable 
>>> spaces from memory).
>>> 
>>> Is not clear this is necessary outside Windows, but according to 
>>> documentation they are somekind analogous to unix's File Descriptors (but 
>>> with some remarkable diferences, as documented 
>>> *here>http://lackingrhoticity.blogspot.fr/2015/05/passing-fds-handles-between-processes.html*
>>>  
>>> <http://lackingrhoticity.blogspot.fr/2015/05/passing-fds-handles-between-processes.html*>.
>>> 
>>> Example: 
>>> [[[
>>> HWND := #FFIConstantHandle.
>>> self ffiCall: #(HWND GetActiveWindow())
>>> ]]] 
>>> 
>>> is there anything I’m missing?
>>> 
>>> I don't know what else should I do, I already posted the example.
>>> The code I provided just don't work (DNU on isExternalAddress, see other 
>>> mail), and I have no idea how to make it work.
>>> Yes, maybe I don't know enough about ffi for this type of the function 
>>> argument passing.
>> 
>> the example is a simplification, you cannot put both definition and call in 
>> same method… find attached a working example of what you want.
>> 
>> 
>> Thank you!
>>  
>> 
>> 
>> 
>> 
>>> 
>>> (actually I tried to port some NBOpenGL code to UFFI, for this I need to 
>>> register a Window Class with WinWndClassEx (to create a gl context).
>>> So if this *is* already working, I need to look what I have done wrong).
>>> 
>>> thanks for your response.
>>> nicolai
>>> 
>>>  
>>> 
>>> Esteban
> 
> 

Reply via email to