16,004,686 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Tarun Batra (Top 200 by date)
Tarun Batra
22-Feb-14 9:08am
View
please reply in this http://www.codeproject.com/Questions/731791/File-ponter-maintaince-error-please-guide
Tarun Batra
22-Feb-14 9:08am
View
please reply this http://www.codeproject.com/Questions/731791/File-ponter-maintaince-error-please-guide
Tarun Batra
22-Feb-14 9:08am
View
please reply this http://www.codeproject.com/Questions/731791/File-ponter-maintaince-error-please-guide
Tarun Batra
22-Feb-14 6:22am
View
i need some more help from you actually a guidance
Tarun Batra
14-Feb-13 9:23am
View
Can you suggest some good book for c++ and for dot net too that take me from beginning to advance
Tarun Batra
14-Feb-13 9:23am
View
Can you suggest some good book for c++ and for dot net too that take me from beginning to advance
Tarun Batra
14-Feb-13 9:23am
View
Can you suggest some good book for c++ and for dot net too that take me from beginning to advance
Tarun Batra
14-Feb-13 9:23am
View
Can you suggest some good book for c++ and for dot net too that take me from beginning to advance
Tarun Batra
5-Feb-13 8:52am
View
sir have an experience of c/c++ on windows so according to you i should go on dot net?
Tarun Batra
10-Jan-13 7:45am
View
you are absolutely correct sir we have should use the c++ code so i tryed to make the DLL of above link but it gives .ax file and actually i have to receive the rtsp stream from socket connection i tryed it in c++ but was not able to but when i use your soket connection to recieve the data we were able to get so we thought to transform c++ code into c#
Tarun Batra
10-Jan-13 7:25am
View
sir sorry for the silly ques but i am not much familiar with C# can you please give me the equivalent c# code for the above c++ code i only want to implement the filter of which i have given you link in C#,as you are much familiar with direct show,it will be so kind of you
Tarun Batra
10-Jan-13 7:15am
View
i am asking to you sir where can i find the CUnknown class in your base classes and NonDelegatingQueryInterface(REFIID riid, void **ppv) as there is no thing like REFIID in your samples,are there any alternative for these?
Tarun Batra
10-Jan-13 7:04am
View
but i am not able to get the CUnknown class and NonDelegatingQueryInterface(REFIID riid, void **ppv) interface in your base classes code how to get that as you can see the below code return s the CUnknown pointer
CUnknown* WINAPI CLiveSource::CreateInstance(LPUNKNOWN pUnk, HRESULT *phr)
{
CUnknown* pNewFilter = new CLiveSource(pUnk, phr);
if (phr)
{
if (pNewFilter == NULL)
*phr = E_OUTOFMEMORY;
else
*phr = S_OK;
}
return pNewFilter;
}
Tarun Batra
10-Jan-13 6:54am
View
Thanks for the reply sir but i was trying to convert http://www.codeproject.com/Articles/158053/DirectShow-Filters-Development-Part-2-Live-Source into c# filter using your solution but i got stuck in "COM plumbing" part of the above link,i was not able to get the c# code of the "COM plumbing" part
Tarun Batra
2-Jan-13 5:27am
View
sir the problem how can that be done at run time i mean at the same time we will be writing to file and reading from file
Tarun Batra
2-Jan-13 5:20am
View
sir i have a program that receive the network encrypted network stream decrypt it and save it in a buffer thats the reason i want to use the buffer and the buffer contain NAL unit can u give me some sample that take NAL unit as input
Tarun Batra
2-Jan-13 5:14am
View
is there any other api or function on which i can give the buffer as data rather than the file
Tarun Batra
2-Jan-13 5:04am
View
Sir this is what i was trying to change that rather than passing file name pass the buffer
Tarun Batra
2-Jan-13 4:41am
View
What to do to make it work....plz suggest
Tarun Batra
2-Jan-13 4:35am
View
What to do to make it work....plz suggest
Tarun Batra
2-Jan-13 3:38am
View
updated the code
Tarun Batra
2-Jan-13 3:32am
View
i am reading the file into the buffer using fread and giving the buffer name instead of file name
Tarun Batra
2-Jan-13 3:30am
View
sir i am using the same file which it plays but now instead of giving the file path i am giving the array name which contain the data
Tarun Batra
2-Jan-13 3:19am
View
sir it says cannot add clip format not support
Tarun Batra
2-Jan-13 3:18am
View
ya but there i found no place to ask so i tried here
Tarun Batra
30-Nov-12 10:03am
View
can you please give me your mail id by mailing me on trn200190@gmail.com
Tarun Batra
30-Nov-12 9:54am
View
i did like this CString CFILicenseSettings::GetCodeStartup1()
{
BYTE* bCode = new BYTE[28];
int * pnSize = new int(28);
//GetCodeIn1 (bCode, pnSize );
int y;
//RC4_Init(m_byX, strlen((char*)m_byX));
for (y = 0; y < *pnSize ; y++)
{
m_MainLFString[y] = bCode[y] ^ RC4_Output();
}
m_MainLFString[y] = '\0';
//strcpy(m_szMainLFString.GetBuffer(m_szMainLFString.GetLength()),m_MainLFString);
// m_szMainLFString = m_MainLFString;
delete [] bCode;
delete pnSize;
//
//return m_szMainLFString;
"hello world";
//
} i get the error Error 2 error C4716: 'CFILicenseSettings::GetCodeStartup1' : must return a value e:\timswebservermanager_lic\timswebservermanager\filicensesettings.cpp
Tarun Batra
30-Nov-12 9:49am
View
file compile succesfully
Tarun Batra
30-Nov-12 9:44am
View
same error
Tarun Batra
30-Nov-12 9:40am
View
if i comment the call of my function CFILicenseSettings then my projects compile successfully
Tarun Batra
30-Nov-12 9:35am
View
yes sir
Tarun Batra
30-Nov-12 9:33am
View
sir use of mfc is set to "Use MFC in a shared DLL" and atl is set to "NOT USING ATL"
Tarun Batra
30-Nov-12 9:22am
View
which library do i have to add
Tarun Batra
30-Nov-12 9:19am
View
Sir i can see "NO" in "Excluded From Build"
Tarun Batra
30-Nov-12 9:12am
View
not at all sir
Tarun Batra
30-Nov-12 9:12am
View
ya sir i try'ed with that too
Tarun Batra
30-Nov-12 9:05am
View
No sir
Tarun Batra
30-Nov-12 8:59am
View
It is declared as CString GetCodeStartup1(); in FILicenseSettings.h
Tarun Batra
30-Nov-12 8:52am
View
yes sir
Tarun Batra
22-Nov-12 11:54am
View
sir can you tell what need to be done
Tarun Batra
20-Nov-12 0:07am
View
sir can you give me the pseudo code in java i have to do the above in java
Tarun Batra
8-Nov-12 12:03pm
View
Sir can you tell me just one thing how to check whether the data we got is valid or not on the socket?
Tarun Batra
7-Nov-12 9:51am
View
Can you please give some pseudo code sir
Tarun Batra
4-Nov-12 7:10am
View
Sir i want to read a line from a file then i take it into a string using getline,getline doesnt work with char *
Tarun Batra
2-Nov-12 3:45am
View
it should be :-
class Interface { public: virtual void fun()=0; virtual ~Interface(){} }; class Derived:public Interface { public: ~Derived(){} void fun() { printf("i am in derived class fun\n"); } };
Tarun Batra
2-Nov-12 3:31am
View
is it like this:-
class Interface
{
public:
virtual void fun()=0;
virtual ~Interface();
};
class Derived:public Interface
{
public:
virtual ~Derived();
void fun()
{
printf("i am in derived class fun\n");
}
};
Tarun Batra
31-Oct-12 8:54am
View
can you plz reply on this sir http://www.codeproject.com/Questions/486905/Howplustoplustoplusthispluspassingpluspointers-3f
Tarun Batra
31-Oct-12 7:19am
View
no will try swapping
Tarun Batra
31-Oct-12 7:04am
View
Sir can you please tell if some time in future i want to update status field in the structure that has been added into the list how can i do that?
Tarun Batra
31-Oct-12 7:04am
View
Sir can you please tell if some time in future i want to update status field in the structure that has been added into the list how can i do that?
Tarun Batra
30-Oct-12 15:46pm
View
sir plz do reply this http://www.codeproject.com/Questions/486436/Howpluscanplusipluspassplustheplusthisplusstlplusl
Tarun Batra
30-Oct-12 14:35pm
View
thanks for the solution using List stl how can we get the first node of list i mean is there any function available in stl to get the node one by one
Tarun Batra
30-Oct-12 12:40pm
View
can you please reply this http://www.codeproject.com/Questions/486368/HowplustoplusaddplusstructureplustoplustheplusSTLp
Tarun Batra
30-Oct-12 11:20am
View
i doesn't work sir
Tarun Batra
30-Oct-12 10:34am
View
Sir Thanks for the reply can you please help me in one more problem i am not able to detect the tag,can you please tell me what changes should i do?
Tarun Batra
26-Oct-12 15:32pm
View
sir plz tell one thing if the server is closed for a while and started after that can we send the data to the server with same socket with which we have previously connected to server or should we need to create a new socket connection?
Tarun Batra
17-Oct-12 9:00am
View
Can you please tell how to convert BSTR to char *.
Tarun Batra
17-Oct-12 7:58am
View
if i use CString str ="...";
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Invalid at the top level of the document. Error processing resource 'file:///C:/Documents and Settings/Administrator/Deskto...
00154118
Tarun Batra
17-Oct-12 5:59am
View
can you please reply on this http://www.codeproject.com/Questions/478172/HowplustopluscompareplusBSTRpluswithpluschar
Tarun Batra
17-Oct-12 3:50am
View
Sir you are true i am trying to learn new technology,what i have to do is that i will call one method that return a string as shown above i will catch this string in a string variable and pass it to XML writer that will write the string as it is and then read the XML from XML reader and do further processing can you please guide me to do this?
Tarun Batra
17-Oct-12 3:30am
View
can you reply to following link http://www.codeproject.com/Questions/478037/QueriesplusregardingplusTinyXMLplusandplusanotherp
Tarun Batra
17-Oct-12 3:30am
View
can you reply to following link http://www.codeproject.com/Questions/478037/QueriesplusregardingplusTinyXMLplusandplusanotherp
Tarun Batra
17-Oct-12 2:26am
View
sir my data is like this <datacapturesesstings>
<modulesettings>
<account_id>1
<capture_local_dir>c:\
<capture_log_dir>c:\log
<capture_log_level>debug
<capture_request_interval>2
<capture_connection_interval>2
<smtp_server_name>n1
<smtp_server_port>80
<smtp_email_sender>s1
<smtp_email_sender_password>p1
<machinelist>
<machine>
<machineid>0022
<make>Make1
<model>Model1
<serialnumber>SN1
<ipaddress>10.10.10.10
<Port>80</Port>
<machine>
<machineid>3000
<make>Make3
<model>Model3
<serialnumber>SN3
<ipaddress>30.30.30.30
<Port>80</Port>
I used the code of TinyXML to parse and save the xml,i saw that there are 4 projects in TinyXML,can you please guide me which to use to parse the XML and then write it into the new XML file
Tarun Batra
17-Oct-12 2:25am
View
Deleted
sir my data is like this <datacapturesesstings>
<modulesettings>
<account_id>1
<capture_local_dir>c:\
<capture_log_dir>c:\log
<capture_log_level>debug
<capture_request_interval>2
<capture_connection_interval>2
<smtp_server_name>n1
<smtp_server_port>80
<smtp_email_sender>s1
<smtp_email_sender_password>p1
<machinelist>
<machine>
<machineid>0022
<make>Make1
<model>Model1
<serialnumber>SN1
<ipaddress>10.10.10.10
<Port>80</Port>
<machine>
<machineid>3000
<make>Make3
<model>Model3
<serialnumber>SN3
<ipaddress>30.30.30.30
<Port>80</Port>
I used the code of TinyXML to parse and save the xml,i saw that there are 4 projects in TinyXML,can you please guide me which to use to parse the XML and then write it into the new XML file
Tarun Batra
11-Oct-12 14:18pm
View
Can you please tell sir
Tarun Batra
11-Oct-12 14:13pm
View
As you can see the above code in ConnecttoMachine function i want to create a thread and in thread i want to do all sending and receiving can u tell how to do this?
Tarun Batra
11-Oct-12 13:13pm
View
i did some thing like this now :
this is a.h
#define WIN32_LEAN_AND_MEAN
#include
#include
#include
#include <process.h>
#include
#include
#include
#include
using namespace std;
class IDialysisConnector
{
public :
struct addrinfo addr_;
unsigned short port_;
CString hostname_;
CRITICAL_SECTION sect_;
HANDLE threadHandle_;
HANDLE threadHandle1_;
bool connected_;
public :
SOCKET sock_;
IDialysisConnector()
{
//WSADATA wsaData;
//// Initialize Winsock
//int iResult;
//iResult = WSAStartup(MAKEWORD(2,2), &wsaData);
//if (iResult != 0)
//{
// printf("WSAStartup failed with error: %d\n", iResult);
//}
}
public:
virtual int ConnectToMachine()=0;
};
class B:public A
{
public:
int ConnectToMachine()
{
int conResult,iResult;
struct addrinfo *result = NULL,*ptr = NULL;
u_long iMode = 0;
DWORD nTimeout = 5000; // 5 seconds
int port=22;
WSADATA wsaData;
// Initialize Winsock
iResult = WSAStartup(MAKEWORD(2,2), &wsaData);
if (iResult != 0)
{
printf("WSAStartup failed with error: %d\n", iResult);
}
ZeroMemory( &addr_, sizeof(addr_) );
addr_.ai_family = AF_UNSPEC;
addr_.ai_socktype = SOCK_STREAM;
addr_.ai_protocol = IPPROTO_TCP;
// Resolve the server address and port
conResult = getaddrinfo("192.168.15.168", (PCSTR)22, &addr_, &result);
if ( conResult != 0 ) {
printf("getaddrinfo failed with error: %d\n", conResult);
WSACleanup();
return 1;
}
// Attempt to connect to an address until one succeeds
for(ptr=result; ptr != NULL ;ptr=ptr->ai_next) {
// Create a SOCKET for connecting to server
sock_ = socket(ptr->ai_family, ptr->ai_socktype,
ptr->ai_protocol);
if (sock_ == INVALID_SOCKET) {
printf("socket failed with error: %ld\n", WSAGetLastError());
WSACleanup();
return 1;
}
/////////////////////////////////////////////////////////////////////////////
// Set the socket I/O mode: In this case FIONBIO
// enables or disables the blocking mode for the
// socket based on the numerical value of iMode.
// If iMode = 0, blocking is enabled;
// If iMode != 0, non-blocking mode is enabled.
conResult = ioctlsocket(sock_, FIONBIO, &iMode);
if (conResult != NO_ERROR)
printf("ioctlsocket failed with error: %ld\n", conResult);
/////////////////////////////////////////////////////////////////////////////
conResult = setsockopt(sock_, SOL_SOCKET, SO_RCVTIMEO, (const char*)&nTimeout, sizeof(DWORD));
if (conResult != NO_ERROR)
{
printf("\nSetsocopt fail with error :%d\n",WSAGetLastError());
return 0;
}
// Connect to server.
conResult = connect(sock_, ptr->ai_addr, (int)ptr->ai_addrlen);
if (conResult == SOCKET_ERROR) {
closesocket(sock_);
sock_ = INVALID_SOCKET;
continue;
}
break;
}
freeaddrinfo(result);
if (sock_ == INVALID_SOCKET) {
printf("Unable to connect to server!\n");
WSACleanup();
return 1;
}
}
};
#include"a.h"
int main()
{
B *pChecking = new B;
pChecking->ConnectToMachine();
}
when i run it i get these errors:
error LNK2019: unresolved external symbol __imp__freeaddrinfo@4 referenced in function "public: virtual int __thiscall B::ConnectToMachine(void)" (?ConnectToMachine@CDiamaxConnector@@UAEHXZ)
1>Main.obj : error LNK2019: unresolved external symbol __imp__getaddrinfo@16 referenced in function "public: virtual int __thiscall B::ConnectToMachine(void)" (?ConnectToMachine@CDiamaxConnector@@UAEHXZ)
Tarun Batra
11-Oct-12 13:11pm
View
i did some thing like this now :
this is a.h
#define WIN32_LEAN_AND_MEAN
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <process.h>
#include<atlstr.h>
#include<windows.h>
#include <winsock2.h>
#include <ws2tcpip.h>
using namespace std;
class IDialysisConnector
{
public :
struct addrinfo addr_;
unsigned short port_;
CString hostname_;
CRITICAL_SECTION sect_;
HANDLE threadHandle_;
HANDLE threadHandle1_;
bool connected_;
public :
SOCKET sock_;
IDialysisConnector()
{
//WSADATA wsaData;
//// Initialize Winsock
//int iResult;
//iResult = WSAStartup(MAKEWORD(2,2), &wsaData);
//if (iResult != 0)
//{
// printf("WSAStartup failed with error: %d\n", iResult);
//}
}
public:
virtual int ConnectToMachine()=0;
};
class B:public A
{
public:
int ConnectToMachine()
{
int conResult,iResult;
struct addrinfo *result = NULL,*ptr = NULL;
u_long iMode = 0;
DWORD nTimeout = 5000; // 5 seconds
int port=22;
WSADATA wsaData;
// Initialize Winsock
iResult = WSAStartup(MAKEWORD(2,2), &wsaData);
if (iResult != 0)
{
printf("WSAStartup failed with error: %d\n", iResult);
}
ZeroMemory( &addr_, sizeof(addr_) );
addr_.ai_family = AF_UNSPEC;
addr_.ai_socktype = SOCK_STREAM;
addr_.ai_protocol = IPPROTO_TCP;
// Resolve the server address and port
conResult = getaddrinfo("192.168.15.168", (PCSTR)22, &addr_, &result);
if ( conResult != 0 ) {
printf("getaddrinfo failed with error: %d\n", conResult);
WSACleanup();
return 1;
}
// Attempt to connect to an address until one succeeds
for(ptr=result; ptr != NULL ;ptr=ptr->ai_next) {
// Create a SOCKET for connecting to server
sock_ = socket(ptr->ai_family, ptr->ai_socktype,
ptr->ai_protocol);
if (sock_ == INVALID_SOCKET) {
printf("socket failed with error: %ld\n", WSAGetLastError());
WSACleanup();
return 1;
}
/////////////////////////////////////////////////////////////////////////////
// Set the socket I/O mode: In this case FIONBIO
// enables or disables the blocking mode for the
// socket based on the numerical value of iMode.
// If iMode = 0, blocking is enabled;
// If iMode != 0, non-blocking mode is enabled.
conResult = ioctlsocket(sock_, FIONBIO, &iMode);
if (conResult != NO_ERROR)
printf("ioctlsocket failed with error: %ld\n", conResult);
/////////////////////////////////////////////////////////////////////////////
conResult = setsockopt(sock_, SOL_SOCKET, SO_RCVTIMEO, (const char*)&nTimeout, sizeof(DWORD));
if (conResult != NO_ERROR)
{
printf("\nSetsocopt fail with error :%d\n",WSAGetLastError());
return 0;
}
// Connect to server.
conResult = connect(sock_, ptr->ai_addr, (int)ptr->ai_addrlen);
if (conResult == SOCKET_ERROR) {
closesocket(sock_);
sock_ = INVALID_SOCKET;
continue;
}
break;
}
freeaddrinfo(result);
if (sock_ == INVALID_SOCKET) {
printf("Unable to connect to server!\n");
WSACleanup();
return 1;
}
}
};
#include"a.h"
int main()
{
B *pChecking = new B;
pChecking->ConnectToMachine();
}
when i run it i get these errors:
Main.obj : error LNK2019: unresolved external symbol __imp__freeaddrinfo@4 referenced in function "public: virtual int __thiscall CDiamaxConnector::ConnectToMachine(void)" (?ConnectToMachine@CDiamaxConnector@@UAEHXZ)
1>Main.obj : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function "public: virtual int __thiscall CDiamaxConnector::ConnectToMachine(void)" (?ConnectToMachine@CDiamaxConnector@@UAEHXZ)
1>Main.obj : error LNK2019: unresolved external symbol __imp__connect@12 referenced in function "public: virtual int __thiscall CDiamaxConnector::ConnectToMachine(void)" (?ConnectToMachine@CDiamaxConnector@@UAEHXZ)
1>Main.obj : error LNK2019: unresolved
Tarun Batra
11-Oct-12 13:06pm
View
can u solve mine error?
Tarun Batra
11-Oct-12 12:23pm
View
Sorry for the wrong question i want to declare two functions in class A and implement them in class B and call the function of class Bi did like this class B obj;int main(){
obj.connecttomachine();
}but it says obj has no members available
Tarun Batra
11-Oct-12 9:28am
View
So how should i modify the code?
Tarun Batra
10-Oct-12 10:05am
View
Sir you are totally correct but i have to work as per requirement
Tarun Batra
10-Oct-12 8:52am
View
sir i downloaded "JSON Spirit: A C++ JSON Parser/Generator Implemented with Boost Spirit[^]" it contain so many projects which to run and it has so many errors while running in Visual studio
Tarun Batra
10-Oct-12 8:43am
View
sir i downloaded "JSON Spirit: A C++ JSON Parser/Generator Implemented with Boost Spirit[^]" it contain so many projects which to run and it has so many errors while running in Visual studio
Tarun Batra
9-Oct-12 11:08am
View
c++ with .net sir
Tarun Batra
9-Oct-12 10:07am
View
using COM,i solved the problem
Tarun Batra
8-Oct-12 9:15am
View
Sir do u have any idea how to call the C# service through VC++?
Tarun Batra
8-Oct-12 8:50am
View
Sir do u have any idea how to call the C# service through VC++?
Tarun Batra
8-Oct-12 6:29am
View
Thanks for the reply but neither of link helped me
Tarun Batra
5-Oct-12 10:09am
View
Sorry sir i am not so much well versed can you please guide me the steps of how to use the the C# dll in VC++ projects
Tarun Batra
5-Oct-12 9:51am
View
Sir i want to add a C# Dll to C++ project not an C++ lib to c# project
Tarun Batra
5-Oct-12 8:47am
View
i have a dll named a.dll that i have made in c# how to add dll in project i know how to add libraries but not dll
Tarun Batra
4-Oct-12 6:18am
View
i have made the parsing logic you can see that too at http://codereview.stackexchange.com/questions/16194/my-whole-parsing-logic-suffers-because-of-null-character-how-to-resolve-this
Tarun Batra
4-Oct-12 5:53am
View
i know the data part details you can see the the fields that data part has on the following link http://stackoverflow.com/questions/12723177/my-whole-parsing-logic-suffers-because-of-null-character-how-to-resolve-this it contains a pic that contains the data part fields and its length
Tarun Batra
4-Oct-12 5:19am
View
I send the command to machine then i get the response through socket programming
Tarun Batra
4-Oct-12 4:28am
View
Thanks for the reply but the packet that i have i have shown you and i have details of the field such as there name and length which all combine to form the data part.Should i write that and i can't get the details from the manufacturer.
Tarun Batra
2-Oct-12 1:09am
View
Sir just a Bit more help of your is required i modified my WriteBinary function as shown in above code as void Log ::WriteBinary(char bufg[139])
{
char szDate[12];
char szTime[12];
char buf[2000];
char bufpath[2000];
int i=0;
_strdate( szDate );
_strtime( szTime );
strcpy(buf,szLogDir1);
strcat(buf, "\\");
strcat(buf, "\\");
strcat(buf,a);
strcat(buf,szDate);
strcat(buf,".txt");
memcpy(bufpath,buf,sizeof(buf));
while(buf[i] != '\0')
{
if(buf[i] == '/')
buf[i] = '-';
i++;
}
ofstream pOS(buf,ios::app);
fprintf((FILE*)bufpath, "%s::%s::DATA IS::", szDate, szTime);//Now my code break here
fwrite(bufg, 1, 138, (FILE*)bufpath);
fprintf((FILE*)bufpath, "\n");
/*sprintf(buf,"%s::%s :Data is :%s", szDate, szTime, bufg);
pOS<<buf<< endl;*/
pOS.close();
}
Tarun Batra
1-Oct-12 14:39pm
View
i added '\n' also put not getting data in the next line
Tarun Batra
1-Oct-12 14:25pm
View
Sir You are superb just tell me one more thing how to write the data one after another the whole data is written in one line even after subsequent function call i added \n also after the data also
Tarun Batra
1-Oct-12 14:04pm
View
sir for sample i did like this char buf[100]="RE00002270150\0 0210 0";
char szDate[12];
char szTime[12];
char buf_buff[2500];
memset(buf_buf, 0, sizeof(buf_buff));
_strdate( szDate );
_strtime( szTime );
sprintf(buf_buf,"%s::%s", szDate, szTime);
printf("common buf is %s\n",buf_buf);
int w=strlen(buf_buf);
int k=20;
for(int i=0;i<=28;i++)
{
buf_buf[k]=buf[i];
k++;
}
buf_buf[k]='\0';
WriteToDataFile1(buf_buf); Can you please tell me how to write the data in next line 2nd time the WriteToDataFile1() function is called
Tarun Batra
1-Oct-12 13:38pm
View
Sir can you please give the pseudo code i will get 138 byte from the server that is the binary data it is fixed it will be of 138 byte
Tarun Batra
1-Oct-12 13:21pm
View
sir you were correct that fwrite will work but i got into two problems now one is how to write date and time before the actual data to write and every time WriteToDataFile1() function the data is written in the same line rather than one after another by this i mean that data is written like this DATA DATA BUT IT SHOULD BE DATA DATA
Tarun Batra
1-Oct-12 12:16pm
View
Can u please give some psudo code...It will be a much help from your side
Tarun Batra
1-Oct-12 11:33am
View
Now can you tell me now what to do under the circumstances i wrote below?
Tarun Batra
1-Oct-12 11:28am
View
int WriteToDataFile1(char* str)
{
FILE* log;
char szDate[12];
char szTime[12];
char buf_buff[2500];
memset(buf_buf, 0, sizeof(buf_buff));
_strdate( szDate );
_strtime( szTime );
sprintf(buf_buf,"%s::%s:Info:%s", szDate, szTime, str);log = fopen(BufferFilePath11, "wb");
if (log == NULL)
return -1;
sprintf(buf_buf,"%s::%s:Info:%s", szDate, szTime, str);
fwrite(buf_buf,1,sizeof(buf_buf),log);
fclose(log);
return 0;
}Acc to you i use thr fwrite function but as i told you i have to write the data as "DATE:Time:DATA" so i used "sprintf(buf_buf,"%s::%s:Info:%s", szDate, szTime, str);" won't i will get stuck here?
Tarun Batra
1-Oct-12 11:20am
View
As i have to write binary data that i receive in the following format DATE:TIME:DATA even if the DATA contains null character it should print all the data
Tarun Batra
1-Oct-12 11:20am
View
Can u tell what to use instead of sprintf?
Tarun Batra
1-Oct-12 11:16am
View
As i have to write binary data that i receive in the following format DATE:TIME:DATA even if the DATA contains null character it should print all the data
Tarun Batra
1-Oct-12 11:14am
View
Is there any other way,Please tell
Tarun Batra
1-Oct-12 11:07am
View
Sir you are correct we should fwrite but as shown in my above problem(under Binary started text) sometimes the whole buffer is written and sometimes not why is it so?
Tarun Batra
1-Oct-12 10:50am
View
Sir the problem that i can understand is "sprintf(buf,"%s::%s :Data is :%s", szDate, szTime, str);" sprintf breks at null character but if i get the null character in response how can i print it into buffer?
Tarun Batra
1-Oct-12 10:29am
View
can u please answer http://www.codeproject.com/Questions/468868/Can-u-tell-whats-the-problem-in-the-below-function
Tarun Batra
1-Oct-12 10:28am
View
can u please answer http://www.codeproject.com/Questions/468868/Can-u-tell-whats-the-problem-in-the-below-function
Tarun Batra
1-Oct-12 10:28am
View
can u please answer http://www.codeproject.com/Questions/468868/Can-u-tell-whats-the-problem-in-the-below-function
Tarun Batra
21-Sep-12 7:33am
View
Really thanks for the code but i too have queries
Tarun Batra
21-Sep-12 4:28am
View
sir my problem is if i use cin.ignore() program runs but doesn't terminate acc to convention parse_recv_data() call the write_to_buffer() function which in turn call the WriteToDataFile(buf_send); function so after writing to datafile function should return to write_to_buffer() function and then to parse_recv_data() function,but at the closing braces of write_to_buffer(){ "}" my code breaks saying "Run-Time Check Failure #2 - Stack around the variable 'b_Total_hourmeter' was corrupted." so if i use cin.ignore(); my code doesn't break but also doesn't terminate successfully
Tarun Batra
20-Sep-12 5:31am
View
int WriteToDataFile(char* str)
{
FILE* log;
char szDate[12];
char szTime[12];
char buf1313[2500];
_strdate( szDate );
_strtime( szTime );
strcpy(buf1313,szDate);
strcat(buf1313," ");
strcpy(buf1313,szTime);
strcat(buf1313," ");
strcpy(buf1313,str);
log = fopen(DataFilePath, "a+");
if (log == NULL)
return -1;
fprintf(log, "%s\n", buf1313);
fclose(log);
return 0;
}the above is my function to write to the file i did something like this:-sprintf(bufff,"%s,%d,",curretnt_data.mc_no,fill.Dialysate_flow);WriteToDataFile(bufff); But still i am not getting the date and time can u tell me the problem
Tarun Batra
20-Sep-12 5:28am
View
int WriteToDataFile(char* str)
{
FILE* log;
char szDate[12];
char szTime[12];
memset(buf1313, 0, sizeof(buf1313));
char buf1313[2500];
_strdate( szDate );
_strtime( szTime );
strcpy(buf1313,szDate);
strcat(buf1313," ");
strcpy(buf1313,szTime);
strcat(buf1313," ");
strcpy(buf1313,str);
log = fopen(DataFilePath, "a+");
if (log == NULL)
return -1;
fprintf(log, "%s\n", buf1313);
fclose(log);
return 0;
}the above is my function to write to the file i did something like this:-sprintf(bufff,"%s,%d,",curretnt_data.mc_no,fill.Dialysate_flow);WriteToDataFile(bufff); But still i am not getting the date and time can u tell me the problem
Tarun Batra
20-Sep-12 4:23am
View
u said correctly fprintf can be used here is my function that use fprintf:-int WriteToDataFile(char* str)
{
FILE* log;
log = fopen(DataFilePath, "a+");
if (log == NULL)
return -1;
fprintf(log, "%s\n", str);
fclose(log);
return 0;
}But as you can see my output i need data and time in the beginning that i am not able to get my output should be 09/17/12::17:28:17 on,active,38 i am only able to print like this on,active,38 by doing like this sprintf(buf,",%s,%s,%d", status_of_machine,mode,tmp);WriteToDataFile(buf); just tell how to add date and time
Tarun Batra
20-Sep-12 3:40am
View
should i paste my log file code
Tarun Batra
20-Sep-12 3:40am
View
sir i have to write in log file not on console
Tarun Batra
20-Sep-12 3:39am
View
I have posted only this question with this subject
Tarun Batra
20-Sep-12 3:20am
View
Is in c++ sir not in C# and what was you not able to understand?
Tarun Batra
20-Sep-12 2:58am
View
can u just tell the following:- as i have stated i have to create 100 threads so to make 100 connection i need have to 100 buffer,so to do the task i got the following suggestion:-you'll have to create an object for each thread and pass it to the thread upon thread creation. When you execute the common thread function, pass the thread's object's buffer to recv(). you have to have some class that represents the connection - it should have hostname/IP string, socket handle, a thread handle and read/write buffer data members. Pass in the hostname/IP string as a ctor parameter and then, in the ctor, store the hostname/IP and create a thread, (passing 'this' as thread create parameter so that the thread function can call a 'run' method of the connection), to do the connect, read, write using the private buffer/s. Each connection class instance would then operate on its own - no need for any globals.How to implement this.
Tarun Batra
17-Sep-12 11:22am
View
please reply this http://www.codeproject.com/Questions/460820/Can-u-give-me-an-idea-how-to-implement-this
Tarun Batra
17-Sep-12 11:21am
View
please reply this http://www.codeproject.com/Questions/460820/Can-u-give-me-an-idea-how-to-implement-this
Tarun Batra
17-Sep-12 11:20am
View
please reply this http://www.codeproject.com/Questions/460820/Can-u-give-me-an-idea-how-to-implement-this
Tarun Batra
17-Sep-12 11:20am
View
please reply this http://www.codeproject.com/Questions/460820/Can-u-give-me-an-idea-how-to-implement-this
Tarun Batra
17-Sep-12 11:08am
View
Sir let me explain you:- i will have one my system and 100 dialysis machine i will connect to dialysis machines through sockets(ip and port i will get from database),now i will send request to each machine and they will in respond give me some data and i have to parse the data and store it in a file for each machine as each machine will be connected to different patient and will give different data.Now is It clear?
Tarun Batra
17-Sep-12 10:58am
View
Sir what did u was not able to understand?
Tarun Batra
17-Sep-12 6:05am
View
its int prev=0; and then code followed by int w=0;
Tarun Batra
17-Sep-12 6:04am
View
int w =0;
do {//WORKING
//iResult = recvfrom(ThreadSocket, recvbuf, recvbuflen, 0,ptr->ai_addr, (int *)ptr->ai_addrlen);
iResult = recv(ThreadSocket, recvbuf, recvbuflen, 0);
if ( iResult > 0 )
{
printf("Bytes received: %d\n", iResult);
}
else if ( iResult == 0 )
printf("Connection closed\n");
else
printf("recv failed with error: %d\n", WSAGetLastError()); } while( iResult > 0 ); return 0;
}
Tarun Batra
17-Sep-12 6:00am
View
#define DEFAULT_BUFLEN 512
#define DEFAULT_PORT "100"
int iResult;
SOCKET ConnectSocket = INVALID_SOCKET;
SOCKET ThreadSocket = INVALID_SOCKET;
static DWORD WINAPI FIComThreadEntry(LPVOID lpdwThreadParam);
HANDLE gui_ThreadHandle[4];
bool connect(char *host,int port, int timeout);
struct addrinfo *result = NULL,
*ptr = NULL,
hints;
char recvbuf[DEFAULT_BUFLEN];
int recvbuflen = DEFAULT_BUFLEN;
void ReadConfigSettings();
void GetIniFilePath();
void CreateLogFolder();
//time_t t;
int m_port;
char *port2;
char *ip1="192.168.15.168";
char *ip_serv;
char data[6]="CM00";
const char data1[]={0x43,0x4d,0x30,0x30,0x0f,0x0D};
const char data2[]={0x43,0x4d,0x30,0x30,0xf0,0x0D};//f0
SYSTEMTIME st,lt;
Log* wLog;
char *b;
int LOGLVL;
const char* szLogDir;
char IniFilePath[2500];
void datarecv();
#define Buflen 1400
char common[276];
//char Buf[MaxSize][Buflen];
int __cdecl main(int argc, char **argv)
{
/*time_t time;
time(&time);*/
WSADATA wsaData;
SOCKET ConnectSocket = INVALID_SOCKET;
u_long iMode = 0;
DWORD nTimeout = 5000; // 5 seconds
// Validate the parameters
if (argc != 2) {
printf("usage: %s server-name\n", argv[0]);
return 1;
}
// Initialize Winsock
iResult = WSAStartup(MAKEWORD(2,2), &wsaData);
if (iResult != 0) {
printf("WSAStartup failed with error: %d\n", iResult);
return 1;
}
ZeroMemory( &hints, sizeof(hints) );
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP;
// Resolve the server address and port
iResult = getaddrinfo(argv[1], DEFAULT_PORT, &hints, &result);
if ( iResult != 0 ) {
printf("getaddrinfo failed with error: %d\n", iResult);
WSACleanup();
return 1;
}
// Attempt to connect to an address until one succeeds
for(ptr=result; ptr != NULL ;ptr=ptr->ai_next) {
// Create a SOCKET for connecting to server
ConnectSocket = socket(ptr->ai_family, ptr->ai_socktype,
ptr->ai_protocol);
if (ConnectSocket == INVALID_SOCKET) {
printf("socket failed with error: %ld\n", WSAGetLastError());
WSACleanup();
return 1;
}
/////////////////////////////////////////////////////////////////////////////
// Set the socket I/O mode: In this case FIONBIO
// enables or disables the blocking mode for the
// socket based on the numerical value of iMode.
// If iMode = 0, blocking is enabled;
// If iMode != 0, non-blocking mode is enabled.
iResult = ioctlsocket(ConnectSocket, FIONBIO, &iMode);
if (iResult != NO_ERROR)
printf("ioctlsocket failed with error: %ld\n", iResult);
/////////////////////////////////////////////////////////////////////////////
iResult = setsockopt(ConnectSocket, SOL_SOCKET, SO_RCVTIMEO, (const char*)&nTimeout, sizeof(DWORD));
if (iResult != NO_ERROR)
{
printf("\nSetsocopt fail with error :%d\n",WSAGetLastError());
return 0;
}
// Connect to server.
iResult = connect( ConnectSocket, ptr->ai_addr, (int)ptr->ai_addrlen);
if (iResult == SOCKET_ERROR) {
closesocket(ConnectSocket);
ConnectSocket = INVALID_SOCKET;
continue;
}
break;
}
freeaddrinfo(result);
if (ConnectSocket == INVALID_SOCKET) {
printf("Unable to connect to server!\n");
WSACleanup();
return 1;
}
DWORD FIComThreadId;
gui_ThreadHandle[1] = CreateThread(NULL,0, (LPTHREAD_START_ROUTINE)FIComThreadEntry,(LPVOID)ConnectSocket, 0, &FIComThreadId);
if(gui_ThreadHandle[1] == NULL)
{
printf("Error while creating FIComThreadEntry thread.\n");
printf("Leaving from FIComThreadEntry\n");
return 0;
}
while(1);
}
static DWORD WINAPI FIComThreadEntry(LPVOID lpdwThreadParam)
{
ThreadSocket=(SOCKET)lpdwThreadParam;
data[4]=0x0F;
//data[4]=0xF0;
data[5]=0x0D;
int i=0;
int j;
//while(1)
{
iResult = send( ThreadSocket, data, (int)strlen(data), 0 );
if (iResult == SOCKET_ERROR)
{
printf("send failed with error: %d\n", WSAGetLastError());
closesocket(ConnectSocket);
WSACleanup();
return 1;
}
printf("Bytes Sent: %ld\n", iResult);
int prev
Tarun Batra
17-Sep-12 5:40am
View
sir i send one request command to a machine and receive the response from the machine,the response should be 138 bytes but i am 276 bytes i get a response like this:-
Bytes received: 14
Bytes received: 14
Bytes received: 16
Bytes received: 16
Bytes received: 18
Bytes received: 18
Bytes received: 17
Bytes received: 17
Bytes received: 14
Bytes received: 14
Bytes received: 15
Bytes received: 15
Bytes received: 19
Bytes received: 19
Bytes received: 15
Bytes received: 15
Bytes received: 10
Bytes received: 10
this is the output of following statements:-
iResult = recv(ThreadSocket, recvbuf, recvbuflen, 0);
if ( iResult > 0 )
{ printf("Bytes received: %d\n", iResult);
}
Tarun Batra
17-Sep-12 5:28am
View
Sir i want to copy the data of recvbuf into the common buffer,actually as i am making the socket connection,according to my documentation i should receive 138 bytes but i am receiving 276 bytes that is double of 138 bytes.
To avoid extra 138 bytes i am using the following code
iResult = recv(ThreadSocket, recvbuf, recvbuflen, 0);
if ( iResult > 0 )
{
int prev=0;
//prev= iResult;
if(prev!=iResult)
{
for(j=0;j<=iResult;j++);
common[j] = recvbuf[j];
}
prev= iResult;
}
Tarun Batra
17-Sep-12 5:26am
View
my code is something like this:
iResult = recv(ThreadSocket, recvbuf, recvbuflen, 0);
if ( iResult > 0 )
{
int prev=0;
//prev= iResult;
if(prev!=iResult)
{
for(j=0;j<=iResult;j++);
common[j] = recvbuf[j];
}
prev= iResult;
}
Tarun Batra
17-Sep-12 5:26am
View
Sir i want to copy the data of recvbuf into the common buffer,actually as i am making the socket connection,according to my documentation i should receive 138 bytes but i am receiving 276 bytes that is double of 138 bytes.
Tarun Batra
14-Sep-12 13:54pm
View
sir please tell this http://www.codeproject.com/Questions/459502/Please-tell-how-to-make-event-level-socket-program
Tarun Batra
14-Sep-12 13:54pm
View
sir please tell the solution of this http://www.codeproject.com/Questions/459502/Please-tell-how-to-make-event-level-socket-program
Tarun Batra
14-Sep-12 7:15am
View
check mail
Tarun Batra
14-Sep-12 4:27am
View
got the mail
Tarun Batra
14-Sep-12 4:17am
View
sir u can mail me our email address on trn200190@gmail.com
That would be a great help from your side,when mailed post a reply here.Your mail id will not be revealed.Is it ok?
Tarun Batra
14-Sep-12 3:58am
View
Can i have the mail id on which i should send the pdf?
Tarun Batra
14-Sep-12 3:52am
View
No sir i have written the info i have regarding data,should i send u the pdf that i have?I would be a great help if u look at it
Tarun Batra
14-Sep-12 2:00am
View
Ya sir it is 0x0F i did that but still not getting any response,can u tell that according to following statement "Finish of format is CR (Hexadecimal: OD)" data byte should be data[5]=0x0D;Is it correct?
Tarun Batra
14-Sep-12 1:55am
View
Can u tell how to convert it into 8bit field?
Tarun Batra
13-Sep-12 11:27am
View
check the following link http://msdn.microsoft.com/en-us/library/windows/desktop/ms737889(v=vs.85).aspx my code is same as client code,there i am recv data from server
Tarun Batra
13-Sep-12 11:17am
View
sorry for data[4]=0xF0; actually it is data[4]=0x0F;,sir if device respond i have a recv call which is as shown
iResult = send( ConnectSocket, data, (int)strlen(data), 0 );
if (iResult == SOCKET_ERROR) {
printf("send failed with error: %d\n", WSAGetLastError());
closesocket(ConnectSocket);
WSACleanup();
return 1;
}
printf("Bytes Sent: %ld\n", iResult);
// shutdown the connection since no more data will be sent
iResult = shutdown(ConnectSocket, SD_SEND);
if (iResult == SOCKET_ERROR) {
printf("shutdown failed with error: %d\n", WSAGetLastError());
closesocket(ConnectSocket);
WSACleanup();
return 1;
}
// Receive until the peer closes the connection
do {
iResult = recv(ConnectSocket, recvbuf, recvbuflen, 0);
if ( iResult > 0 )
printf("Bytes received: %d\n", iResult);
else if ( iResult == 0 )
printf("Connection closed\n");
else
printf("recv failed with error: %d\n", WSAGetLastError());
} while( iResult >= 0 );
i didn't get any response i get following get printed "Connection closed"
Tarun Batra
13-Sep-12 10:50am
View
Sir i did like this have a look:-
char data[6]="CM00";
data[4]=0xF0;
data[5]=0x0D;
iResult = send( ConnectSocket, data, (int)strlen(data), 0 );
if (iResult == SOCKET_ERROR) {
printf("send failed with error: %d\n", WSAGetLastError());
closesocket(ConnectSocket);
WSACleanup();
return 1;
}
printf("Bytes Sent: %ld\n", iResult);
i get a display bytes sent 6
but still not getting the response please help
Tarun Batra
13-Sep-12 5:50am
View
I was trying to calculate the acc to this http://tools.ietf.org/rfc/rfc1071.txt,as if u have any code for standard check sum please give as i have to try many check sum algo.
Tarun Batra
13-Sep-12 5:32am
View
char data[6]="CM00";check2=calc_check(hh);int calc_check(int w)
{word32 i; har buff[4];
for (i=0; i<4; i++)
{
buff[i]=data[i];
}
char check11=0;
check11 = checksum(buff, 4);return check11;
}word16 checksum(char *addr, word32 count)
{
register word32 sum = 0;
char sum1=0;
word16 * waddr = reinterpret_cast<word16*>(addr);while(count > 1)
{sum1 = sum1 + *waddr++;count = count - 2;
}if (count > 0)
sum1= sum1 + *((byte *) addr);while (sum1>>24)
sum1 = (sum1 & 0xFFFF) + (sum1 >> 24);
printf("size of sum1 is %d\n",sizeof(sum1));
return(~sum1);}data[4]= check2;data[5]=FORMAT_TERMINATOR Please check now and tell me the changes
Tarun Batra
13-Sep-12 4:20am
View
sir i wanna show u my code,can i have your mail id or should i display here?And what about
"Finish of format is CR (Hexadecimal: OD)" would u say am i doing correct?
Tarun Batra
13-Sep-12 3:50am
View
Ya sir you are correct,just tell me please that in this statement "check = checksum(data, BUFFER_LEN);" in check variable i will be getting the checksum value and as u can see i have data part as "char data[6]="CM00";" so is it correct data[4]= check; and acc to statement Finish of format is CR (Hexadecimal: OD) i am doing "data[5]=0x0D;",,,are these both correct?
Tarun Batra
13-Sep-12 3:37am
View
yes air iyou are correct i should comment this part -for (i=0; i<4; i++)
{
//buff[i] = (byte) rand();
data[i]=(byte) rand();} and sir can u tell me one more thing?
Tarun Batra
13-Sep-12 2:09am
View
sir as u can see in the above packet format the check sum field is one bit,and i have done data[4]= check1; so is it correct?
Tarun Batra
13-Sep-12 2:05am
View
sir to avoid the loop to overwrite the data I loaded before I called it,i should do something like this:-for (i=0; i<4; i++)
{
//buff[i] = (byte) rand();
data[i]=(byte) rand();
} and then i should do data[4]= check1;
data[5]=0x0D; as i have the following statement "Calculate sum total from top till before check sum then recognize this
complement of 1 as check sum. Now am i correct?
Tarun Batra
12-Sep-12 11:22am
View
please look at this http://www.codeproject.com/Questions/457990/Please-is-this-correct-formation
Tarun Batra
12-Sep-12 11:15am
View
please look at this http://www.codeproject.com/Questions/457990/Please-is-this-correct-formation
Tarun Batra
12-Sep-12 11:15am
View
Please look at this http://www.codeproject.com/Questions/457990/Please-is-this-correct-formation
Tarun Batra
12-Sep-12 10:46am
View
That works for me but i have a problem
Tarun Batra
12-Sep-12 10:29am
View
please have a look at this http://www.codeproject.com/Questions/457875/code-i-correct-why-am-i-getting-plusplus-needs-l-v and please answer it
Tarun Batra
12-Sep-12 10:27am
View
i did word16 * waddr = reinterpret_cast(addr); it says expected a "<" i did this word16 * waddr = reinterpret_cast; it says expected "(".
Tarun Batra
12-Sep-12 10:27am
View
same error
Tarun Batra
12-Sep-12 10:17am
View
Deleted
i did word16 * waddr = reinterpret_cast(addr); it says expected a "<" i did this word16 * waddr = reinterpret_cast<addr>; it says expected "(".
Plz also reply to http://www.codeproject.com/Questions/457945/Please-tell-the-LNK2019-error-solution
Tarun Batra
12-Sep-12 10:14am
View
Deleted
same error,please also tell the problem defined on this http://www.codeproject.com/Questions/457945/Please-tell-the-LNK2019-error-solution
Tarun Batra
12-Sep-12 10:14am
View
Deleted
can u have a look at this problem http://www.codeproject.com/Questions/457945/Please-tell-the-LNK2019-error-solution
Tarun Batra
12-Sep-12 9:08am
View
sir if i compile the file as a.c then i am not not getting this error,but i am getting the error on "extern" variable.Does extern variable work in c ?
Tarun Batra
12-Sep-12 8:47am
View
can u tell how to increment as a seperate statement.
Tarun Batra
12-Sep-12 8:06am
View
I have one pdf in which sending data to a dialysis machine is defined but not defined how to calculate check sum and a;so i am not getting any data from machine.Can u send em your mail id i will send the pdf to you
Tarun Batra
12-Sep-12 7:55am
View
Sir can u help me one more thing
Tarun Batra
12-Sep-12 6:08am
View
Really thanks for the link sir
Tarun Batra
12-Sep-12 6:08am
View
Really thanks for the link sir
Tarun Batra
12-Sep-12 4:35am
View
Will read ioctlsocket() thanks for the suggesstion
Tarun Batra
12-Sep-12 4:30am
View
So according to your solution i have to use select() call after connect() call and before recv() call.Is there any Flag to set the socket in Non Blocking Mode?
Tarun Batra
12-Sep-12 4:21am
View
Thanks for the reply sir,can u share your class if u have no problem regarding sharing
Tarun Batra
11-Sep-12 7:49am
View
Do i have to change anything in my code?
Tarun Batra
11-Sep-12 2:19am
View
It says command not found.Sir actually i wanna to find out the exact location of file which the application is accessing,with lsof i can see a application many files,how to find the exact file location
Tarun Batra
10-Sep-12 10:55am
View
sir your code work correctly but shows garbage value in first two lines :C:\NEWlsof1.txt has 1612 lines.
CMD: COMMAND PID: -858993460
CMD: COMMAND PID: -858993460
CMD: init PID: 1
CMD: init PID: 1
How to remove these?
Tarun Batra
7-Sep-12 9:46am
View
Sir can u explain by pseudo code the 4 step u mentioned
Tarun Batra
7-Sep-12 9:45am
View
Sorry will take care of that
Tarun Batra
7-Sep-12 9:39am
View
plz have a look at the following link http://www.codeproject.com/Questions/455112/How-to-parse-the-following-file
Tarun Batra
7-Sep-12 9:39am
View
plz have a look at the following link http://www.codeproject.com/Questions/455112/How-to-parse-the-following-file
Tarun Batra
7-Sep-12 9:38am
View
i don't think so,can u explain in detail
Tarun Batra
3-Sep-12 2:34am
View
Sir please check the solution
Tarun Batra
31-Aug-12 9:35am
View
Sir can we discuss some other problem that is related to a packet coming to com port and parsing that data?
Tarun Batra
31-Aug-12 8:47am
View
Sir i had made some code for my some other problem thats in C and its packet parsing can u help me in that?
Tarun Batra
31-Aug-12 8:47am
View
Sir i had made some code for my some other problem thats in C and its packet parsing can u help me in that?
Tarun Batra
31-Aug-12 8:38am
View
sir i did some what work can we discus?
Tarun Batra
30-Aug-12 17:35pm
View
thanks for teaching so much...
Tarun Batra
30-Aug-12 17:35pm
View
ok sir will look at it and ask u again if i want to know anything...thanks for teaching so much...
Tarun Batra
30-Aug-12 17:23pm
View
sir see the solution 3,i did somewhat but on this"std::vector NumberArray;" i am getting an error saying argument list for class template "std::vector"is missing whats that?
Tarun Batra
30-Aug-12 17:17pm
View
sir see the solution 3,i did somewhat but on this"std::vector NumberArray;" i am getting an error saying argument list for class template "std::vector"is missing whats that?
Tarun Batra
30-Aug-12 16:52pm
View
thats true that i should start moving to a function that returns an array,can u just tell me one thing if i use std::vector what will be the value of of "myint" variable in my case,should i have to give input to the "myint" variable?
Tarun Batra
30-Aug-12 16:43pm
View
sir what will be the value of "myint"then...
Tarun Batra
30-Aug-12 16:38pm
View
i have saved it as .c file sir now check my solution i have edited,can u please tell if it supported c++ then as Enhzflep said to see the following link http://www.cplusplus.com/reference/stl/vector/push_back/ what should be the value of "myint" here and can u give a link to "realloc to create a new array" or show by code...
Tarun Batra
30-Aug-12 16:30pm
View
sir in my native code when i included the "#include <iostream>"it says error: iostream: No such file or directory
Tarun Batra
30-Aug-12 16:23pm
View
sir i have written some solution can u check that and please explain the realloc concept(if possible by pseudo code).
Tarun Batra
30-Aug-12 16:17pm
View
sir i have written some solution can u check that and please explain the realloc concept(if possible by pseudo code).
Tarun Batra
30-Aug-12 16:10pm
View
sir i have written some solution can u check that and please explain the realloc concept(if possible by pseudo code).
Tarun Batra
30-Aug-12 16:03pm
View
i can't use c++,i have to do it in C actually in am working in linux(android ndk).
Tarun Batra
30-Aug-12 16:03pm
View
i can't use c++,i have to do it in C actually in am working in linux(android ndk).
Tarun Batra
30-Aug-12 15:58pm
View
i can't use c++
Tarun Batra
30-Aug-12 15:49pm
View
ya how to put them into array as sometimes i have 16 entries in the files sometimes its around 40 and want to return the array
Tarun Batra
30-Aug-12 15:48pm
View
ya how to put them into array as sometimes i have 16 entries in the files sometimes its around 40 and want to return the array
Tarun Batra
30-Aug-12 15:40pm
View
Hello sir just tell me one more thing that if i want to return all integers that will come in " int Number" at one instant then how should i do
Tarun Batra
30-Aug-12 15:40pm
View
Hello sir just tell me one more thing that if i want to return all integers that will come in " int Number" at one instant then how should i do
Tarun Batra
30-Aug-12 15:10pm
View
ohk now got your point
Tarun Batra
30-Aug-12 15:00pm
View
Sir can u provide a sample code
Tarun Batra
30-Aug-12 15:00pm
View
Deleted
Sir can u provide a sample code
Tarun Batra
30-Aug-12 14:00pm
View
Sir whats the error in my C code i am also doing the same thing why i am getting no such file or directory?
Show More