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
GetUserName fails on WinXP/MinGW [message #19684] Mon, 05 January 2009 16:26 Go to next message
White_Owl is currently offline  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 #19690 is a reply to message #19684] Mon, 05 January 2009 22:30 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
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
Re: GetUserName fails on WinXP/MinGW [message #19694 is a reply to message #19690] Mon, 05 January 2009 22:52 Go to previous messageGo to next message
White_Owl is currently offline  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

Re: GetUserName fails on WinXP/MinGW [message #19696 is a reply to message #19690] Mon, 05 January 2009 23:16 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 697
Registered: December 2005
Location: Budapest, Hungary
Contributor
Quote:

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

I think it can be dropped now. I'm unable to run my UPP apps on win98 using current SVN version.
See this: Win98 crashes
Re: GetUserName fails on WinXP/MinGW [message #19697 is a reply to message #19694] Mon, 05 January 2009 23:19 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
White_Owl wrote on Mon, 05 January 2009 16:52

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.


Ah, that might explain a thing Smile

Do you have LATEST svn version? I think this was contributed after last major release.

Mirek
Re: GetUserName fails on WinXP/MinGW [message #19706 is a reply to message #19684] Tue, 06 January 2009 15:46 Go to previous message
White_Owl is currently offline  White_Owl
Messages: 27
Registered: January 2009
Location: New York
Promising Member
Well, as I said in the very first message: "I am using U++ 2008.1 Windows installation without MinGW."
Doing svn checkout now...
Previous Topic: Very need function Age.
Next Topic: How to load only header of the file with LoadFromFile?
Goto Forum:
  


Current Time: Mon Apr 29 11:47:58 CEST 2024

Total time taken to generate the page: 0.03860 seconds