Article ID: 240416 - View products that this article applies to.
This article was previously published under Q240416
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:
The placeholder yourfile.dll is the name of your DLL.
Runtime error '53': File not found (yourfile.dll).
To resolve this problem, move your DLL to the %SystemRoot%\System32 folder.
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:
Article ID: 240416 - Last Review: October 11, 2005 - Revision: 1.1