[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 492
  • Last Modified:

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
0
Alex7777qq
Asked:
Alex7777qq
  • 4
  • 3
1 Solution
 
evilrixSenior Software Engineer (Avast)Commented:
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.
0
 
Alex7777qqAuthor Commented:
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.

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

0
 
evilrixSenior Software Engineer (Avast)Commented:
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?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Alex7777qqAuthor Commented:
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.....

0
 
evilrixSenior Software Engineer (Avast)Commented:
Hmmm. The application is termination because something within has thrown an exception and you've not caught it and handled it. This may or may not be related to the Unicode module. What makes you think it is the use of this module? Have you tried using the debugger to break at the point the exception is thrown? I'd suggest trying this to see where the exception propergates from.

http://msdn2.microsoft.com/en-us/library/d14azbfh.aspx

Also, I'd suggest writing a very small and simple program that uses the Unicows library just to see if you can get it working in another project. Maybe just do something simple like display a message box using Unicode. The rational behind this suggestion is to try and remove as many unknowns from the equation as possible to try and prove of disprove you are using the library correctly.

You can also use the following tool to produce diagnostics about a crashing program that might prove helpful in solving this issue.

http://www.microsoft.com/downloads/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en

"Process Crashes: A process crash is usually indicative of an unhandled exception occurring in a process or code running in a process that actively terminates the process. To debug a process crash, start by creating a crash rule against the process(s) in question. Similar to previous debuggers, DebugDiag will attach to a specific process (s) and will monitor the process for multiple types of exceptions or any custom breakpoints that cause the process(s) to terminate unexpectedly. When the crash occurs, a full memory dump file will be created, in the directory specified when setting up the crash rule."

If you can generate a memory dump and post it here http://www.ee-stuff.com/ I can analyze it for you, which may help identify the issue.

-Rx.
0
 
Alex7777qqAuthor Commented:
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.
0
 
evilrixSenior Software Engineer (Avast)Commented:
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.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now