Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » GetUserName fails on WinXP/MinGW
Re: GetUserName fails on WinXP/MinGW [message #19690 is a reply to message #19684] Mon, 05 January 2009 22:30 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14261
Registered: November 2005
Ultimate Member
[quote title=White_Owl wrote on Mon, 05 January 2009 10:26]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.

Hard to say without the rest of code. First wild guess is

Upp::GetUserName()

Quote:

And anyway, should not it be GetUserNameW()?


Well, maybe it should, but we are still struggling to support Win98...

Most of code is capable of using 'W' variants where being run on WinNT (or better), essentially hiding all encoding details.

(Anyway, we plan to reconsider the whole issue this year. Maybe 10 years of supporting the crappy OS is enough....)

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Very need function Age.
Next Topic: How to load only header of the file with LoadFromFile?
Goto Forum:
  


Current Time: Wed Jun 18 11:18:14 CEST 2025

Total time taken to generate the page: 0.04263 seconds