Studio:Casting and pointers

From STRIDE Wiki
Revision as of 22:19, 12 June 2007 by Root (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A cast must be applied to a pointer before anything else. In other words, you must apply scl_cast before scl_ptr, as illustrated by the following example:

#pragma scl_function(FDI_GETUNICODENAME_SUID, FDI_GetUnicodeName)
#pragma scl_string (FDI_GetUnicodeName, ascii_filename, 100)
#pragma scl_ptr (FDI_GetUnicodeName, unicode_language, OUT, PRIVATE)
#pragma scl_string (FDI_GetUnicodeName, unicode_language, 100)
#pragma scl_cast (FDI_GetUnicodeName, unicode_name, unsigned short*)
#pragma scl_ptr (FDI_GetUnicodeName, unicode_name, OUT, PRIVATE)
#pragma scl_string (FDI_GetUnicodeName, unicode_name, 100)