I use Win7 (32-bit) and Euphoria built with gcc 3.5.2
Euphoria Interpreter v4.1.0 development
32-bit Windows, Using System Memory
Revision Date: 2011-11-25 13:09:33, Id: 5276:ecc396811123
Following the Window.exw example with memstruct I tried to build some memstructs e.g.
include std/console.e
include std/machine.e
public memtype
char as BYTE,
int as BOOL,
int as INT,
-- unsigned int as UINT,
int as UINT,
long as LONG,
-- unsigned long as ULONG,
long as ULONG,
double as DOUBLE,
short as WORD,
long as DWORD,
object as HANDLE,
object as HWND,
object as LPSTR,
-- object as WNDPROC,
-- signed long int as ZWORD, --test
$
--struct SHFILEINFO
memstruct SHFILEINFO
HANDLE hIcon
INT iIcon
DWORD dwAttributes
BYTE szDisplayName[260] --[260]
BYTE szTypeName[80] --[80]
end memstruct
--352, -- size
? sizeof(SHFILEINFO)
puts(1,"Enter ...")
wait_key()
This shows a size of 640, I expected a value of 352. If I comment everything out except szDisplayName or leaving szTypeName alone or commenting out the two arrays will show the correct value. Every other combination with array is wrong. Is there a mistake in my code?
Looks like whatever the problem was, it has been fixed in the mean time.