View Single Post
Old 11-06-2018, 02:18 AM   #1
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default Can extension-provided API functions return strings longer than 1024 characters?

REAPER itself seems to use a "NeedBig" modifier in the parameter name, if a long string is required:

Code:
C++: int GetProjExtState(ReaProject* proj, const char* extname, const char* key, char* valOutNeedBig, int valOutNeedBig_sz)
EEL: int GetProjExtState(ReaProject proj, "extname", "key", #val)
Lua: integer retval, string val = reaper.GetProjExtState(ReaProject proj, string extname, string key)
Python: (Int retval, ReaProject proj, String extname, String key, String valOutNeedBig, Int valOutNeedBig_sz) = RPR_GetProjExtState(proj, extname, key, valOutNeedBig, valOutNeedBig_sz)
When I tried to use "NeedBig", the API interpreter appears to recognize the modifier and, in the case of Lua, the modifier is removed from the parameter name in the API documentation and in the IDE help (as in the code above, "nameOutNeedBig" simply becomes "name").

However, the string size passed to the function is still only 1024.
juliansader is offline   Reply With Quote