-
October 9th, 2011, 07:27 AM
#1
GetUserNameEx returning 1114
Hey!
Ive got an app that authanticates itself through active directory. AD calls like LogonUser() work perfectly, but when i call a GetUserNameEx() it returns a 1114 (ERROR_DLL_INIT_FAILED) error. I cannot see any bad event at my pc or dc's EventViewer, and tried to check dll loads with Process Monitor, but no success. Client is Win7, server is 2003. Another guy works in another project of the same visual studio 2008 solution, and it works perfectly for him. Unfortunately i cant port my part to his pc, because its missing core parts and it wont run there.
Could it have any problem with Secur32.dll? Any ideas? Any help appriciated, thank you.
-
October 9th, 2011, 09:58 AM
#2
Re: GetUserNameEx returning 1114
GetUserNameEx returns BOOLEAN (zero if failed, non-zero if succeeded) and not an error code.
See How to correctly use GetLastError
-
October 10th, 2011, 12:59 AM
#3
Re: GetUserNameEx returning 1114
Well, of course it seems like if (getusernameex faild) GetLastError(), and thats what returns the 1114, not the mentioned function itself...
-
October 10th, 2011, 01:01 AM
#4
Re: GetUserNameEx returning 1114
Originally Posted by Credo
faild
i mean failed
-
October 10th, 2011, 05:37 AM
#5
Re: GetUserNameEx returning 1114
ERROR_DLL_INIT_FAILED literally means that some dll has failed to initialize. Typically this happens because of broken dll dependencies, though in your case it might be something more exotic. Try to disable anti-virus software if any and see whether this helps.
Best regards,
Igor
-
October 13th, 2011, 12:34 PM
#6
Re: GetUserNameEx returning 1114
Originally Posted by Igor Vartanov
ERROR_DLL_INIT_FAILED literally means that some dll has failed to initialize. Typically this happens because of broken dll dependencies, though in your case it might be something more exotic. Try to disable anti-virus software if any and see whether this helps.
hey, thx for the answer.
unfortunately that is not the case. after some testing though, it seems this only happens when i start my app from inside visual studio. when i go to the generated folder and make a shortcut to the exe with the same working directory as the VS startup project, it works. I thought that besides the working dir theres no difference between the two starting mode... now im stuck... Any idea?
Thx
-
October 13th, 2011, 02:17 PM
#7
Re: GetUserNameEx returning 1114
The "working directory" can be changed in Visual Studio (somewhere in the project settings), as well as the DLL search path.
Viggy
-
October 13th, 2011, 03:00 PM
#8
Re: GetUserNameEx returning 1114
unfortunately that is not the case.
It seems this is exactly the case of dll dependency as long as the working folder or dll search order is the matter.
Best regards,
Igor
-
October 28th, 2011, 03:47 AM
#9
Re: GetUserNameEx returning 1114
Hey. Thx for answers. The problem has been solved by dummy-calling one of those dll functions at the app startup... then it got it right. Well... at least it works
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|