|
please refer l-value[^]
writecard(BLCK,strData) = retcode; will not evalutes to assignment expression.
join Book-Buying Band[^]
this time,
long CACR120RWBLOCK1Dlg::writecard(BYTE BLCK, CString strData)
{
int ctr;
int x;
long retcode = -1;
....
retcode = ACR120_Write(rHandle, BLCK, dout[0]);
return retcode;
}
void CACR120RWBLOCK1Dlg::OnWrite()
{
....
long retcode = writecard(BLCK,m_MemId);
if(retcode >= 0)
{
}
else
{
messagebox();
}
}
savitri wrote: i am girl not guy ok..
I think most of us wont bother.
|
|
|
|
|
Rajkumar R wrote: join Book-Buying Band[^]
You still remember!
Maxwell Chen
|
|
|
|
|
How possibly can you forget savitri and her dire posts?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: How possibly can you forget savitri and her dire posts?
Maxwell Chen
|
|
|
|
|
especially the experience of déjà vu
|
|
|
|
|
if(retcode >=0)
{
writecard(BLCK,m_Date);
}
else
{
MessageBox("Error in writing exp date");
}
now i am not able to write the data into the card run time error is coming. my full code is like this:
long CACR120RWBLOCK1Dlg::writecard(BYTE BLCK, CString strData)
{
int ctr;
int x;
//writecard(BLCK,strData) = -1;
retcode=-1;
BYTE dout[15];
for (ctr=0;ctr<=15;ctr++)
{
dout[ctr]=atoi("");
}
x=strlen(strData);
for(ctr=0;ctr<=x-1;ctr++)
{
dout[ctr]=strData[ctr+1];
}
retcode = ACR120_Write(rHandle, BLCK, dout[0]);
StrMsg.Format("Retcode:%d",retcode);
LstIndx=m_List.AddString(StrMsg);
//writecard(BLCK,strData) =retcode;
return retcode;
}
and my write function is like this:
void CACR120RWBLOCK1Dlg::OnWrite()
{
// TODO: Add your control notification handler code here
BYTE BLCK;
BYTE ResultSN[11];
BYTE TagType[50];
BYTE ResultTag;
char SN[100];
int ctr;
int x;
//writecard()
BYTE dout[15];
//int ctr;
//VerifyKeyA(2);
retcode = ACR120_Select(rHandle, TagType, &ResultTag, ResultSN);
StrMsg.Format("retcode:%d",retcode);
LstIndx=m_List.AddString(StrMsg);
//'Check if Retcode is Error
if (retcode < 0)
{
//MessageBox("Error in select");
StrMsg.Format("Error Select: %d", retcode);
LstIndx = m_List.AddString(StrMsg);
}
else
{
//VerifyKeyA(2);
StrMsg.Format("Select Card Success: %d", retcode);
LstIndx=m_List.AddString(StrMsg);
sprintf(SN,"%s","");
if ((TagType[0] == 4) || (TagType[0] == 5))
{
memcpy(SN,ResultSN, 7);
StrMsg.Format("Card Serial: %02x %02x %02x %02x %02x %02x %02x ",ResultSN[0],ResultSN[1],ResultSN[2],ResultSN[3],ResultSN[4],ResultSN[5],ResultSN[6] );
}
else
memcpy(SN,ResultSN, ResultTag);
if (ResultTag == 4)
StrMsg.Format("Card Serial: %02x %02x %02x %02x ",ResultSN[0],ResultSN[1],ResultSN[2],ResultSN[3] );
else if (ResultTag == 7)
StrMsg.Format("Card Serial: %02x %02x %02x %02x %02x %02x %02x ",ResultSN[0],ResultSN[1],ResultSN[2],ResultSN[3],ResultSN[4],ResultSN[5],ResultSN[6] );
else if (ResultTag == 10)
StrMsg.Format("Card Serial: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x ",ResultSN[0],ResultSN[1],ResultSN[2],ResultSN[3],ResultSN[4],ResultSN[5],ResultSN[6],ResultSN[7],ResultSN[8],ResultSN[9] );
//m_Sno.FormatMessage(SN);
//StrMsg.Format("SN:%s",SN);
m_List.AddString(StrMsg);
}
m_List.SetCurSel(LstIndx);
pKey[0]= 255;
pKey[1]= 255;
pKey[2]= 255;
pKey[3]= 255;
pKey[4]= 255;
pKey[5]= 255;
sec=2;
//Login Command Function
retcode = ACR120_Login(rHandle, sec, 0xAA, 0, pKey);
StrMsg.Format("retcode: %d", retcode);
LstIndx=m_List.AddString(StrMsg);
//'check if retcode is error
if (retcode < 0)
{
StrMsg.Format("Error Login: %d", retcode);
LstIndx=m_List.AddString(StrMsg);
//m_cSNO=StrMsg;
//LstIndx = strlen(m_cSNO);
}
else
{
MessageBox("Login Success:");
//m_SNO=StrMsg;
//m_SNO="Log at Sector: 1";
//LstIndx = strlen(m_SNO);
m_ReadBlk.EnableWindow(true);
m_WriteBlk.EnableWindow(true);
//Result=true;;
}
BLCK =0;
sec = 2;
BLCK = sec * 4 + BLCK;
//retcode = ACR120_Write(rHandle, BLCK, dout[0]);
retcode=writecard(BLCK,m_MemId);
if(retcode >= 0)
{
//writecard(BLCK,m_MemId);
}
else
{
MessageBox("Error in writing");
}
BLCK =1;
sec=2;
BLCK=sec*4+BLCK;
retcode=writecard(BLCK,m_Memname);
if(retcode>=0)
{
//writecard(BLCK,m_Memname);
}
else
{
MessageBox("Error in writing name of Employee");
}
BLCK=2;
sec=2;
BLCK=sec*4+BLCK;
retcode=writecard(BLCK,m_Date);
if(retcode>=0)
{
//writecard(BLCK,m_Date);
}
else
{
MessageBox("Error in writing exp date");
}
//VerifyKeyA(3) ;
pKey[0]= 255;
pKey[1]= 255;
pKey[2]= 255;
pKey[3]= 255;
pKey[4]= 255;
pKey[5]= 255;
sec=3;
//Login Command Function
retcode = ACR120_Login(rHandle, sec, 0xAA, 0, pKey);
StrMsg.Format("retcode: %d", retcode);
LstIndx=m_List.AddString(StrMsg);
//'check if retcode is error
if (retcode < 0)
{
StrMsg.Format("Error Login: %d", retcode);
LstIndx=m_List.AddString(StrMsg);
//m_cSNO=StrMsg;
//LstIndx = strlen(m_cSNO);
}
else
{
MessageBox("Login Success:");
//m_SNO=StrMsg;
//m_SNO="Log at Sector: 1";
//LstIndx = strlen(m_SNO);
m_ReadBlk.EnableWindow(true);
m_WriteBlk.EnableWindow(true);
//Result=true;;
}
BLCK=0;
sec=3;
BLCK=sec*4+BLCK;
retcode=writecard(BLCK,m_Balance);
if (retcode>=0)
{
//writecard(BLCK,m_Balance);
}
else
{
MessageBox("Error in writing balance");
}
}
my retcode and rhandle value is of type integer.
please help me.
thanku,
savitri
|
|
|
|
|
F*CK !!!
did you read my answer ??????
edit you message and place you code samples within <pre></pre> html tags !
and read the posting guidelines too; especially the one saying that you should post relevant pieces of code, not a whole huge code file
come on, grow up a little
|
|
|
|
|
it is not java code so it is in c++. i am learning VC++. so how shall i use
and ,
.please help me out.
thanku for answering to my q's,
savitri
|
|
|
|
|
savitri wrote: it is not java code so it is in c++.
then ? I don't understand in what my remark is related to Java !?
savitri wrote: i am learning VC++.
yes, i've figured that out for days now.
savitri wrote: so how shall i use
yes, exactly, but use <pre> to place code samples only.
and don't post your whole program code.
ask for a specific question with a small code example to illustrate your issue.
|
|
|
|
|
toxcct wrote: I don't understand in what my remark is related to Java !?
May be this one?
toxcct wrote: F*CK !!!
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: May be this one?
toxcct wrote:
F*CK !!!
That is indeed a Java keyword
codito ergo sum
|
|
|
|
|
Why did you have to post this much of code? If you keep repeating your mistakes, people will start to ignore you and then you may have no option but to buy a book. (No more free help? OMG!)
Please only post the piece of code that is relevant to your query.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
hey, asking codeproject is not an alternative to buying a book !
she should really buy one and learn from there...
|
|
|
|
|
That was a sarcastic note, from my side.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
savitri wrote: rajesh is right i am girl not guy
Rajesh also asked you to buy this[^]
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
What is the equivalent function for 'ln' in math.h?
|
|
|
|
|
log
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Which one to use for 'ln'.
|
|
|
|
|
re read my post, try to understand what I said and you will find.
ln stands for Neperian Logarithm (or Natural Logarithm)...
|
|
|
|
|
See here.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|