Discussion:
[Wine] Error loading mfc42.dll - failed (error c000007b)
cpighin
2010-12-04 18:28:41 UTC
Permalink
:D Hi,

I installed wine on ubuntu 10.10 to run a windows program as reported here (http://appdb.winehq.org/objectManager.php?sClass=version&iId=22133&iTestingId=59338).
After few trails I decided to reinstall Wine (now version 1.3.8 ), to configure it as instructed by the guide, and than to install again the windows application, Birthday Reminder.
At present the application doesn't run for a problem with mfc42.dll
Here the code from my terminal

Code:
***@Aspire-8530:~$ wine "c:\\Programmi\\Birthday Reminder\\bday.exe"
Trying to load PE image for unsupported architecture (AMD-64)
err:module:import_dll Loading library MFC42.DLL (which is needed by L"C:\\Programmi\\Birthday Reminder\\bday.exe") failed (error c000007b).
err:module:LdrInitializeThunk Main exe initialization for L"C:\\Programmi\\Birthday Reminder\\bday.exe" failed, status c0000135




I ask for your help, thanks :D

Claudio
DanKegel
2010-12-04 20:10:42 UTC
Permalink
Ran fine for me with just
winetricks mfc42

but the log message you posted,
"Trying to load PE image for unsupported architecture (AMD-64)"

makes me think you've done something funny. Try again
with an empty .wine directory.
cpighin
2010-12-05 21:38:22 UTC
Permalink
Thanks Dan for your reply :)

Consider that before the actual installation of Wine, I did few actions to try to solve the problem with the previous installation and one of them was the use of winetricks to load the mfc42 library, of course without any result.

Consider also that before writing this post, I copied file mfc42.dll (taken from my windows system) into my /home/claudio directory where I found it is located the file bdays.ini with data used by Birthday Reminder, hoping that the application would work. Than I gave the command:
wine "c:\\Programmi\\Birthday Reminder\\bday.exe"
and I get the same result as reported in msg #1 [Crying or Very sad]

The file mfc42.dll is copied actually into following Ubuntu directories:
/home/claudio
/home/claudio/.wine/drive_c/Programmi
/home/claudio/.wine/drive_c/Programmi/Birthday Reminder

Any idea to help?

Claudio :)
vitamin
2010-12-05 23:16:28 UTC
Permalink
How about you just use 'winetricks mfc42' and don't copy that file all over your HDD? http://wiki.winehq.org/winetricks
cpighin
2010-12-06 08:09:20 UTC
Permalink
:) Vitamin,

because I am not expert and I don't want to do confused actions, I need an expert that guides me step by step. So, since you appears to be more expert than me, if you ensure your patient help I will follow your instructions.

I take this occasion to recall that, before installing the actual version of Wine, I was used to run the previous one as SU and it was working. I am confident that if I do the same with the actual Wine installation, it will work, but I learned that it is not a good practice to start Wine as SU.

Can you explain why I get en error message using command:
wine "c:\\Programmi\\Birthday Reminder\\bday.exe"
as normal user and not if I use it as SU?

Claudio :)
dimesio
2010-12-06 12:02:33 UTC
Permalink
Post by cpighin
wine "c:\\Programmi\\Birthday Reminder\\bday.exe"
as normal user and not if I use it as SU?
If you've been running as root, you've messed up the permissions in your wineprefix. Follow these instructions to fix it: http://wiki.winehq.org/FAQ#head-8b89c928ce782c014b8b312469223296093e1484

Also, delete all the versions of mfc42 you've manually installed.

I downloaded the app; it starts up fine here after installing winetricks mfc42.
cpighin
2010-12-06 17:43:32 UTC
Permalink
Hi dimesio :)

What you say affected my first installation of Wine (1.2.1) and consider that I have yet tried to solve the issue applying the procedure you linked.

Actual installation of Wine(1.3.8) is a clean one and I suppose there are not permission problems.

Claudio :)
dimesio
2010-12-06 19:04:53 UTC
Permalink
Post by cpighin
What you say affected my first installation of Wine (1.2.1) and consider that I have yet tried to solve the issue applying the procedure you linked.
Actual installation of Wine(1.3.8) is a clean one and I suppose there are not permission problems.
Upgrading Wine does not fix ~/.wine, and that's where your permissions problems are. If the instructions in the wiki didn't work, delete ~/.wine and start over.
cpighin
2010-12-07 20:46:02 UTC
Permalink
:) dimesio,

If I remember correctly, before installing Wine1.3.8, I deleted ~/.wine directory, but my memory is not strong so it is possible that the problem is there.

Before cancelling ~/.wine and re-installing again Wine, I would try other ways. It may be interesting a test I did few minutes ago with "sudo".

Here is the code:

Code:
***@Aspire-8530:~$ sudo wine "c:\\Programmi\\Birthday Reminder\\bday.exe"
[sudo] password for claudio:
wine: /home/claudio/.wine is not owned by you


May be you or some other expert can understand the problem combining the above information with the code of my first msg.

Claudio :)
John Drescher
2010-12-07 20:57:08 UTC
Permalink
Post by cpighin
If I remember correctly, before installing Wine1.3.8, I deleted ~/.wine directory, but my memory is not strong so it is possible that the problem is there.
Before cancelling ~/.wine and re-installing again Wine, I would try other ways. It may be interesting a test I did few minutes ago with "sudo".
wine: /home/claudio/.wine is not owned by you
May be you or some other expert can understand the problem combining the above information with the code of my first msg.
Claudio  :)
Cut it out with sudo. Please quit using sudo, root or su with wine.
This will break things.

John
cpighin
2010-12-08 11:58:45 UTC
Permalink
:) Ho seguito il consiglio di dimesio e mi sono imbattuto in un mistero che spero di svelare col contributo degli esperti.

Ecco cosa ho fatto passo-passo.

- Ho disinstallato Wine1.3.8 da gestore pacchetti con la funzione "rimuovi completamente"; sono stati rimossi wine1.3, Wine1.3-gecko, winetricks,
- Ho cancellato la cartella .Wine (proprietario: claudio) col comando: rm -r .wine.

Code:
***@Aspire-8530:~$ rm -r .wine
rm: rimuovere il file regolare protetto dalla scrittura `.wine/drive_c/Programmi/Birthday Reminder/instlog.lsl'? y
***@Aspire-8530:~$


- Ho verificato che la cartella è stata rimossa con tutto il suo contenuto.
- Ho disinstallato tramite gestore pacchetti wine1.3, Wine1.3-gecko, winetricks.
- Ho installato nuovamente wine1.3 (poi risultato 1.3.8 ) da gestore pacchetti che ha richiesto anche Wine1.3-gecko e winetricks
- Dopo l'installazione ho cercato la cartella .Wine e non l'ho trovata
- Ho poi cominciato a configurare Wine utilizzando questa guida: http://www.winehq.org/docs/wineusr-guide/config-wine-main#CONFIG-WINDOWS-VERSIONS e, prima ancora di fare la prima azione, ho trovato Wine nell'elenco delle applicazioni e, al suo interno, la cartella Birthday Reminder e i suoi lanciatori dedicati (Applicazioni > Wine > Programmi > Birthday Reminder > Setup/Check now).
- Mi sono chiesto: come mai trovo l'applicazione che non ho ancora installato?
- Allora ho navigato all'interno del sistema di cartelle e ho verificato che la cartella Applicazioni > Wine > Programmi > Birthday Reminder non esiste. Tuttavia esiste la la cartella .Wine (sempre con proprietario: claudio) che prima non avevo visto (?)
- Seconda domanda: Allora, come mai vedo Birthday Reminder tra le applicazioni di Ubuntu?

Gentili esperti, mi date una mano a capire cosa succede?

Claudio :)
dimesio
2010-12-08 12:35:14 UTC
Permalink
Post by cpighin
:) Ho seguito il consiglio di dimesio
You need to post in English.
cpighin
2010-12-08 13:45:00 UTC
Permalink
:) Thank you dimesio,

I forgot to be in en English spoken forum!

I followed your advice and I came across a mystery that I hope to unravel with experts assistance.

Here's what I did step by step.

- I un-installed Wine1.3.8 by package manager with "remove completely". wine1.3, Wine1.3-gecko and winetricks were removed.
- I deleted the folder .Wine (owner: Claudio) with the command: rm-r .Wine.

Code:
Claudio @ Aspire-8530: ~ $ rm-r. wine
rm: remove write-protected regular file `.wine / drive_c / Programs / Birthday Reminder / instlog.lsl '? y
Claudio @ Aspire-8530: ~ $


- I checked that the folder was really removed with all its contents.
- I reinstalled wine1.3 (resulted as version 1.3.8 ) by package manager and Wine1.3-gecko and winetricks were installed as well.
- After installation I looked for the folder .Wine and I have not found it!
- then, when I was starting to configure Wine using this guide: http://www.winehq.org/docs/wineusr-guide/config-wine-main#CONFIG-WINDOWS-VERSIONS , and before making any action, I found Wine listed in the Ubuntu applications and, within it, the folder Birthday Reminder and its dedicated launcher (Applications> Wine> Programs> Birthday Reminder> Setup / Check now).
- I asked myself: Why I find an application which I have not installed?
- Then I looked inside the system folder and I checked that folder Applications> Wine> Programs> Birthday Reminder was not there. However, folder .Wine was there (always with owner: claudio).
- Second question: Why I have not seen it before (?)


Dear experts, would you give me an hand to understand what's happening?

Claudio :)
John Drescher
2010-12-08 14:18:34 UTC
Permalink
Post by cpighin
:) Thank you dimesio,
I forgot to be in en English spoken forum!
I followed your advice and I came across a mystery that I hope to unravel with experts assistance.
Here's what I did step by step.
- I un-installed Wine1.3.8 by package manager with "remove completely". wine1.3, Wine1.3-gecko and winetricks were removed.
- I deleted the folder .Wine (owner: Claudio) with the command: rm-r .Wine.
rm: remove write-protected regular file `.wine / drive_c / Programs / Birthday Reminder / instlog.lsl '? y
- I checked that the folder was really removed with all its contents.
- I reinstalled wine1.3 (resulted as version 1.3.8 ) by package manager and Wine1.3-gecko and winetricks were installed as well.
- After installation I looked for the folder .Wine and I have not found it!
That is the expected and correct result. Installing wine does not
create or touch the .wine folder.


Open the terminal (as a non root user) and type

winecfg

or run any other wine program and the default prefix of .wine should be created
Post by cpighin
- then, when I was starting to configure Wine using this guide: http://www.winehq.org/docs/wineusr-guide/config-wine-main#CONFIG-WINDOWS-VERSIONS , and before making any action, I found Wine listed in the Ubuntu applications and, within it, the folder Birthday Reminder and its dedicated launcher (Applications> Wine> Programs> Birthday Reminder> Setup / Check now).
- I asked myself: Why I find an application which I have not installed?
This is also expected. Deleting .wine does not remove the menu entries.

http://wiki.winehq.org/FAQ#head-8a17a13a8a4cda9e12e24a1ad4e1b1aaf043d581


John
dimesio
2010-12-08 14:39:07 UTC
Permalink
Post by cpighin
- I asked myself: Why I find an application which I have not installed?
- Then I looked inside the system folder and I checked that folder Applications> Wine> Programs> Birthday Reminder was not there. However, folder .Wine was there (always with owner: claudio).
- Second question: Why I have not seen it before (?)
Dear experts, would you give me an hand to understand what's happening?
1. http://wiki.winehq.org/FAQ#head-8a17a13a8a4cda9e12e24a1ad4e1b1aaf043d581

2. Linux is case-sensitive. .Wine is not the same as .wine.
cpighin
2010-12-08 18:13:31 UTC
Permalink
:) thanks dimesio.

I have done following actions:

1) I followed this guide to uninstall again Birthday Reminder: http://wiki.winehq.org/FAQ#head-8a17a13a8a4cda9e12e24a1ad4e1b1aaf043d581

Code:
***@Aspire-8530:~$ rm -rf $HOME/.wine
***@Aspire-8530:~$ rm -f $HOME/.config/menus/applications-merged/wine*
***@Aspire-8530:~$ rm -rf $HOME/.local/share/applications/wine
***@Aspire-8530:~$ rm -f $HOME/.local/share/desktop-directories/wine*
***@Aspire-8530:~$ rm -f $HOME/.local/share/icons/????_*.{xpm,png}
***@Aspire-8530:~$ rm -f $HOME/.local/share/icons/*-x-wine-*.{xpm,png}
***@Aspire-8530:~$


2) I verified that folder .wine was removed and that Birthday Reminder was no more listed in the system menu.
3) I uninstalled again wine1.3 by package manager and verified that was not listed in the system menu.
4) I installed again wine1.3 (resulted as version 1.3.8 ) by package manager.
5) I verified that Wine was again in the system menu, that Birthday Reminder was not present, that folder .wine was not created.

Now, before doing wrong actions, I wait for your guide, dimesio :), to go further, if you retain that all things are OK.

Claudio :)
cpighin
2010-12-09 10:20:21 UTC
Permalink
:) Waiting for advises on how to proceed safely, I configured Wine following this guide http://www.winehq.org/docs/wineusr-guide/config-wine-main#USING-WINECFG.

I noticed that folder /home/claudio/.wine was created at winecfg startup.
I copied files bdaysetup.exe (application setup ) e bday.exe (application) in the folder /home/claudio/.wine/drive_c/Programmi to prepare Birthday Reminder installation.
I set following parameters in WINECFG:
- Tab Applications > Predefined setting > Windows version: Windows7
- Tab Applications > file /home/claudio/.wine/drive_c/Programmi/bday.exe > Windows version: WindowsXP
- Tab Units > automatically detect
I verificied the absence of folder Birthday Reminder within Wine menu

Now I should install the application Birthday Reminder. Any suggestion on the best way to follow to avoid previous errors?

Claudio :)
dimesio
2010-12-09 14:29:55 UTC
Permalink
Post by cpighin
- Tab Applications > Predefined setting > Windows version: Windows7
Why did you change this? Don't change default settings without a reason.
Post by cpighin
Now I should install the application Birthday Reminder. Any suggestion on the best way to follow to avoid previous errors?
Don't run as sudo, and use winetricks to install mfc42.
cpighin
2010-12-09 16:05:04 UTC
Permalink
:) I waited for several hours and no help arrived, so I installed Birthday Reminder with double-click on file /home/claudio/.wine/dosdevices/c:/Programmi/bdaysetup.exe as instructed by this guide http://wiki.winehq.org/FAQ#head-497f1a295d53dd3444f211df2b13312c7767afa2
Birthday Reminder setup did the following:
- created a folder /home/claudio/.wine/dosdevices/c:/Programmi/Birthday Reminder contening files bday.exe (the excutable for the application) and instlog.lsl
- inserted a folder and and its dedicated launchers (Applications> Wine> Programs> Birthday Reminder> Setup / Check now) into Wine menu.
Than I tried to run Birthday Reminder by terminal command and I had the same result as msg#1.

Code:
***@Aspire-8530:~$ wine "c:\\Programmi\\Birthday Reminder\\bday.exe"
err:module:import_dll Library MFC42.DLL (which is needed by L"C:\\Programmi\\Birthday Reminder\\bday.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"C:\\Programmi\\Birthday Reminder\\bday.exe" failed, status c0000135



What is wrong now? Please help me!

Claudio :)
John Drescher
2010-12-09 16:14:30 UTC
Permalink
Post by cpighin
:) I waited for several hours and no help arrived, so I installed Birthday Reminder with double-click on file /home/claudio/.wine/dosdevices/c:/Programmi/bdaysetup.exe as instructed by this guide http://wiki.winehq.org/FAQ#head-497f1a295d53dd3444f211df2b13312c7767afa2
- created a folder /home/claudio/.wine/dosdevices/c:/Programmi/Birthday Reminder contening files bday.exe (the excutable for the application) and instlog.lsl
- inserted a folder  and and its dedicated launchers (Applications> Wine> Programs> Birthday Reminder> Setup / Check now) into Wine menu.
Than I tried to run Birthday Reminder by terminal command and I had the same result as msg#1.
err:module:import_dll Library MFC42.DLL (which is needed by L"C:\\Programmi\\Birthday Reminder\\bday.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"C:\\Programmi\\Birthday Reminder\\bday.exe" failed, status c0000135
What is wrong now? Please help me!
Did you use winetricks to install vc6 runtimes?

John
dimesio
2010-12-09 16:37:56 UTC
Permalink
Post by cpighin
err:module:import_dll Library MFC42.DLL (which is needed by L"C:\\Programmi\\Birthday Reminder\\bday.exe") not found
Install mfc42 with winetricks.
cpighin
2010-12-09 17:12:14 UTC
Permalink
:) Thanks dimesio.

I installed mfc42.dll by winetricks


Code:
***@Aspire-8530:~$ sh winetricks
Executing wget -O vc6redistsetup_enu.exe -nd -c --read-timeout=300 --retry-connrefused --header Accept-Encoding: gzip,deflate http://download.microsoft.com/download/vc60pro/update/1/w9xnt4/en-us/vc6redistsetup_enu.exe
--2010-12-09 17:45:57-- http://download.microsoft.com/download/vc60pro/update/1/w9xnt4/en-us/vc6redistsetup_enu.exe
Risoluzione di download.microsoft.com... 213.199.149.182, 213.199.149.183
Connessione a download.microsoft.com|213.199.149.182|:80... connesso.
HTTP richiesta inviata, in attesa di risposta... 200 OK
Lunghezza: 1833232 (1,7M) [application/octet-stream]
Salvataggio in: "vc6redistsetup_enu.exe"

100%[======================================>] 1.833.232 741K/s in 2,4s

2010-12-09 17:45:59 (741 KB/s) - "vc6redistsetup_enu.exe" salvato [1833232/1833232]

Executing wine /home/claudio/.cache/winetricks/vc6redistsetup_enu.exe /T:C:\winetrickstmp /c
Executing /usr/bin/cabextract /home/claudio/.cache/winetricks/vcredist.exe -d /home/claudio/.wine/dosdevices/c:/windows/system32 -F mfc42u.dll
/home/claudio/.cache/winetricks/vcredist.exe: library not compiled to support large files.
Extracting cabinet: /home/claudio/.cache/winetricks/vcredist.exe
extracting /home/claudio/.wine/dosdevices/c:/windows/system32/mfc42u.dll

All done, no errors.
Using native,builtin override for following DLLs: msvcrt
Executing early_wine regedit c:\winetrickstmp\override-dll.reg
REGEDIT4

[HKEY_CURRENT_USER\Software\Wine\DllOverrides]
"*msvcrt"="native,builtin"
Install of mfc42 done
winetricks done.
***@Aspire-8530:~$



Than I cheched that mfc42u.dll was installed in /home/claudio/.wine/dosdevices/c:/windows/system32 and that there was also mfc42.dll

Than I tried again to run Birthday Reminder and ... it worked as expected :D even if with a fixme issue that I don't undestand.
Code:
***@Aspire-8530:~$ wine "c:\\Programmi\\Birthday Reminder\\bday.exe"
fixme:ole:DllRegisterServer stub
***@Aspire-8530:~$


dimesio, should I do something else to improve the system behaviour?

Claudio :)
cpighin
2010-12-13 14:58:46 UTC
Permalink
:) Those interested on running Birthday Remainders in Ubuntu/Wine should read this:

http://appdb.winehq.org/objectManager.php?sClass=version&iId=22133&iTestingId=59584

Claudio :)

James Mckenzie
2010-12-09 18:06:51 UTC
Permalink
Than I tried again to run Birthday Reminder and ... it worked as expected even if with a fixme issue that I don't> >understand.
fixme:ole:DllRegisterServer stub
This fixme can be ignored unless your program is not running correctly.

As for system behavior, what video card are you using? nVidia GPUs are best, AMD/ATI so-so and Intel are the worst for use with Wine. (Not that they are a bad product, this is based on the quality of Intel drivers versus nVidia drivers.)

James McKenzie
Sylvain Petreolle
2010-12-10 09:43:39 UTC
Permalink
This nVidia advertisement can be ignored unless your program requires 3D usage.
This is a simple pop-up app for birthdays, remember :)
Kind regards,
Sylvain Petreolle

----- Message d'origine ----
Envoyé le : Jeu 9 décembre 2010, 19h 06min 51s
Objet : Re: [Wine] Error loading mfc42.dll - failed (error c000007b)
Than I tried again to run Birthday Reminder and ... it worked as expected
even if with a fixme issue that I don't> >understand.
fixme:ole:DllRegisterServer stub
This fixme can be ignored unless your program is not running correctly.
As for system behavior, what video card are you using? nVidia GPUs are best,
AMD/ATI so-so and Intel are the worst for use with Wine. (Not that they are a
bad product, this is based on the quality of Intel drivers versus nVidia
drivers.)
James McKenzie
Continue reading on narkive:
Search results for '[Wine] Error loading mfc42.dll - failed (error c000007b)' (Questions and Answers)
5
replies
how to access Internet throw mobile phone to PC? pls tell me names of mobiles?
started 2007-03-13 04:14:49 UTC
internet
Loading...