Sign in to follow this  

Microsoft Layer for Unicode compilation...

Recommended Posts

I am currently trying to get the MSLU compiling correctly in my application but I am not sure that I fully understand the MSDN documentation and was hoping that some of the more experienced members here might be able to help me out a little. On the MSDN page 'Compiling your applications with the Microsoft Layer for Unicode' ( I can't quite see if I am supposed to use LaodLibrary or not. I have followed steps 1, 2 and 3 but do I then need to LoadLibrary unicows.dll or is this done automatically? Also, if I do need to use LoadLibrary, is it sufficient to just call LoadLibrary(L"unicows.dll") or do I have to do something with the handle that is returned? Also where would a load library call go? In a global area? Or in my winmain? This probably seems like a stupid question but I need to be sure that I am doing this correctly. Thanks in advance for any help. Mark Coleman p.s. How do I put hyperlinks in my posts? URLs copied and pasted don't look to good! [Edited by - mrmrcoleman on December 1, 2004 2:44:33 PM]

Share this post

Link to post
Share on other sites
Which three steps are you following? The ones that asks you to add UnicoWS.dll and UnicoWS.lib and tells you to set a bunch of link options or the ones that tell you to add certain code to your application?

If the three steps with the link options (the first set on your link) you do not need to call LoadLibrary(). The system will do it for you.

If you do the second set of three steps you will need to call LoadLibrary(). If you do this step you do not want to call


since that would attempt to call the Unicode API. You want to call instead


so that the ANSI version of the API is explicitly used.

Share this post

Link to post
Share on other sites

I have followed the instructions as per the web page and I get the following error:

unicows.lib(thunk_kernel32_CompareStringW.obj) Fatal Error LNK1103: debugging information corrupt; recompile module

Any ideas anybody?

Also, in the MSDN instructions it states that the link options should read:

nod: declarations -> unicows.lib -> rest of the libraries

however when I put the link options into my compiler like this it rearranges them so that the rest of the libraries come first followed by the nod: declarations?

I assume I correct in adding all this to the project options windows in the Link Tab of the Project Settings menu item in MSVC++6?

Could somebody post their project options please so that I might be able to see what I am doing wrong?

Thanks again.

Mark Coleman

[Edited by - mrmrcoleman on December 1, 2004 5:28:48 PM]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this