Click here to Skip to main content
15,559,732 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionGetPrinter function fails to retrieves the printer information. [modified] Pin
Gokul_md13-Oct-08 23:02
Gokul_md13-Oct-08 23:02 
QuestionRe: GetPrinter function fails to retrieves the printer information. Pin
CPallini14-Oct-08 0:03
mveCPallini14-Oct-08 0:03 
AnswerRe: GetPrinter function fails to retrieves the printer information. Pin
Gokul_md14-Oct-08 0:51
Gokul_md14-Oct-08 0:51 
QuestionRe: GetPrinter function fails to retrieves the printer information. Pin
CPallini14-Oct-08 2:00
mveCPallini14-Oct-08 2:00 
AnswerRe: GetPrinter function fails to retrieves the printer information. Pin
David Crow14-Oct-08 4:47
David Crow14-Oct-08 4:47 
GeneralRe: GetPrinter function fails to retrieves the printer information. Pin
Gokul_md14-Oct-08 7:55
Gokul_md14-Oct-08 7:55 
QuestionRe: GetPrinter function fails to retrieves the printer information. Pin
David Crow14-Oct-08 8:42
David Crow14-Oct-08 8:42 
AnswerRe: GetPrinter function fails to retrieves the printer information. Pin
Gokul_md14-Oct-08 20:17
Gokul_md14-Oct-08 20:17 
i have formated the message using the below method.

LPVOID lpMsgBuf;
FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | RMAT_MESSAGE_FROM_SYSTEM,
NULL, dwError, MAKELANGID(LANG_NEUTRAL, LANG_DEFAULT),
(LPTSTR) &lpMsgBuf, 0,NULL );
CString strMessage = (LPTSTR)lpMsgBuf;

The error message is printed in the log file.

FILE *fp = fopen("C:\\log.txt","a+");
fprintf(fp,"\n Error Occured - %s ", strMessage );
fclose(fp);

in that log file it printer as

Error Occured -
QuestionRe: GetPrinter function fails to retrieves the printer information. Pin
David Crow15-Oct-08 4:18
David Crow15-Oct-08 4:18 
QuestionVisual c++ runtime error in dotnet Pin
balu1234513-Oct-08 22:43
balu1234513-Oct-08 22:43 
AnswerRe: Visual c++ runtime error in dotnet Pin
CPallini13-Oct-08 23:37
mveCPallini13-Oct-08 23:37 
GeneralRe: Visual c++ runtime error in dotnet Pin
balu1234514-Oct-08 7:47
balu1234514-Oct-08 7:47 
GeneralRe: Visual c++ runtime error in dotnet Pin
Hamid_RT14-Oct-08 9:26
Hamid_RT14-Oct-08 9:26 
Questionplease guide content structural file SCS. Spoolfile in Iseries system. thanks Pin
aa_zz13-Oct-08 22:12
aa_zz13-Oct-08 22:12 
QuestionHow interact a digital ink pad when it connected to a pc Pin
tanmay.kol13-Oct-08 21:52
tanmay.kol13-Oct-08 21:52 
QuestionEdit Registry values Pin
MsmVc13-Oct-08 21:43
MsmVc13-Oct-08 21:43 
AnswerRe: Edit Registry values Pin
MsmVc13-Oct-08 21:59
MsmVc13-Oct-08 21:59 
GeneralRe: Edit Registry values Pin
Hamid_RT13-Oct-08 22:17
Hamid_RT13-Oct-08 22:17 
GeneralRe: Edit Registry values Pin
Rajesh R Subramanian13-Oct-08 22:18
professionalRajesh R Subramanian13-Oct-08 22:18 
GeneralRe: Edit Registry values Pin
MsmVc13-Oct-08 22:55
MsmVc13-Oct-08 22:55 
GeneralRe: Edit Registry values Pin
CPallini14-Oct-08 2:38
mveCPallini14-Oct-08 2:38 
GeneralRe: Edit Registry values Pin
Rajesh R Subramanian14-Oct-08 3:49
professionalRajesh R Subramanian14-Oct-08 3:49 
GeneralRe: Edit Registry values Pin
Roger Stoltz14-Oct-08 4:01
Roger Stoltz14-Oct-08 4:01 
GeneralRe: Edit Registry values Pin
Rajesh R Subramanian14-Oct-08 4:25
professionalRajesh R Subramanian14-Oct-08 4:25 
Questionmemory allocation for class object Pin
manjunath k reddy13-Oct-08 21:33
manjunath k reddy13-Oct-08 21:33 

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.