Click here to Skip to main content
15,911,141 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC System Information Pin
charu12311-Apr-05 3:53
charu12311-Apr-05 3:53 
GeneralRe: MFC System Information Pin
ThatsAlok8-Apr-05 18:25
ThatsAlok8-Apr-05 18:25 
GeneralRe: MFC System Information Pin
David Crow8-Apr-05 5:07
David Crow8-Apr-05 5:07 
GeneralRe: MFC System Information Pin
charu12311-Apr-05 0:07
charu12311-Apr-05 0:07 
GeneralRe: MFC System Information Pin
David Crow11-Apr-05 2:28
David Crow11-Apr-05 2:28 
GeneralRe: MFC System Information Pin
charu12311-Apr-05 0:47
charu12311-Apr-05 0:47 
GeneralRe: MFC System Information Pin
David Crow11-Apr-05 2:42
David Crow11-Apr-05 2:42 
GeneralRe: MFC System Information Pin
charu12311-Apr-05 17:42
charu12311-Apr-05 17:42 
I am getting an error sayin

The data area passed to a system call is too small.
theSIZE i have declared is 5000.

please tell m ewhr i am going wrong in this code snippet.

char DevName[100];

sprintf(DevName,"%s",(LPCTSTR)dlg.GetDeviceName());
HANDLE phPrinter=NULL;
DWORD dwBytesNeeded;
PRINTER_INFO_2 *pst;
BYTE pPrinter;
DWORD sizeReq=SIZE;
OpenPrinter(DevName,&phPrinter,NULL);

GetPrinter(phPrinter, 2, &pPrinter, sizeReq, &dwBytesNeeded);
pst=(PRINTER_INFO_2 *)malloc(dwBytesNeeded);
char j[SIZE];
sprintf(j,"%l",pst->AveragePPM);


U get wht u Give
GeneralRe: MFC System Information Pin
charu12312-Apr-05 0:42
charu12312-Apr-05 0:42 
GeneralRe: MFC System Information Pin
David Crow12-Apr-05 2:53
David Crow12-Apr-05 2:53 
GeneralExceptions Pin
Monty27-Apr-05 20:08
Monty27-Apr-05 20:08 
GeneralRe: Exceptions Pin
Michael Dunn7-Apr-05 20:32
sitebuilderMichael Dunn7-Apr-05 20:32 
GeneralRe: Exceptions Pin
Monty27-Apr-05 20:47
Monty27-Apr-05 20:47 
GeneralRe: Exceptions Pin
Cedric Moonen7-Apr-05 22:42
Cedric Moonen7-Apr-05 22:42 
GeneralRe: Exceptions Pin
toxcct8-Apr-05 0:32
toxcct8-Apr-05 0:32 
GeneralRe: Exceptions Pin
Cedric Moonen8-Apr-05 0:45
Cedric Moonen8-Apr-05 0:45 
GeneralRe: Exceptions Pin
Kevin McFarlane7-Apr-05 23:28
Kevin McFarlane7-Apr-05 23:28 
GeneralRe: Exceptions Pin
Tim Smith8-Apr-05 4:24
Tim Smith8-Apr-05 4:24 
GeneralRe: Exceptions Pin
Kevin McFarlane8-Apr-05 8:00
Kevin McFarlane8-Apr-05 8:00 
QuestionHow to write a COM object with VC6, which can be refered in C# .NET prj? Pin
wangdave7-Apr-05 19:38
wangdave7-Apr-05 19:38 
AnswerRe: How to write a COM object with VC6, which can be refered in C# .NET prj? Pin
ThatsAlok7-Apr-05 20:02
ThatsAlok7-Apr-05 20:02 
GeneralRe: How to write a COM object with VC6, which can be refered in C# .NET prj? Pin
Anonymous20-Apr-05 15:33
Anonymous20-Apr-05 15:33 
Generalmanifest for win 2000 Pin
V.G7-Apr-05 19:26
V.G7-Apr-05 19:26 
GeneralRe: manifest for win 2000 Pin
ThatsAlok7-Apr-05 19:57
ThatsAlok7-Apr-05 19:57 
GeneralRe: manifest for win 2000 Pin
Michael Dunn7-Apr-05 20:20
sitebuilderMichael Dunn7-Apr-05 20:20 

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.