Link to home
Start Free TrialLog in
Avatar of Alex7777qq
Alex7777qq

asked on

Can not use MFC application with unicode on windows 98

Hello,

I have made an MFC application (Visual Studio 2005) that uses unicode, but when I start it on windows 98 it does not work.
I have added unicows.lib at Linker/Additional dependencies,
also I am using MFC in a static library

What elese must I do, to have an MFC application that uses unicode running on windows 98?

Thanks,
Alex
Avatar of evilrix
evilrix
Flag of United Kingdom of Great Britain and Northern Ireland image

I presume you've read the following articles since you are linking with unicows.lib but I'll paste it anyway just for reference. It might be worth reading through them just to be sure you've covered all the bases.
http://www.microsoft.com/globaldev/handson/dev/mslu_announce.mspx
http://msdn.microsoft.com/msdnmag/issues/01/10/MSLU/

IF that doesn't help can you state exactly what behavior you are seeing? Doe it crash? Do you get any errors? If so what are they? Please provide as much info as possible.

Thanks.

-Rx.
Avatar of Alex7777qq
Alex7777qq

ASKER

May be I am wrongly adding the dlls (described in the text below, taken from the link in the evilrix experts comment) at Project/Properties/Linker/input/additional dependencies. Is that the correct place,as it is empty by default?
-----------------
To take advantage of this scheme, you can use the following three-step plan:

Include the following in the link list:

/nod:kernel32.lib /nod:advapi32.lib /nod:user32.lib /nod:gdi32.lib
/nod:shell32.lib /nod:comdlg32.lib /nod:version.lib /nod:mpr.lib
/nod:rasapi32.lib /nod:winmm.lib /nod:winspool.lib /nod:vfw32.lib
/nod:secur32.lib /nod:oleacc.lib /nod:oledlg.lib /nod:sensapi.lib

Include unicows.lib.

Include all of the libraries that MSLU (and your application) might need:

kernel32.lib advapi32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib
version.lib mpr.lib rasapi32.lib winmm.lib winspool.lib vfw32.lib
secur32.lib oleacc.lib oledlg.lib sensapi.lib

Let's examine these steps and the reasons for them, one at a time.

------------------

So, are you saying that after following the does it still doesn't work? Can you explain what actually does or doesn't happen please?
When I start the application under windows 98 i get a dialog with a cross in a red circle with a text:
Runtime Error!
Program test.exe

This application has requested the Runtime to terminate it in an unusual way.
Please contact the applications support team for more information.

OK button
When I click it I get:
This program has performed an illegal operation and will be shut down.

when I open details of the error, it starts with:
test.exe caused an exception 40000015H in module test.exe at 0167:00426f24.
Registers.....

ASKER CERTIFIED SOLUTION
Avatar of evilrix
evilrix
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i have found the poblem. When the MFC application is executed in windows 98, it demands unicows.dll file to be in the same directory as the exe file. Afer I copied it to the exe directory is started working.
I thought that I don't need to attach any dlls, but I was wrong.

Thank you for the assistance.
Ah yes, the DLL needs to be available to the application. It shouldn't necessarily need to be in the same folder, just in the DLL search path.

http://msdn2.microsoft.com/en-us/library/7d83bc18(VS.80).aspx
http://msdn2.microsoft.com/en-us/library/ms682586(VS.85).aspx

-Rx.