when ddegetdata() method call application memory increase continuously

98 views Asked by At

i use dde excel if any update available in excel the application get notify but after DdeGetData() called the application memory increasing continuously . it increases very fast . i am new with vc++ programming i tried to find out solution and googled it but not found any appropriate solution... here is my code

void DDERequest(DWORD idInst, HCONV hConv, char* szItem, char* sDesc)
{
    HSZ hszItem = DdeCreateStringHandle(idInst, szItem, 0);
    HDDEDATA hData = DdeClientTransaction(NULL,0,hConv,hszItem,CF_TEXT,
                                 XTYP_REQUEST,5000 , NULL);
    if (hData==NULL)
    {
        printf("Request failed: %s\n", szItem);
    }
    else
    {
        char szResult[255];
        DdeGetData(hData, (unsigned char *)szResult, 255, 0);
        printf("%s%s\n", sDesc, szResult);
    }
}
0

There are 0 answers