-
Notifications
You must be signed in to change notification settings - Fork 0
Next: GetNamedRoutinePointer
Retrieves a pointer to a named object.
AurieStatus GetNamedRoutinePointer(
[in] const char* FunctionName,
[out] PVOID* FunctionPointer
);A pointer to the buffer containing the name of the object to look up. This parameter can refer to either a GameMaker built-in function, a GameMaker script, or a function name provided by extensions.
Note
This function is case-sensitive, meaning a script named scr_my_Script is different from a script named scr_my_script. This behavior is consistent for all types of lookups.
A pointer to a pointer-sized buffer that receives the address of the looked-up object. The object pointed-to by this variable is then dependant on the type of lookup used. As of version 3.0.1, the address written to the buffer can either be of a CScript object if a script was found matching the name being looked up, or a TRoutine if a built-in GameMaker function was found matching the name. The original contents of the buffer are guaranteed to be preserved if the function fails.
The function returns AURIE_SUCCESS on success, otherwise returns a matching error code. If the internal runner functions needed for the lookup aren't available, the AURIE_MODULE_INTERNAL_ERROR status code is returned. If an extension function matches the name, the AURIE_ACCESS_DENIED error code is returned. This error code may also be returned if the function required for getting CScript pointers isn't available. The function returns AURIE_OBJECT_NOT_FOUND if the lookup failed.