hello guys...i have a LPTSTR variable and I want to show that on console how do I do that..Here is what I have but, off course it does't work..if it is tooo simple question, plz excuse me...thanx

lpszDevName = (LPTSTR)((LPBYTE)lineDevCaps + lineDevCaps->dwLineNameOffset);
printf("%s",lpszDevName);

Use _tprintf( TEXT("%s"), lpszDevName ); instead. You'll also have to #include <tchar.h> .

thanx...it really worked....now the last question is ...i want to show the DWORD variable in console, am I doing the right thing??

DWORD devID = 0;
printf("The number is: %d", devID);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.