Studio:Casting and pointers: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Text replace - 'Category:Pointers' to 'Category:Studio:Pointers') |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
#pragma scl_function(GetUnicodeName) | #pragma scl_function(GetUnicodeName) | ||
#pragma scl_cast (GetUnicodeName, name, unsigned short*) | #pragma scl_cast (GetUnicodeName, name, unsigned short*) | ||
#pragma scl_ptr (GetUnicodeName, name, OUT, PRIVATE) | #pragma scl_ptr (GetUnicodeName, name, "OUT", PRIVATE) | ||
#pragma scl_string (GetUnicodeName, name, 100) | #pragma scl_string (GetUnicodeName, name, 100) | ||
</source> | </source> | ||
[[Category:Pointers]] | [[Category:Studio:Pointers]] |
Latest revision as of 00:41, 21 August 2009
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(GetUnicodeName)
#pragma scl_cast (GetUnicodeName, name, unsigned short*)
#pragma scl_ptr (GetUnicodeName, name, "OUT", PRIVATE)
#pragma scl_string (GetUnicodeName, name, 100)