Click here to Skip to main content
15,905,874 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: error LNK 2001 in visual C++ 6.0 Pin
sindhumahe30-Mar-10 23:15
sindhumahe30-Mar-10 23:15 
QuestionRe: error LNK 2001 in visual C++ 6.0 Pin
David Crow30-Mar-10 2:47
David Crow30-Mar-10 2:47 
AnswerRe: error LNK 2001 in visual C++ 6.0 Pin
sindhumahe30-Mar-10 2:57
sindhumahe30-Mar-10 2:57 
QuestionRe: error LNK 2001 in visual C++ 6.0 Pin
David Crow30-Mar-10 3:44
David Crow30-Mar-10 3:44 
AnswerRe: error LNK 2001 in visual C++ 6.0 Pin
sindhumahe30-Mar-10 3:48
sindhumahe30-Mar-10 3:48 
GeneralRe: error LNK 2001 in visual C++ 6.0 Pin
David Crow30-Mar-10 3:57
David Crow30-Mar-10 3:57 
GeneralRe: error LNK 2001 in visual C++ 6.0 Pin
sindhumahe30-Mar-10 20:10
sindhumahe30-Mar-10 20:10 
QuestionRe: error LNK 2001 in visual C++ 6.0 Pin
David Crow31-Mar-10 2:17
David Crow31-Mar-10 2:17 
AnswerRe: error LNK 2001 in visual C++ 6.0 Pin
sindhumahe31-Mar-10 18:14
sindhumahe31-Mar-10 18:14 
GeneralRe: error LNK 2001 in visual C++ 6.0 Pin
sindhumahe30-Mar-10 23:15
sindhumahe30-Mar-10 23:15 
GeneralRe: error LNK 2001 in visual C++ 6.0 Pin
David Crow1-Apr-10 2:51
David Crow1-Apr-10 2:51 
GeneralRe: error LNK 2001 in visual C++ 6.0 Pin
sindhumahe30-Mar-10 2:54
sindhumahe30-Mar-10 2:54 
GeneralRe: error LNK 2001 in visual C++ 6.0 Pin
David Crow1-Apr-10 2:52
David Crow1-Apr-10 2:52 
AnswerRe: error LNK 2001 in visual C++ 6.0 Pin
David Crow30-Mar-10 2:46
David Crow30-Mar-10 2:46 
AnswerRe: error LNK 2001 in visual C++ 6.0 Pin
Randor 30-Mar-10 3:56
professional Randor 30-Mar-10 3:56 
Question::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) Pin
hanq_3891013029-Mar-10 20:14
hanq_3891013029-Mar-10 20:14 
AnswerRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) Pin
Eugen Podsypalnikov29-Mar-10 20:22
Eugen Podsypalnikov29-Mar-10 20:22 
GeneralRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) Pin
hanq_3891013029-Mar-10 21:03
hanq_3891013029-Mar-10 21:03 
GeneralRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) Pin
Eugen Podsypalnikov29-Mar-10 21:29
Eugen Podsypalnikov29-Mar-10 21:29 
GeneralRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) Pin
hanq_3891013029-Mar-10 21:48
hanq_3891013029-Mar-10 21:48 
Wink | ;) The follow is my code fragment:

HDC CreateDCFromDriver()
{
HDC hDC;
char lpszDriver[0x20];

if ( FALSE == GetDriverDeviceName(lpszDriver) )
return NULL;

hDC = ::CreateDCA(lpszDriver, 0, 0, 0);

if ( hDC == NULL )
{
MM_TRACE(_T("CreateDCFromDriver: ErrorCode - %08X"), GetLastError());
}

return hDC;
}

I think my code is just OK, cause everything works fine in "xp, vista, win7" OS.
It only occur in "win2k", when in "win2k" OS the code will go into "MM_TRACE(_T("CreateDCFromDriver: ErrorCode - %08X"), GetLastError());
". Meanwhile in other OS, it go into "return hDC;" correctly.
GeneralRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) Pin
Eugen Podsypalnikov29-Mar-10 21:53
Eugen Podsypalnikov29-Mar-10 21:53 
GeneralRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) Pin
hanq_3891013029-Mar-10 22:04
hanq_3891013029-Mar-10 22:04 
GeneralRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) Pin
Eugen Podsypalnikov29-Mar-10 22:10
Eugen Podsypalnikov29-Mar-10 22:10 
GeneralRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) Pin
hanq_3891013029-Mar-10 22:25
hanq_3891013029-Mar-10 22:25 
GeneralRe: ::CreateDC() returns NULL with errorcode ERROR_INVALID_PRINTER_NAME(1801) [modified] Pin
Eugen Podsypalnikov29-Mar-10 22:49
Eugen Podsypalnikov29-Mar-10 22:49 

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.