473,321 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Vista / XP msvcrt.dll error

I have a VC++ / .NET 2.0 solution built using VS 2005 SP1 under XP.
Everything has been working well there over the past year. I have recently
starting porting the app to Windows Vista (since it currently will not
execute properly there).

I installed VS 2005 SP1 and the hot fix SP for Vista on my Windows Vista
system and have rebuilt the entire solution there with everything working
well. This solution also builds a setup package that includes all
dependecies -- i.e. MS VC80 vcrt merge modules, etc.). The setup package
works perfectly and the software now runs under Vista. Now, when I go back
and install the app under Windows XP I get the following error when I start
up the exe after installation:

The procedure entry point _except_handler4_common could not be located in
the dynamic link library msvcrt.dll

This is frustrating since if I go back and build the identicle solution
under VS2005 SP1 under Windows XP the package installs and works great (but
then no longer works under Vista). What am I missing?

Thanks, -David
Mar 2 '07 #1
18 81201
Hi David,

Based on my knowledge, _except_handler*(* can be 2, 3, 4) is an internal
exception handler of Microsoft VC++ compiler.

I have used windbg to dump the available handlers in msvcrt.dll on Win2003,
below is the result:
0:000x msvcrt!_except_handler*
77bc6bbc msvcrt!__except_handler2 (void)
77bc6c74 msvcrt!_except_handler3 (void)

So the _except_handler4_common handler is not present in msvcrt.dll on
Win2003 machine. I assume it is the same as WinXP.(I will give a check on
WinXP machine tommorrow after going back to office)

By testing it Vista reveals, the Vista version of msvcrt.dll contains
_except_handler4_common symbol.

I then performed search in all the available Microsoft database and found
some records. Most of the records are related with certain Vista tools
being used on WinXP machine, which will generate the error your pasted.

I am not sure if this is a known issue yet, I will try to contact VC++ team
to ask for the best practise for this issue.

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 5 '07 #2
Thanks Jeffrey, I'll wait to see what you come up with because at this point
I am completely stumped as to how to resolve this issue. It's particularly
confusing since as I said, the source code/solution are identical under
VS2005 sp1, but they are obviously compiled very differently based on whether
your development system is running under Vista versus XP.

Best regards,
David

Mar 5 '07 #3
Hi David,

Sorry for letting you wait.

Yes, they confirmed that only CRT8 version of msvcrt.dll contains the
_except_handler4_common function. To use it, you need to install the CRT8
redist on XP:
http://www.microsoft.com/downloads/d...BEE-A3F9-4C13-
9C99-220B62A191EE&displaylang=en

However, they thought that non-Windows developers (third parties as well as
MS non-Windows developers) are never supposed to use system32's msvcrt.dll.
That's only for Windows components. We believe you should be using
msvcr80.dll followed with VS2005.

To find out why your application is connecting to system32's msvcrt.dll,
you could use depends.exe to check just which binary is trying to access
msvcrt.dll. Or enable loader snaps and look at the output in the debugger.

I will wait for your further feedback, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 6 '07 #4
I already ran the "vcredist_x86.exe" code to make sure I had the most recent
msvcrt.dll installed, but still encountered the problem. Additionally, one
of the XP systems I am testing on (and encountering the problem) has VS 2005
w/ SP1 already installed, which from what I can understand would also ensure
the latest versions of runtimes being installed. I will try to install again
tomorrow and also run depends.exe as you suggest to see if I can provide any
other info. Thanks. -David

Mar 6 '07 #5
Hi David,

Thanks for your feedback!

Yes, I have checked this with several VC++ developers. Based on their
feedback, unless you've done something really strange, VC2005 will not
create binaries with a dependency on Vista's msvcrt.dll. VC2005 will create
binaries with a dependency on msvcr80.dll. vcredist_x86.exe only installs
msvcr80.dll, not msvcrt.dll.

The problem is not with the binary built with VC2005. The problem is with
some other binary on the your problematic machine. Something else has been
copied from a Vista machine to the problematic machine. Use depends.exe to
find out what DLL is causing a dependency on the Vista version of
msvcrt.dll.

Another developer also confirmed:
"Msvcrt.dll is an OS binary. It looks like your customer somehow compiles
against Vista msvcrt.lib. It is not a supported scenario."

I will wait for your further findings with depends.exe. Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 7 '07 #6
"Msvcrt.dll is an OS binary. It looks like your customer somehow compiles
against Vista msvcrt.lib. It is not a supported scenario."
Is Vista msvcrt.lib even publicly available?
Mar 7 '07 #7
JW- [Wed, 07 Mar 2007 19:20:20 +0900]:
>Is Vista msvcrt.lib even publicly available?
Apps/code made with vs6/vc (and prior) use the
"OS binary" msvcrt.dll. vs6/vc used msvcrt.lib
as the import lib. It never used to be the
"OS binary". Lots of apps are made with vs6/vc.
Even today, quite a few (100s of 000s) prefer
vs6 as a dev platform over the newer ones.
No, one doesn't need a "Vista msvcrt.lib"; they
are all the same (as far as it needs to be),
otherwise none of those vs6/vc (and prior) apps
would run on Vista. They do.

--
40th Floor - Software @ http://40th.com/
iplay.40th.com iPlay advanced audio player
zircon.40th.com Zircon music player
Mar 7 '07 #8

<he*@40th.comwrote in message
news:eH**************@TK2MSFTNGP03.phx.gbl...
JW- [Wed, 07 Mar 2007 19:20:20 +0900]:
Is Vista msvcrt.lib even publicly available?

Apps/code made with vs6/vc (and prior) use the
"OS binary" msvcrt.dll. vs6/vc used msvcrt.lib
as the import lib. It never used to be the
"OS binary". Lots of apps are made with vs6/vc.
Even today, quite a few (100s of 000s) prefer
vs6 as a dev platform over the newer ones.
No, one doesn't need a "Vista msvcrt.lib"; they
are all the same (as far as it needs to be),
otherwise none of those vs6/vc (and prior) apps
would run on Vista. They do.
The older msvcrt.lib would have no import for the suffix 4 exception handler
function, because it was introduced with vista.
>
--
40th Floor - Software @ http://40th.com/
iplay.40th.com iPlay advanced audio player
zircon.40th.com Zircon music player

Mar 9 '07 #9
BV [Fri, 9 Mar 2007 14:20:22 -0600]:
>The older msvcrt.lib would have no import for the suffix 4 exception handler
function, because it was introduced with vista.
I've made import libraries in my time from
nothing but DLL files, back around the omf-
coff switch over. If someone wanted to make
an import library for some DLL, I'd assume he
still could. Most files today dwarf the RTL
so I'd sooner link static than do that (for
small files, I use the vc6 import lib).

07 02 18 23:23 5,632 zetup.exe

Made with vs8/link8, ref'ing msvcrt.dll.
File made/linked with the vs8 static lib:

07 03 09 14:38 50,176 zetup.exe

(Like I said, simple, so only a little RTL
got linked; no reference to any RTL DLL.)

Manifests turn out to be pretty ugly (hack)
so I go out of my way to avoid that mess.

--
40th Floor - Software @ http://40th.com/
iplay.40th.com iPlay advanced audio player
zircon.40th.com Zircon music player
Mar 9 '07 #10

<he*@40th.comwrote in message
news:OE**************@TK2MSFTNGP05.phx.gbl...
BV [Fri, 9 Mar 2007 14:20:22 -0600]:
The older msvcrt.lib would have no import for the suffix 4 exception
handler
function, because it was introduced with vista.

I've made import libraries in my time from
nothing but DLL files, back around the omf-
coff switch over. If someone wanted to make
an import library for some DLL, I'd assume he
still could. Most files today dwarf the RTL
You can, but that would be a .lib matching the version of the .dll generated
from, hence a Vista msvcrt.lib.
so I'd sooner link static than do that (for
small files, I use the vc6 import lib).

07 02 18 23:23 5,632 zetup.exe

Made with vs8/link8, ref'ing msvcrt.dll.
File made/linked with the vs8 static lib:

07 03 09 14:38 50,176 zetup.exe

(Like I said, simple, so only a little RTL
got linked; no reference to any RTL DLL.)
still, the linker only puts import table entries for the functions
referenced by the objects, so how did _except_handler4_common get
referenced?
>
--
40th Floor - Software @ http://40th.com/
iplay.40th.com iPlay advanced audio player
zircon.40th.com Zircon music player

Mar 9 '07 #11
BV- [Fri, 9 Mar 2007 15:36:44 -0600]:
>still, the linker only puts import table entries for the functions
referenced by the objects, so how did _except_handler4_common get
referenced?
I must not be following this thread as well
as you are.

* msvcrt.dll is used by all vc1-6 applications
that link to the msvcrt.dll

* vc7+ apps no longer use msvcrt.dll, but
rather use a version-specific msvcrt##.dll,
and requires a manifest

* Someone in this thread said msvcrt.dll is
a system dll, and apps, more or less, are
not to use it

This last statement is one that is not terribly
valid. The rest of the thread I wasn't following,
so I don't know how to answer your question.

--
40th Floor - Software @ http://40th.com/
iplay.40th.com iPlay advanced audio player
zircon.40th.com Zircon music player
Mar 10 '07 #12
Hi David,

How about this issue now? Have you managed to use dependency walker to find
out which binary is linking with the msvcrt.dll? If you still need any help
or have any concern, please feel free to feedback, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 12 '07 #13
* Someone in this thread said msvcrt.dll is
a system dll, and apps, more or less, are
not to use it

This last statement is one that is not terribly
valid. The rest of the thread I wasn't following,
so I don't know how to answer your question.
The original poster compiled an application under Vista, and it then
wouldn't run on XP because of a missing function in msvcrt.dll.
>
--
40th Floor - Software @ http://40th.com/
iplay.40th.com iPlay advanced audio player
zircon.40th.com Zircon music player

Mar 12 '07 #14
BV [Mon, 12 Mar 2007 09:33:37 -0500]:
>The original poster compiled an application under Vista, and it then
wouldn't run on XP because of a missing function in msvcrt.dll.
Now that is pretty odd. The exception routine
looks like it's compiler-born, so if his app
is forceably linking to msvcrt.dll (like I do)
then that'll happen. But you have to go out
of your way to tell the linker to ignore the
default library:

#pragma comment(linker, "/NODEFAULTLIB:msvcrt80.lib")

and then include the old to resolve what you
have:

#pragma comment(lib, "/yohoho/vs6/msvcrt.lib")

He may have those two, somewhere. In this
case I'd switch to static linking, or find
a way to get the compiler to not reference
that particular exception handler.
--
40th Floor - Software @ http://40th.com/
iplay.40th.com iPlay advanced audio player
zircon.40th.com Zircon music player
Mar 12 '07 #15
#pragma comment(linker, "/NODEFAULTLIB:msvcrt80.lib")

The OP might use that as a trick to not link
to any embedded msvcrt.lib attribute, by adding

#pragma comment(linker, "/NODEFAULTLIB:msvcrt.lib")

to his project. It's worth a shot.
--
40th Floor - Software @ http://40th.com/
iplay.40th.com iPlay advanced audio player
zircon.40th.com Zircon music player
Mar 12 '07 #16
Hi Jeffrey!

I am not sure if this is still of interest, but I ran across a customer who
uses our software and had the very same problem.
As it turned out, he had copied a number of DLLs that were shipped with Visa
onto his XP system (and *please* don't ask me why people do this...). Among
those DLLs was the dwmapi.dll that had the fatal msvcrt.dll dependency to
the Vista version of msvcrt.dll which exports the _except_hander4...
Deleting that DLL solved the problem in his case.

Regards

Volker

url:http://www.ureader.com/msg/14523230.aspx
Jun 27 '08 #17
On Apr 22, 6:03 am, "Volker
Gimple"<v.DELETESPAMgim...@imaging.NOSPAM.dewrote:
Hi Jeffrey!

I am not sure if this is still of interest, but I ran across a customer who
uses our software and had the very same problem.
As it turned out, he had copied a number of DLLs that were shipped with Visa
onto his XP system (and *please* don't ask me why people do this...). Among
those DLLs was the dwmapi.dll that had the fatal msvcrt.dll dependency to
the Vista version of msvcrt.dll which exports the _except_hander4...
Deleting that DLL solved the problem in his case.

Regards

Volker

url:http://www.ureader.com/msg/14523230.aspx
Volker:

Thank you so much for sharing this finding!!! After installing my
Creative Sound card that came with a pack of XP and Vista drivers ---
I had the :

The procedure entry point except handler4 common could not be located
in the dynamic link library msvcrt.dll

while using my Safari browser (when minimizing/maximizing windows) and
with Photoshop CS3 --- the programs ran okay --- but the error was a
great annoyance ----

After long hours of searching for solutions --- including XP repair
(which I avoided) --- I found your post!

I searched my drive and found of dwmapi.dll file in my system32
directory and renamed it (in case I needed to recover it.

Now the error is gone!!! In my case the error was called by the
dependency call in the dwmapi.dll .

I really, really, really appreciate you letting us know about this !!!

It's a bad situation when new software trys to accommodate more than
one operating system --- and the .dll dependencies conflict --- these
errors are truly a nasty situation!

Thanks again!!!
Jun 27 '08 #18

After I build a MFC project under vista using vs 2008, I install it under XP.
when i run it, error was happened:
The procedure entry point _except_handler4_common could not be located in
the dynamic link library msvcrt.dll

why?
Aug 25 '08 #19

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kay | last post by:
I already specified to ignore specific library: MSVCPRT.lib MSVCRT.lib LIBC.lib MSVCRTD.lib LIBCD.lib command line is like: /INCREMENTAL /NOLOGO /DLL /NODEFAULTLIB:"MSVCPRT.lib MSVCRT.lib LIBC.lib...
0
by: bluter | last post by:
I have a problem with some VC++ (v5 sp3 compiled in debug mode) server component which perfrom Data Acces. These have been in production on NT4.0 and w2k. However when we try to use them on Server...
1
by: =?Utf-8?B?a2FybHJlbnR6aGVpbWVy?= | last post by:
When attempting to install Microsoft Office 2003 Professional Edition onto Windows Vista, an error message occurs stating that elevation is required to install. It is on an Acer laptop if that...
0
by: Accessed | last post by:
"(MSSQLSERVER) service is marked as an interactive service. However, the system is configured to not allow interactive services" This problems may solve a recurring failure in my automatic...
11
by: Dick Moores | last post by:
Windows XP Pro, Python 2.5.1 import msvcrt while True: if msvcrt.kbhit(): key = msvcrt.getch() if key == 'Enter' do something Is there a way to catch the pressing of the 'Enter' key?
0
by: Shadow of Socrates | last post by:
For AD Programing See below for Vista The error message &quot;A referral was returned from the server.&quot; means that the account, group, container or OU can not be found in the specified active...
2
by: =?Utf-8?B?TWlrZSBNaWtl?= | last post by:
Multiple problems I believe are related. First SqlDatasource in designer "Object reference not set to an instance of an object." I believe problems is caused by unable to read and bind the...
0
by: Daelm | last post by:
Hi, I having problems with a Vista Home Premium laptop, everytime I log on an error appears "Windows could not connect to the User Profile Service service. This problem prevents limited users from...
2
Fary4u
by: Fary4u | last post by:
i just create application in vb6 which required msinet.ocx file to execute msinet.ocx based into system32 directory there is no problem to running application in windows xp but when i'm trying...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.