Definition: |
include cffi.e
set_unicode(integer flag, integer ct=convert_types) |
Description: | set flags controlling the unicode-related behaviour of the cffi library routines. |
Comments: |
flag may be 0 for ansi or 1 for unicode. This controls whether TBYTE/TCHAR are 8 or 16 bits, and whether eg
"MessageBox" is mapped to "MessageBoxA" or "MessageBoxW". An error occurs if this routine has not been called
and any such questions need to be answered.
ct may be 1 to convert the size names such as "LONG" to "long", ie reduce the number of types from five dozen or so to a bakers dozen, or 0 (the default setting for convert_types itself) to leave them as is. The size fields are only provided in the results from define_struct(?,?,0) for debugging purposes anyway, but be advised that using the wrong setting of this flag for your particular circumstances may actually increase rather than decrease confusion. |
Example: |
include cffi.e set_unicode(1) -- use widestring routines |
See Also: | define_struct |
