Home » U++ Library support » U++ Core » GetUserName fails on WinXP/MinGW 
	
		
		
			| GetUserName fails on WinXP/MinGW [message #19684] | 
			Mon, 05 January 2009 16:26   | 
		 
		
			
				
				
				
					
						  
						White_Owl
						 Messages: 27 Registered: January 2009  Location: New York
						
					 | 
					Promising Member  | 
					 | 
		 
		 
	 | 
 
	
		My code  
void MyDlg::MyDlg () {
   username.SetData(GetUserName());
   // username is defined as LineEdit in lay
} 
Gives an error: 
C:/usr/include/winbase.h:1580: error: too few arguments to function `BOOL GetUserNameA(CHAR*, DWORD*)'  
I am using U++ 2008.1 Windows installation without MinGW. 
 
And anyway, should not it be GetUserNameW()?
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
	| 
		
 |  
	
		
		
			| Re: GetUserName fails on WinXP/MinGW [message #19694 is a reply to message #19690] | 
			Mon, 05 January 2009 22:52    | 
		 
		
			
				
				
				
					
						  
						White_Owl
						 Messages: 27 Registered: January 2009  Location: New York
						
					 | 
					Promising Member  | 
					 | 
		 
		 
	 | 
 
	
		| luzr wrote on Mon, 05 January 2009 22:30 |   Hard to say without the rest of code. First wild guess is 
 
Upp::GetUserName() 
  |   Now I'm getting a different error: 
 error: `GetUserNameA' is not a member of `Upp'  
 
BTW, where is this function defined in U++? Which header/source? I can not find it.
		
		
		[Updated on: Mon, 05 January 2009 22:53] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 |  
	| 
		
 |  
	| 
		
 |  
	| 
		
 |   
Goto Forum:
 
 Current Time: Tue Nov 04 06:39:46 CET 2025 
 Total time taken to generate the page: 0.20948 seconds 
 |