Click here to Skip to main content
16,007,760 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralAccessibility ... Pin
Hadi Rezaee2-Apr-01 21:03
Hadi Rezaee2-Apr-01 21:03 
GeneralProblem with SetLayeredWindowAttributes(...) Pin
Shuyi Vi2-Apr-01 20:47
Shuyi Vi2-Apr-01 20:47 
GeneralRe: Problem with SetLayeredWindowAttributes(...) Pin
Rui Lopes3-Apr-01 1:27
Rui Lopes3-Apr-01 1:27 
GeneralRe: Problem with SetLayeredWindowAttributes(...) Pin
3-Apr-01 1:40
suss3-Apr-01 1:40 
GeneralList view Pin
2-Apr-01 20:44
suss2-Apr-01 20:44 
QuestionNT service cause ADO's Open() function hang? Pin
2-Apr-01 18:26
suss2-Apr-01 18:26 
GeneralDirectX8 Texture Creation Pin
t_hamel2-Apr-01 17:24
t_hamel2-Apr-01 17:24 
GeneralDDE problems Pin
2-Apr-01 13:54
suss2-Apr-01 13:54 
Confused | :confused:
Hi,

I would like to know if there is a limit number of transactions we can do when using DDE by including <ddeml.h>.

I am writing an application to read cells from Excel. This application will read more than 20.000 cells in a spreadsheet. The application starts working well, but after reading about 2000 cells, it crashes and I need to restart the computer because nothing works anymore.

The application is a dialog based app and works like this:



DdeInitialize(&idInst, (PFNCALLBACK)&DdeCallback, hInstance),
APPCMD_CLIENTONLY, 0);


//Setup HSZs for Service and Topic
hszService = DdeCreateStringHandle(idInst, szServerApp, CP_WINANSI);
hszTopic = DdeCreateStringHandle(idInst, szTopic, CP_WINANSI);

//Connect to server app
srvHndl = DdeConnect(idInst, hszService, hszTopic, NULL);
if(srvHndl == 0L) {
AfxMessageBox("ERROR", MB_OK|MB_ICONSTOP);
return;
}
else
{
//. . .
// This code is inside a loop that will get the cells
strcpy(szSendStr, "R");
strcat(szSendStr, lineNo);
strcat(szSendStr, "C1");
testData = DdeCreateStringHandle(idInst, szSendStr, CP_WINANSI);
retData = DdeClientTransaction(NULL, 0, srvHndl, testData, CF_TEXT, XTYP_REQUEST, 5000, NULL);
retD = (LPTSTR)DdeAccessData(retData, NULL);
DdeUnaccessData(retData);
DdeFreeStringHandle(idInst, testData);
//. . .

}

DdeUninitialize(idInst);




Thanks a lot for any help


Vinicius Pontes
vinicius.pontes@uol.com.br
GeneralCString Pin
RobJones2-Apr-01 12:25
RobJones2-Apr-01 12:25 
GeneralRe: CString Pin
Christian Graus2-Apr-01 13:08
protectorChristian Graus2-Apr-01 13:08 
GeneralRe: CString Pin
RobJones2-Apr-01 13:16
RobJones2-Apr-01 13:16 
GeneralRe: CString Pin
2-Apr-01 23:09
suss2-Apr-01 23:09 
GeneralProblems with m_pCtrlSite Pin
2-Apr-01 8:28
suss2-Apr-01 8:28 
GeneralATL: How can I create one ActiveX Control that could be pasted on Word ( for example...) Pin
2-Apr-01 7:58
suss2-Apr-01 7:58 
Generallittle help pleace :) Pin
nicson2-Apr-01 5:46
nicson2-Apr-01 5:46 
GeneralRe: little help pleace :) Pin
2-Apr-01 8:41
suss2-Apr-01 8:41 
GeneralRe: little help pleace :) Pin
Christian Graus2-Apr-01 13:09
protectorChristian Graus2-Apr-01 13:09 
GeneralRe: little help pleace :) Pin
2-Apr-01 21:23
suss2-Apr-01 21:23 
GeneralDagnamit - continuing file access nightmare.... Pin
Christian Graus2-Apr-01 3:21
protectorChristian Graus2-Apr-01 3:21 
GeneralRe: Dagnamit - continuing file access nightmare.... Pin
Christian Graus2-Apr-01 3:35
protectorChristian Graus2-Apr-01 3:35 
GeneralRe: Dagnamit - continuing file access nightmare.... Pin
l a u r e n2-Apr-01 6:37
l a u r e n2-Apr-01 6:37 
GeneralRe: Dagnamit - continuing file access nightmare.... Pin
Christian Graus2-Apr-01 13:11
protectorChristian Graus2-Apr-01 13:11 
GeneralInsert item on two lines in a List Control Pin
Gero2-Apr-01 2:50
Gero2-Apr-01 2:50 
QuestionHow is a differance in win98 and win2000 for image management? Pin
hahyojin1-Apr-01 22:29
hahyojin1-Apr-01 22:29 
GeneralConversion of a default file format to PDF. Pin
1-Apr-01 19:45
suss1-Apr-01 19:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.