char buf[1000]; 
 
GetTempPath(1000, buf); 
 
char buf1[1000]; 
 
GetLongPathName(buf, buf1, 1000);  
 
===================================================================

Output: 
 
C:\Documents and Settings\IP\Local Settings\Temp\ 
AND