--- In [email protected], "brucexs" <[EMAIL PROTECTED]> wrote:
> PowerPro uses malloc for these vars, and malloc keeps the byte count > which is accessible using API call _msize. It should work for > plugins too, once you have the address. Hi Bruce, Didn't know _msize. Nice. However: pszVarAddr = ppsv->GetVarAddr(pszVarName); (check to make sure its non-zero) m_nBufSize = _msize(pszVarAddr); bombs out in debug mode IN DBGHEAP.C in _msize_dbg(void * pUserData...) with /* * If this ASSERT fails, a bad pointer has been passed in. It may be * totally bogus, or it may have been allocated from another heap. * The pointer MUST come from the 'local' heap. */ _ASSERTE(_CrtIsValidHeapPointer(pUserData)); Hmm. That's tedious. Just realised: I the var named in pszVarName might be set to null string. Would that explain? If you can get _msize to work in your code, could you add a new PPROSERVICES service GetVarSize(argname)? Otherwise I won't be able to deal with existing PowerPro variables that contain BYTE* strings I've already set. Unless problem is null string, in which case maybe I can call _CrtIsValidHeapPointer or some such to see if heap has been allocated... ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/JV_rlB/TM --------------------------------------------------------------------~-> Attention: PowerPro's Web site has moved: http://www.ppro.org Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/power-pro/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
