Phix: A Error Message i do not understand.

new topic     » topic index » view thread      » older message » newer message

Hallo
I am trying to adapt an older library to Phix and Windows 64bit

I don't know how to deal with the following message.

D:\devpool\phix\builtins\cffi.e:234 
unknown size [ 
 
--> see D:\devpool\projects\ardulink\ex.err 
Press Enter... 

--REF: http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx 
--constant iCreateFile = define_c_func(kernel,"CreateFileA",{C_INT,C_INT,C_INT,C_INT,C_INT,C_INT,C_INT},C_INT) 
tStr=""" 

HANDLE CreateFileA( 
  [in]           LPCSTR                lpFileName, 
  [in]           DWORD                 dwDesiredAccess, 
  [in]           DWORD                 dwShareMode, 
  [in, optional] LPSECURITY_ATTRIBUTES lpSecurityAttributes, 
  [in]           DWORD                 dwCreationDisposition, 
  [in]           DWORD                 dwFlagsAndAttributes, 
  [in, optional] HANDLE                hTemplateFile 
); 
""" 

--LPSECURITY_ATTRIBUTES replaced with LPVOID (does not help) remove 'optional' also not 
set_unicode(0) 
constant iCreateFile=define_cffi_func(kernel,tStr) 

I have no idea anymore (i also don't understand the inner function of cffi.e)

THe sourcefile is here:https://github.com/andizk4kx/ArduLink/blob/main/serial.ew
The ex.err is here:https://github.com/andizk4kx/ArduLink/blob/main/ex.err

Thank you for any help in advance
Andreas

Edit:
I've had this problem before, I just forgot about it.I am firmly convinced that my brain is working against me (at least partially)
Perhaps the error message could still be made a little more meaningful.
e.g. errors when interpreting : tStr line xy
This works for me:

HANDLE CreateFileA( 
  _in_           LPCSTR                lpFileName, 
  _in_           DWORD                 dwDesiredAccess, 
  _in_           DWORD                 dwShareMode, 
  _in_           LPVOID                lpSecurityAttributes, 
  _in_           DWORD                 dwCreationDisposition, 
  _in_           DWORD                 dwFlagsAndAttributes, 
  _in_           HANDLE                hTemplateFile 
); 
""" 

--LPSECURITY_ATTRIBUTES replaced with LPVOID  remove 'optional'  
constant iCreateFile=define_cffi_func(kernel,tStr) 

Andreas

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu