Click here to Skip to main content
15,894,896 members
Home / Discussions / C#
   

C#

 
GeneralRe: Evergrowth.AspForMarkDigExtension is out there now... Pin
OriginalGriff19-Oct-23 20:39
mveOriginalGriff19-Oct-23 20:39 
GeneralRe: Evergrowth.AspForMarkDigExtension is out there now... Pin
jschell20-Oct-23 11:28
jschell20-Oct-23 11:28 
QuestionC# How to iterate in all TR & TD of multiple html table and extract value Pin
Tridip Bhattacharjee from Unknown18-Oct-23 23:11
Tridip Bhattacharjee from Unknown18-Oct-23 23:11 
AnswerRe: C# How to iterate in all TR & TD of multiple html table and extract value Pin
Richard MacCutchan19-Oct-23 4:11
mveRichard MacCutchan19-Oct-23 4:11 
GeneralRe: C# How to iterate in all TR & TD of multiple html table and extract value Pin
Dave Kreskowiak19-Oct-23 5:19
mveDave Kreskowiak19-Oct-23 5:19 
GeneralRe: C# How to iterate in all TR & TD of multiple html table and extract value Pin
Richard MacCutchan19-Oct-23 5:24
mveRichard MacCutchan19-Oct-23 5:24 
GeneralRe: C# How to iterate in all TR & TD of multiple html table and extract value Pin
Tridip Bhattacharjee from Unknown26-Oct-23 10:47
Tridip Bhattacharjee from Unknown26-Oct-23 10:47 
GeneralRe: C# How to iterate in all TR & TD of multiple html table and extract value Pin
Richard MacCutchan26-Oct-23 22:04
mveRichard MacCutchan26-Oct-23 22:04 
GeneralRe: C# How to iterate in all TR & TD of multiple html table and extract value Pin
Tridip Bhattacharjee from Unknown27-Oct-23 3:36
Tridip Bhattacharjee from Unknown27-Oct-23 3:36 
GeneralRe: C# How to iterate in all TR & TD of multiple html table and extract value Pin
Richard MacCutchan27-Oct-23 3:50
mveRichard MacCutchan27-Oct-23 3:50 
GeneralRe: C# How to iterate in all TR & TD of multiple html table and extract value Pin
Tridip Bhattacharjee from Unknown2-Nov-23 2:49
Tridip Bhattacharjee from Unknown2-Nov-23 2:49 
GeneralRe: C# How to iterate in all TR & TD of multiple html table and extract value Pin
Dave Kreskowiak2-Nov-23 4:09
mveDave Kreskowiak2-Nov-23 4:09 
GeneralRe: C# How to iterate in all TR & TD of multiple html table and extract value Pin
Pete O'Hanlon2-Nov-23 3:45
mvePete O'Hanlon2-Nov-23 3:45 
AnswerRe: C# How to iterate in all TR & TD of multiple html table and extract value Pin
jschell19-Oct-23 5:08
jschell19-Oct-23 5:08 
GeneralRe: C# How to iterate in all TR & TD of multiple html table and extract value Pin
Tridip Bhattacharjee from Unknown26-Oct-23 10:45
Tridip Bhattacharjee from Unknown26-Oct-23 10:45 
Questionmysql db in cloud with c# desktop application geting too slow Pin
Member 1103383418-Oct-23 6:35
Member 1103383418-Oct-23 6:35 
AnswerRe: mysql db in cloud with c# desktop application geting too slow Pin
jeron118-Oct-23 7:25
jeron118-Oct-23 7:25 
AnswerRe: mysql db in cloud with c# desktop application geting too slow Pin
Dave Kreskowiak18-Oct-23 8:38
mveDave Kreskowiak18-Oct-23 8:38 
AnswerRe: mysql db in cloud with c# desktop application geting too slow Pin
jschell19-Oct-23 5:11
jschell19-Oct-23 5:11 
QuestionNeed to create next button Pin
Member 1611639316-Oct-23 4:26
Member 1611639316-Oct-23 4:26 
AnswerRe: Need to create next button Pin
Gerry Schmitz16-Oct-23 5:16
mveGerry Schmitz16-Oct-23 5:16 
GeneralRe: Need to create next button Pin
Member 1611639316-Oct-23 6:17
Member 1611639316-Oct-23 6:17 
GeneralRe: Need to create next button Pin
Dave Kreskowiak16-Oct-23 7:19
mveDave Kreskowiak16-Oct-23 7:19 
AnswerRe: Need to create next button Pin
RedDk16-Oct-23 6:49
RedDk16-Oct-23 6:49 
QuestionTransfer data between MFC Application and c# application using NamedPipe Pin
manoharbalu13-Oct-23 1:37
manoharbalu13-Oct-23 1:37 
I have to transfer data from MFC Application to C# application every 1 second
Please find below the MFC Application (Server) and c# application (Client).
I have a issue. Both the application's memory keeps increasing in task manager every 1 or 2 seconds. Please help me to figure out the issue in my code.
Server Code in MFC applicationvoid SendDataToNamedPipe(CString sData)
{

char czVal[PIPEMAXSIZE]; //PIPEMAXSIZE = 10000
memset(czVal,0,PIPEMAXSIZE);
strcpy(czVal, sData /*buffer*/);

CString sPipeName = "\\\\.\\pipe\\" + "Pipe";
LPCTSTR lpszPipename = (const char*) sPipeName;


hNamedPipe = CreateNamedPipe(
lpszPipename, // Name of the pipe
PIPE_ACCESS_OUTBOUND, // Pipe access type
PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT,
1, // Maximum number of instances
0, // Out buffer size
0, // In buffer size
0, // Timeout
NULL

);

if (hNamedPipe != INVALID_HANDLE_VALUE)
{
BOOL fConnected,fSuccess;

fConnected = ConnectNamedPipe(hNamedPipe, NULL) ? TRUE : (GetLastError() == ERROR_PIPE_CONNECTED);
//// Assuming 'dataToSend' contains the data to send
WriteFile(hNamedPipe, czVal, PIPEMAXSIZE /*(DWORD)sizeof(czVal)*/, NULL, NULL);

DisconnectNamedPipe(hNamedPipe);
CloseHandle(hNamedPipe);
}
}

Client Code C# Applicaition:
///////////////////
public void RecivePipeClient()
{
NamedPipeClientStream pipeClient = new NamedPipeClientStream(".", "Pipe", PipeDirection.In, PipeOptions.None);
pipeClient.Connect();
StreamReader reader = new StreamReader(pipeClient);

string dataValue = reader.ReadLine();

}


//Calling Thread function in MFC Application (Server)
void ThreadNamedPipeTagLiveValue(LPVOID)
{
CString strValue= "";
while( 1 )
{
POSITION pos1 = OLivePointList.GetHeadPosition();
while(pos1 != NULL)
{
CTagBase* OTemp = (CTagBase*) OLivePointList.GetAt(pos1);


CTime TNow;
TNow = CTime::GetCurrentTime();
strTime=TNow.Format("%m/%d/%Y %H:%M:%S");
CString strTemp;
strTag = OTemp->GetTagName();

if((OTemp->GetTagType() == CONTROLLER))
{
OTemp->GetTagValues(OLivePoints);
sTempValue.Format("%5.2f", OLivePoints.PV);
strValue = strValue + sTempValue + ",";
}
}
SendDataToNamedPipe(strValue);

Sleep(1000);
}
}

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.