Re: cffi.e
- Posted by AlexXX Feb 19, 2021
- 1727 views
Again I made a mistake somewhere:
include cffi.e constant SM_SYSTRAY = 0x0400 + 5 constant tLoadImageA=""" HANDLE LoadImageA( HINSTANCE hInst, LPCSTR name, UINT type, int cx, int cy, UINT fuLoad ); """ constant SHELL32 = open_dll("shell32") constant LoadImageA=define_cffi_func(SHELL32,tLoadImageA) constant tShell_NotifyIconA = """ BOOL Shell_NotifyIcon( DWORD dwMessage, NOTIFYICONDATA* lpData ); """ constant NIM_ADD = 0, NIM_MODIFY = 1, NIM_DELETE = 2, NIF_MESSAGE = 1, NIF_ICON = 2, NIF_TIP = 4 constant Shell_NotifyIconA = define_cffi_func(SHELL32,tShell_NotifyIconA) struct t_N """ typedef struct _NOTIFYICONDATAA { DWORD cbSize; HWND hWnd; UINT uID; UINT uFlags; UINT uCallbackMessage; HICON hIcon; CHAR szTip[128]; DWORD dwState; DWORD dwStateMask; CHAR szInfo[256]; union { UINT uTimeout; UINT uVersion; } DUMMYUNIONNAME; CHAR szInfoTitle[64]; DWORD dwInfoFlags; GUID guidItem; HICON hBalloonIcon; } NOTIFYICONDATAA, *PNOTIFYICONDATAA; """ end struct
f:\phix\builtins\cffi.e:232 in procedure err()
attempt to divide by 0
msg = `unknown size GUID`
... called from f:\phix\builtins\cffi.e:455 in function do_type()
mtype = `GUID`
machine = 32' '
substruct = 0
k = 0
size = <novalue>
align = <novalue>
signed = 1
mname = `guidItem`
It is not clear in which line of my program the error is.

