15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Recompiled MSVC4.1 project with MSVC4.2 miss URLMON.DLL

Peter Olesen -- peter.olesen@mailbox.swipnet.se
Thursday, August 08, 1996

Environment: Windows NT3.51(plain), MSVC4.2 prof.sub.

I just installed MSVC4.2 and recompiled my projekt and when I tried to start
the Debug version of the program I was informed that the DLL URLMON.DLL
could not be found. The release version did not have this problem.

When I did a dumpbin on the exe the following entrypoints where used in the
Debug version of the EXE:
 2   CreateAsyncBindCtx
 5   CreateURLMoniker
12   RegisterBindStatusCallback

The DLL does not exist in a normal installation of MSVC4.2 or on the entire CD!

URL Moniker tells me that this has to be some part of the internet support
in MFC, but my app does not use internet, but it use OLE drag and drop and
the "afxole.h" has a line:

#pragma comment(lib, "urlmon.lib")

I've tried to define _AFX_NOFORCE_LIBS to exclude the line but I've got tons
of unreferenced externals in the link.

Could anybody give me a hint how to turn off the internet stuff I don't need
or am I missing something??

tnxs in advs
Peter Olesen

//--------------------------------------------------------------------//
// (peter.olesen@mailbox.swipnet.se) - Me, myself and I               //
// (peter.olesen@actron.se) - Actron AB Sweden, Industrial Automation //
//                                                                    //
// "Support the Blue Ribbon Campaign for free speech online."         //
//--------------------------------------------------------------------//




Chet Murphy -- cmurphy@modelworks.com
Sunday, August 11, 1996

[Mini-digest: 4 responses]

Peter,

I discovered the same problem a few days ago when I tried to test a debug
version my project on NT4.0.  The only solution I know is to develop and
debug under Windows 95.

Chet Murphy
ModelWorks Software
cmurphy@modelworks.com
http://www.modelworks.com/express

----------
> From: Peter Olesen 
> To: mfc-l@netcom.com
> Subject: Recompiled MSVC4.1 project with MSVC4.2 miss URLMON.DLL
> Date: Thursday, August 08, 1996 2:44 PM
> 
> Environment: Windows NT3.51(plain), MSVC4.2 prof.sub.
> 
> I just installed MSVC4.2 and recompiled my projekt and when I tried to
start
> the Debug version of the program I was informed that the DLL URLMON.DLL
> could not be found. The release version did not have this problem.
> 
> When I did a dumpbin on the exe the following entrypoints where used in
the
> Debug version of the EXE:
>  2   CreateAsyncBindCtx
>  5   CreateURLMoniker
> 12   RegisterBindStatusCallback
> 
> The DLL does not exist in a normal installation of MSVC4.2 or on the
entire CD!
> 
> URL Moniker tells me that this has to be some part of the internet
support
> in MFC, but my app does not use internet, but it use OLE drag and drop
and
> the "afxole.h" has a line:
> 
> #pragma comment(lib, "urlmon.lib")
> 
> I've tried to define _AFX_NOFORCE_LIBS to exclude the line but I've got
tons
> of unreferenced externals in the link.
> 
> Could anybody give me a hint how to turn off the internet stuff I don't
need
> or am I missing something??
> 
> tnxs in advs
> Peter Olesen
> 
> //--------------------------------------------------------------------//
> // (peter.olesen@mailbox.swipnet.se) - Me, myself and I               //
> // (peter.olesen@actron.se) - Actron AB Sweden, Industrial Automation //
> //                                                                    //
> // "Support the Blue Ribbon Campaign for free speech online."         //
> //--------------------------------------------------------------------//
> 
-----From: Mike Blaszczak 

At 10:44 PM 8/8/96 +0200, you wrote:

> Environment: Windows NT3.51(plain), MSVC4.2 prof.sub.

Thanks.  But since your problem involves linking, it's really important
to know how you're building your project--are you using AFXDLL for
anything?  Are you building a DLL?  With what compilation model?
Are you building an EXE?  With which compilation model?

I don't think that information is going to _heavily_ influence my
answer to you, but having it would have enabled me to provide a few
more details to you.

>I just installed MSVC4.2 and recompiled my projekt and when I tried to start
>the Debug version of the program I was informed that the DLL URLMON.DLL
>could not be found. The release version did not have this problem.

The release builds and debug builds of all applications link slightly
differently. There are lots of contributing factors: the MFC DLLs
are split into four different DLLs if you're doing DEBUG-- if not,
you get one big DLL, for example.  There's also the way functions
are inlined. There's also a big difference in that a retail build turns
on aggressive optimizations in the compiler and that helps get more
unused code to fall out of your application -- and of MFC itself,
since the debug MFC isn't optimized and the retail version is.

>The DLL does not exist in a normal installation of MSVC4.2 or on the entire CD!

I think it does; I don't have the released MSVC 4.2 CD here at home
because I only just got the golden CDs myself on Friday.  But, there
should be a self-exctracting version of the ActiveX SDK in
the MSDEV\REDIST directory.  You're having this problem, in short, because
you're using a version of MFC that was built to be used with the ActiveX SDK
in addition to the regular Win32 SDK.  Since you don't have the ActiveX
SDK installed, you're getting errors about libraries that aren't installed.
If the self-extracting file isn't there, you can download the ActiveX SDK
from http://www.microsoft.com/ or ftp://ftp.microsoft.com/.

>URL Moniker tells me that this has to be some part of the internet support
>in MFC, but my app does not use internet, but it use OLE drag and drop and
>the "afxole.h" has a line:
>#pragma comment(lib, "urlmon.lib")

AFXOLE.H declares classes that MFC uses to make OLE support for you.  Some
of those classes support delayed data rendering, and one of the mechanisms
for that is via an OLE moniker that's actually tied to a remove file
identified by a URL (rather than a local file identified by a simple
file name, for example).

>I've tried to define _AFX_NOFORCE_LIBS to exclude the line but I've got tons
>of unreferenced externals in the link.

If you use _AFX_NOFORCE_LIBS, you must manually specify all of the libraries
that you'll need to.  If you edit the list of libraries in the project
setting line, you can avoid these errors. Since you didn't edit your list of
explicit
libraries, it only follows that you made matters worse by turning on
_AFX_NOFORCE_LIBS.

>Could anybody give me a hint how to turn off the internet stuff I don't need
>or am I missing something??

You're missing the ActiveX SDK.

Hopefully, I can get away with saying this only once on the list: Visual C++
4.2, as shipped, is built against a beta release of the ActiveX SDK and
the old (eg, Windows NT 3.51) version of the Win32 SDK.  Since the
ActiveX guys have finally dropped a shipping SDK, and since the
Windows NT 4.0 version of the Win32 SDK has stabilized, we can finally
redistribute their files.

The patch release, 4.2a, fixes a few bugs but most importantly carefully
integrates MFC with the shipping versions of the ActiveX and newest
Win32 SDK.  You ---> CAN NOT! <-- redistribute the beta versions of
the libraries and DLLs and headers in the beta SDK yourself.

.B ekiM
http://www.nwlink.com/~mikeblas/
These words are my own. I do not speak on behalf of Microsoft.

-----From: Mark Anderson 

Well, I had a problem sort of like that, It was because I had Fortran and 
Visual C++ installed, and I deleted the fortran without using the 
uninstal program, there are some files, EEN0SWT.DLL, or something like 
that, that the IDE couldn't find, it would start up so that I could code, 
but I couldn't take it into runtime debugging, I uninstalled and 
reinstalled everything (VC++) several times, when I finally installed and 
uninstalled fortran, everything worked like a charm :), don't understand 
it exactly, unless there was some registry entry, anyway, I couldn't find 
the DLL on the CD, that's why I bothered informing you, you might want to 
make a new project and add all your current source files. Although the 
reason escapes me at the moment, andyway, hope you enjoyed it, even if it 
doesn't help. ;)

        Mark Anderson 
        fizban@bart.et.byu.edu       378-4538      CTB 75H       

	May the Force be with you. -- Obi Wan Kenobi

-----From: Peter Olesen 

After been in contact with Microsoft i've known that this is a bug in
MSVC4.2, but it don't have any Q-number yet (96-08-11). It only show up if
the following is true:

- OS is Windows NT3.51
- Debug build
- Staticly linked with MFC
- OLE is enabled by including afxole.h or afxdisp.h

URLMON.DLL is part of the ActiveX SDK but not supported on NT3.51 and
therefore not installed.

WORKAROUND: link dynamicly with MFC. The release version can still be
statically linked with MFC.

Hope this can help anybody else
Peter Olesen

//--------------------------------------------------------------------//
// (peter.olesen@mailbox.swipnet.se) - Me, myself and I               //
// (peter.olesen@actron.se) - Actron AB Sweden, Industrial Automation //
//                                                                    //
// "Support the Blue Ribbon Campaign for free speech online."         //
//--------------------------------------------------------------------//




Ballerini Luca -- ballerini@esalab.it
Tuesday, August 20, 1996

Hi Peter here is the Microsoft article that can solve your problem:


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

The information in this article applies to:

 - The Microsoft Foundation Classes (MFC), included with:
   Microsoft Visual C++, 32-bit Edition, version 4.2


SYMPTOMS 

When attempting to run an application built with Visual C++ 4.2, an error
may be reported that the URLMON.DLL cannot be found. After this
error, the application will abort. 

This error will only occur if all of the following are true:

   - The operating system is Windows NT 3.51.

   - The executable is a debug build.

   - The project is statically linked to MFC library.

   - The project has enabled OLE functionality (directly or indirectly
     included afxole.h or afxdisp.h).


CAUSE 

The URLMON.DLL is the DLL that supports the URL moniker. It is a part of the
ActiveX SDK. The MFC library shipping with Visual C++ 4.2
takes advantage of this DLL for much of the Internet functionality added in
Visual C++ 4.2. URLMON.DLL is not supported on Windows NT
3.51. Therefore, the DLL is not installed to your Windows NT 3.51 System32
directory. 

MFC applications that target Windows NT 3.51 cannot use the URL moniker SDK
functions. However, an application that meets all of the
criteria listed in the Symptoms section of this article but does not use
these functions will still attempt to load the DLL. Therefore, the run time
error occurs. 

RESOLUTION 

To work around this problem, it is necessary to link the debug build of the
application with the MFC.DLL. The release build can continue to link
statically to MFC. To link the debug build of the application to the
MFC.DLL, select the project settings dialog under the Build menu choice in
Visual C++. Select the debug project in settings for list, and select "Use
MFC in a Shared Dll(mfc42(d).dll)" under the general settings tab. 

STATUS 

Microsoft has confirmed this to be a bug in the Microsoft products listed at
the beginning of this article. We are researching this problem and
will post new information here in the Microsoft Knowledge Base as it becomes
available. 

MORE INFORMATION 

Visual C++ 4.2 ships the URLMON.DLL as part of self-extracting

installation files axdist.exe and wintdist.exe. This is covered in the
\msdev\redist\redistrb.wri file. 

Additional reference words: 4.20 3.51 urlmon.dll vcbuglist420


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








At 22.44 08/08/96 +0200, you wrote:
>Environment: Windows NT3.51(plain), MSVC4.2 prof.sub.
>
>I just installed MSVC4.2 and recompiled my projekt and when I tried to start
>the Debug version of the program I was informed that the DLL URLMON.DLL
>could not be found. The release version did not have this problem.
>
>When I did a dumpbin on the exe the following entrypoints where used in the
>Debug version of the EXE:
> 2   CreateAsyncBindCtx
> 5   CreateURLMoniker
>12   RegisterBindStatusCallback
>
>The DLL does not exist in a normal installation of MSVC4.2 or on the entire CD!
>
>URL Moniker tells me that this has to be some part of the internet support
>in MFC, but my app does not use internet, but it use OLE drag and drop and
>the "afxole.h" has a line:
>
>#pragma comment(lib, "urlmon.lib")
>
>I've tried to define _AFX_NOFORCE_LIBS to exclude the line but I've got tons
>of unreferenced externals in the link.
>
>Could anybody give me a hint how to turn off the internet stuff I don't need
>or am I missing something??
>
>tnxs in advs
>Peter Olesen
>
>//--------------------------------------------------------------------//
>// (peter.olesen@mailbox.swipnet.se) - Me, myself and I               //
>// (peter.olesen@actron.se) - Actron AB Sweden, Industrial Automation //
>//                                                                    //
>// "Support the Blue Ribbon Campaign for free speech online."         //
>//--------------------------------------------------------------------//
>
>


******************************
Ballerini Luca Stefano
home: +39 (0)721-479154
ballerini@esalab.it
Esalab engineering and service
+39 (0)721-414634
******************************







rick cameron -- rick_cameron@msn.com
Saturday, October 05, 1996

Does anyone know just _why_ this happens? What is different in the debug build 
that causes references to these three functions?

Microsoft PSS told me that this bug is not likely to be fixed before MFC 5.0. 

It seems quite likely to me that we're getting some pieces of MFC 
(Internet-related stuff) that we don't need at all. I'd like to eliminate that 
code from my EXE, if possible.

- rick

owner-mfc-l@majordomo.netcom.com on behalf of Luca Ballerini wrote:
> Hi Peter here is the Microsoft article that can solve your problem:
> 
> 
> ----------------------------------------------------------------------------
> -----------------
> 
> The information in this article applies to:
> 
>  - The Microsoft Foundation Classes (MFC), included with:
>    Microsoft Visual C++, 32-bit Edition, version 4.2
> 
> 
> SYMPTOMS 
> 
> When attempting to run an application built with Visual C++ 4.2, an error
> may be reported that the URLMON.DLL cannot be found. After this
> error, the application will abort. 
> 
> This error will only occur if all of the following are true:
> 
>    - The operating system is Windows NT 3.51.
> 
>    - The executable is a debug build.
> 
>    - The project is statically linked to MFC library.
> 
>    - The project has enabled OLE functionality (directly or indirectly
>      included afxole.h or afxdisp.h).
> 
> 
> CAUSE 
> 
> The URLMON.DLL is the DLL that supports the URL moniker. It is a part of the
> ActiveX SDK. The MFC library shipping with Visual C++ 4.2
> takes advantage of this DLL for much of the Internet functionality added in
> Visual C++ 4.2. URLMON.DLL is not supported on Windows NT
> 3.51. Therefore, the DLL is not installed to your Windows NT 3.51 System32
> directory. 
> 
> MFC applications that target Windows NT 3.51 cannot use the URL moniker SDK
> functions. However, an application that meets all of the
> criteria listed in the Symptoms section of this article but does not use
> these functions will still attempt to load the DLL. Therefore, the run time
> error occurs. 
> 
> RESOLUTION 
> 
> To work around this problem, it is necessary to link the debug build of the
> application with the MFC.DLL. The release build can continue to link
> statically to MFC. To link the debug build of the application to the
> MFC.DLL, select the project settings dialog under the Build menu choice in
> Visual C++. Select the debug project in settings for list, and select "Use
> MFC in a Shared Dll(mfc42(d).dll)" under the general settings tab. 
> 
> STATUS 
> 
> Microsoft has confirmed this to be a bug in the Microsoft products listed at
> the beginning of this article. We are researching this problem and
> will post new information here in the Microsoft Knowledge Base as it becomes
> available. 
> 
> MORE INFORMATION 
> 
> Visual C++ 4.2 ships the URLMON.DLL as part of self-extracting
> 
> installation files axdist.exe and wintdist.exe. This is covered in the
> \msdev\redist\redistrb.wri file. 
> 
> Additional reference words: 4.20 3.51 urlmon.dll vcbuglist420
> 
> 
> ----------------------------------------------------------------------------
> -------------------
> 
> 
> 
> 
> 
> 
> 
> 
> At 22.44 08/08/96 +0200, you wrote:
> >Environment: Windows NT3.51(plain), MSVC4.2 prof.sub.
> >
> >I just installed MSVC4.2 and recompiled my projekt and when I tried to 
start
> >the Debug version of the program I was informed that the DLL URLMON.DLL
> >could not be found. The release version did not have this problem.
> >
> >When I did a dumpbin on the exe the following entrypoints where used in the
> >Debug version of the EXE:
> > 2   CreateAsyncBindCtx
> > 5   CreateURLMoniker
> >12   RegisterBindStatusCallback
> >
> >The DLL does not exist in a normal installation of MSVC4.2 or on the entire 
CD!
> >
> >URL Moniker tells me that this has to be some part of the internet support
> >in MFC, but my app does not use internet, but it use OLE drag and drop and
> >the "afxole.h" has a line:
> >
> >#pragma comment(lib, "urlmon.lib")
> >
> >I've tried to define _AFX_NOFORCE_LIBS to exclude the line but I've got 
tons
> >of unreferenced externals in the link.
> >
> >Could anybody give me a hint how to turn off the internet stuff I don't 
need
> >or am I missing something??
> >
> >tnxs in advs
> >Peter Olesen
> >
> >//--------------------------------------------------------------------//
> >// (peter.olesen@mailbox.swipnet.se) - Me, myself and I               //
> >// (peter.olesen@actron.se) - Actron AB Sweden, Industrial Automation //
> >//                                                                    //
> >// "Support the Blue Ribbon Campaign for free speech online."         //
> >//--------------------------------------------------------------------//
> >
> >
> 
> 
> ******************************
> Ballerini Luca Stefano
> home: +39 (0)721-479154
> ballerini@esalab.it
> Esalab engineering and service
> +39 (0)721-414634
> ******************************
> 
> 
> 
> 
> 





| Вернуться в корень Архива |