-
Notifications
You must be signed in to change notification settings - Fork 30.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src,deps: replace LoadLibrary by LoadLibraryW
On Windows, when compiling with `UNICODE` defined, `LoadLibrary` becomes `LoadLibraryW`. When an ASCII string is passed to that function it crashes. PR-URL: #226 Reviewed-By: Bert Belder <[email protected]>
- Loading branch information
1 parent
cbf76c1
commit 604b876
Showing
3 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
604b876
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better used
since this code will work with Unicode and non-Unicode builds in natural ways.
604b876
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NO NO NO
Read the pull request. For your convenience only I've added a link in the commit message.
604b876
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read explanation. I understand why app is crashing when UNICODE is defined. Maybe you have some very specific needs which here is not described, but I don't get why my solution is not working.
I refer to MS docs and what seem conventional wisdom for me. See http://msdn.microsoft.com/en-us/library/dybsewaf.aspx
Maybe you miss _T macro which expand string to different literals based on presence of UNICODE define.
So basically when UNICODE not defined you will have
With UNICODE defined you will have
Your solution should crash on 32-bit Windows I believe.
Again this is so regular stuff, so maybe I miss something very obvious to you, but not visible to me?