Click here to Skip to main content
15,926,429 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Physically include dll in compile/link with VC2005 Pin
rechmbrs16-Dec-08 7:45
rechmbrs16-Dec-08 7:45 
GeneralRe: Physically include dll in compile/link with VC2005 Pin
rechmbrs16-Dec-08 7:42
rechmbrs16-Dec-08 7:42 
GeneralRe: Physically include dll in compile/link with VC2005 Pin
rechmbrs17-Dec-08 8:37
rechmbrs17-Dec-08 8:37 
Questionhelp finishing a program overloaded hospital Pin
SoniaHernandez16-Dec-08 3:36
SoniaHernandez16-Dec-08 3:36 
QuestionRe: help finishing a program overloaded hospital Pin
CPallini16-Dec-08 4:02
mveCPallini16-Dec-08 4:02 
AnswerRe: help finishing a program overloaded hospital Pin
David Crow16-Dec-08 4:08
David Crow16-Dec-08 4:08 
Questioncomputer name length issue Pin
George_George16-Dec-08 1:27
George_George16-Dec-08 1:27 
AnswerRe: computer name length issue Pin
Jijo.Raj16-Dec-08 1:50
Jijo.Raj16-Dec-08 1:50 
Just read the documentation carefully.

lpnSize [in, out] - On input, specifies the size of the buffer, in TCHARs. On output, receives the number of TCHARs copied to the destination buffer, not including the terminating null character. If the buffer is too small, the function fails and GetLastError returns ERROR_MORE_DATA. This parameter receives the size of the buffer required, including the terminating null character. If lpBuffer is NULL, this parameter must be zero.


If the provided buffer is not enough the GetComputerNameEx() fails with GetLastError() as ERROR_MORE_DATA. In that case, lpnSize holds the size of required buffer. Allocate the required buffer and call the function once again.

Well, like you, it took time for me to realize that MSDN is not just a documentation which have a short description abut the function names and parameters. It contains a lot of information about the behavior of functions. What really needed is patience to read them. Wink | ;) Hope those lines changed something in you. Good Luck!

Regards,
Jijo.

_____________________________________________________

http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

GeneralRe: computer name length issue Pin
George_George16-Dec-08 2:07
George_George16-Dec-08 2:07 
GeneralRe: computer name length issue Pin
Jijo.Raj16-Dec-08 2:28
Jijo.Raj16-Dec-08 2:28 
GeneralRe: computer name length issue Pin
George_George17-Dec-08 1:54
George_George17-Dec-08 1:54 
AnswerRe: computer name length issue Pin
CPallini16-Dec-08 1:51
mveCPallini16-Dec-08 1:51 
GeneralRe: computer name length issue Pin
George_George16-Dec-08 2:08
George_George16-Dec-08 2:08 
AnswerRe: computer name length issue Pin
Randor 16-Dec-08 2:02
professional Randor 16-Dec-08 2:02 
GeneralRe: computer name length issue Pin
George_George16-Dec-08 2:10
George_George16-Dec-08 2:10 
GeneralRe: computer name length issue Pin
Randor 16-Dec-08 2:34
professional Randor 16-Dec-08 2:34 
GeneralRe: computer name length issue Pin
George_George17-Dec-08 2:05
George_George17-Dec-08 2:05 
GeneralRe: computer name length issue Pin
Luc Pattyn16-Dec-08 2:45
sitebuilderLuc Pattyn16-Dec-08 2:45 
GeneralRe: computer name length issue Pin
George_George17-Dec-08 1:55
George_George17-Dec-08 1:55 
GeneralRe: computer name length issue Pin
Luc Pattyn17-Dec-08 2:27
sitebuilderLuc Pattyn17-Dec-08 2:27 
GeneralRe: computer name length issue Pin
George_George17-Dec-08 2:30
George_George17-Dec-08 2:30 
GeneralRe: computer name length issue Pin
Luc Pattyn17-Dec-08 2:34
sitebuilderLuc Pattyn17-Dec-08 2:34 
GeneralRe: computer name length issue Pin
George_George17-Dec-08 2:43
George_George17-Dec-08 2:43 
AnswerRe: computer name length issue Pin
Mark Salsbery16-Dec-08 5:37
Mark Salsbery16-Dec-08 5:37 
GeneralRe: computer name length issue Pin
George_George17-Dec-08 1:59
George_George17-Dec-08 1:59 

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.