Click here to Skip to main content
15,899,026 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: SDI Application Pin
basementman1-Sep-09 4:27
basementman1-Sep-09 4:27 
Questionhow to use external function in a dll from c Pin
mohant$.net31-Aug-09 2:13
mohant$.net31-Aug-09 2:13 
QuestionRe: how to use external function in a dll from c Pin
David Crow31-Aug-09 2:45
David Crow31-Aug-09 2:45 
AnswerRe: how to use external function in a dll from c Pin
mohant$.net31-Aug-09 2:54
mohant$.net31-Aug-09 2:54 
QuestionRe: how to use external function in a dll from c Pin
David Crow31-Aug-09 3:26
David Crow31-Aug-09 3:26 
AnswerRe: how to use external function in a dll from c Pin
mohant$.net31-Aug-09 3:33
mohant$.net31-Aug-09 3:33 
AnswerRe: how to use external function in a dll from c Pin
Joe Woodbury31-Aug-09 9:26
professionalJoe Woodbury31-Aug-09 9:26 
QuestionSCardTransmit Returns 0x0000000e. Pin
deepakect31-Aug-09 0:34
deepakect31-Aug-09 0:34 
Hello,

i'm working on PC/SC smart card. i'm using microsoft's winscard.dll for smart card interaction. while sending a full 256 byte using SCardTransmit it is returning 0x0000000e (not enough memory). I tried to allocate memory by manually using malloc but still it's failing. Here is my code.

unsigned char photo_buff[21000];
div_t div_result;
char quo[2],rem[2];
photo_buff[0]=0xF5;
DWORD lReturn;
DWORD dwRecv;
DWORD last_block;
int size;
size=Convert_to_Hex((unsigned char *)photofinger_size_char,4);
photo_buff[1]=Hex_OP[0];
photo_buff[2]=Hex_OP[1];

last_block=(photofinger_size+3)/255;


memcpy(photo_buff+3,image,photofinger_size);
for(i=0;i<photofinger_size+3;i=i+255)
{
ZeroMemory(CmdBytes.bdata,sizeof(CmdBytes.bdata));
/*CmdBytes.bIns=0xD0;
CmdBytes.bCla=0x00;*/
send_buff_new[0]=0x00;
send_buff_new[1]=0xD0;
div_result=div(i,256);
itoa(div_result.quot,(char *)quo,16);

if(div_result.quot<16)
{
quo[1]=quo [0];
quo[0]=0x00;
}
Convert_to_Hex((unsigned char *)quo,2);
CmdBytes.bP1=Hex_OP[0];
itoa(div_result.rem,(char *)rem,16);
Convert_to_Hex((unsigned char *)rem,2);
CmdBytes.bP2=Hex_OP[0];
CmdBytes.bP3=0xFF;
memcpy(CmdBytes.bdata,photo_buff+i,255);
lReturn = SCardTransmit(hCardHandle,
SCARD_PCI_T0,
(PUCHAR)&CmdBytes,
256+5,
NULL,
pbRecv,
&dwRecv ); //lReturn returns 0x0000000e
}

return 1;
}

If anybody came across this problem please help me.


-----
deepakect
QuestionInheriting Struct Pin
kumar sanghvi31-Aug-09 0:34
kumar sanghvi31-Aug-09 0:34 
AnswerRe: Inheriting Struct Pin
Rajesh R Subramanian31-Aug-09 0:42
professionalRajesh R Subramanian31-Aug-09 0:42 
AnswerRe: Inheriting Struct Pin
Richard MacCutchan31-Aug-09 3:32
mveRichard MacCutchan31-Aug-09 3:32 
QuestionProblem with Visual studio 2008 feature pack's CMFCToolBar - not being displayed Pin
Sternocera30-Aug-09 23:53
Sternocera30-Aug-09 23:53 
AnswerRe: Problem with Visual studio 2008 feature pack's CMFCToolBar - not being displayed Pin
Prasann Mayekar31-Aug-09 2:37
Prasann Mayekar31-Aug-09 2:37 
QuestionShadow Pin
thanhvinh090630-Aug-09 23:36
thanhvinh090630-Aug-09 23:36 
AnswerRe: Shadow Pin
Cedric Moonen30-Aug-09 23:45
Cedric Moonen30-Aug-09 23:45 
GeneralRe: Shadow Pin
thanhvinh090631-Aug-09 2:41
thanhvinh090631-Aug-09 2:41 
AnswerRe: Shadow Pin
Nuri Ismail31-Aug-09 3:28
Nuri Ismail31-Aug-09 3:28 
GeneralRe: Shadow Pin
thanhvinh090631-Aug-09 5:40
thanhvinh090631-Aug-09 5:40 
AnswerRe: Shadow Pin
Nuri Ismail31-Aug-09 6:04
Nuri Ismail31-Aug-09 6:04 
QuestionSelectClipRgn Pin
thanhvinh090630-Aug-09 23:29
thanhvinh090630-Aug-09 23:29 
AnswerRe: SelectClipRgn Pin
Cedric Moonen30-Aug-09 23:43
Cedric Moonen30-Aug-09 23:43 
AnswerRe: SelectClipRgn Pin
thanhvinh090631-Aug-09 2:29
thanhvinh090631-Aug-09 2:29 
Questionwhich module created a specific file? Pin
Joseph Marzbani30-Aug-09 22:36
Joseph Marzbani30-Aug-09 22:36 
AnswerRe: which module created a specific file? Pin
Adam Roderick J30-Aug-09 23:15
Adam Roderick J30-Aug-09 23:15 
AnswerRe: which module created a specific file? Pin
Rajesh R Subramanian30-Aug-09 23:32
professionalRajesh R Subramanian30-Aug-09 23:32 

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.