Hi Bruce,

Thanks for info re ppsv->GetVarAddr.

Just triple checking.

In my call dll code, assuming var test is going to receive a BYTE* string

   pszAddrBuff = ppsv->GetVarAddr("test");
   if (!pszAddrBuff)
    return resultErrProgramming;
   
   if (strlen(pszAddrBuff) < m_nBufSize)
   {
    pszAddrBuffTemp = ppsv->AllocTemp(m_nBufSize+1);
    memset(pszAddrBuffTemp, ' ', m_nBufSize+1);
    *(pszAddrBuffTemp + m_nBufSize) = '\0';
    ppsv->SetVar("test", pszAddrBuffTemp);
// SetVar could change address?
    pszAddrBuff = ppsv->GetVarAddr("test");
   }
   memcpy(pszAddrBuff, pParamField->mu_str, m_nBufSize);

and assume pszAddrBuff contains a few \x00s scattered among other bytes:

Will you be able to do whatever you have to do to clean up variable
test when subsequently user does

  test = ""

or the local var "test" goes out of scope?  You can't any more assume
memory area pointed to be "test" variable is null-terminated string.
Maybe you keep a byte count somewhere for each var?










------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/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/
 


Reply via email to