Added a bunch of new file natives.
Fixed possible corruption in snprintf when input buffer was bigger than output buffer and relaying on its retval.
Fixed all cases when the above situation happened.
Fixed _PrintToHL2Log not taking va_list in.
6 #if defined _handles_included
9 #define _handles_included
17 * @brief Returns if a handle is valid or not.
18 * @note It is not a good idea to call this on every Handle. If you code properly,
19 * all of your Handles will either be valid or will expose important bugs to fix.
20 * This is provided for situations only where testing for handle validity is needed.
22 * @param hndl Handle to test for validity.
23 * @return True if handle is valid, false otherwise.
25 native bool:IsValidHandle(Handle:hndl);
28 * @brief Closes a Handle. If the handle has multiple copies open,
29 * it is not destroyed unless all copies are closed.
31 * @note Closing a Handle has a different meaning for each Handle type. Make
32 * sure you read the documentation on whatever provided the Handle.
34 * @param hndl Handle to close.
35 * @return True if successful, false if not closeable.
36 * @error Invalid handles will cause a run time error.
38 native bool:CloseHandle(Handle:hndl);
41 * @brief Clones a Handle. When passing handles in between plugins, caching handles
42 * can result in accidental invalidation when one plugin releases the Handle, or is its owner
43 * is unloaded from memory. To prevent this, the Handle may be "cloned" with a new owner.
45 * @note Usually, you will be cloning Handles for other plugins. This means that if you clone
46 * the Handle without specifying the new owner, it will assume the identity of your original calling
47 * plugin, which is not very useful. You should either specify that the receiving plugin should
48 * clone the handle on its own, or you should explicitly clone the Handle using the receiving plugin's
51 * @param hndl Handle to clone/duplicate.
52 * @param plugin Optional Handle to another plugin to mark as the new owner.
53 * If no owner is passed, the owner becomes the calling plugin.
54 * @return Handle on success, INVALID_HANDLE if not cloneable.
55 * @error Invalid handles will cause a run time error.
57 native Handle:CloneHandle(Handle:hndl, Handle:plugin=INVALID_HANDLE);