Microsoft KB Archive/240416

= You may receive the "Runtime error '53': file not found" error message when exported DLL functions are called from an MTS component =

Article ID: 240416

Article Last Modified on 10/11/2005

-

APPLIES TO


 * Microsoft Transaction Services 1.0
 * Microsoft Transaction Services 2.0

-



This article was previously published under Q240416



SYMPTOMS
When you call an exported Dynamic Link Library (DLL) function from a Microsoft Transaction Server (MTS) component that is opened as a Server Package, you may receive the following error message:

Runtime error '53': File not found.

The placeholder  is the name of your DLL.



CAUSE
This problem occurs when your DLL is not in the search path.



RESOLUTION
To resolve this problem, move your DLL to the %SystemRoot%\System32 folder.



MORE INFORMATION
Typically, you want to put your DLL in the same directory as the registered MTS component. You can then expect the search order to first examine the current folder and then to examine the default search path. This is true for an EXE application that calls a Component Object Model (COM) component that is not instantiated in an MTS environment. This is true as long as the component and your DLL are in the same folder. This also works for a component that is instantiated in an MTS environment and configured to be opened as a Library Package.

The problem that this article discusses occurs when an MTS component is opened as a Server Package. In this case, the component is created in the Mtx.exe isolated process space. By default, Mtx.exe is located in the %SystemRoot%\System32. Therefore, Mtx.exe cannot find your DLL unless your DLL is in the search path.

When you create a DLL that is called from an MTS component that is opened as a Server Package, you are supposed to deploy your DLL in the %SystemRoot%\System32 folder. You want to do this so that this problem does not occur.

Note When you open an MTS component, you have the following packages to select between:
 * Library Package

Components are opened in the creators process.
 * Server Package

Components are opened in a dedicated server process.

Additional query words: path directory

Keywords: kbinfo kbtshoot kbprb KB240416

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.