Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Getting RTS 173 error when calling native .dll from a managed .NET application

Getting RTS 173 error when calling native .dll from a managed .NET application


A .NET managed code application such as Windows Forms or WCF is trying to call a program which resides in a native code .dll. The program being called has the same name as the .dll and it is available in the current folder of the managed code application.

When the call is made an RTS 173 error occurs stating that the program cannot be found.

What could cause this?


There are a couple things that could cause the 173 error. The most common are:

1. The case of the program name in the call statement does not match that of the entry point name. If you do not specify the $SET CASE directive within the native program then the default is to convert the program-id to upper-case. If this is true then the call statement needs to use upper-case as well. If you do specify the CASE directive then it will generate the entry point name exactly as it is specified in the program-id.

2. The native .dll is not linked as dynamic and the run-time system cblrtsm.dll is not available within the PATH. The 173 error can mean that either the program being called cannot be found or one of it's dependencies cannot be found. Since a native .dll is dependent on the run-time system then cblrtsm.dll must be available when the program is called. That means that the native .dll should either be linked using the dynamic option so that the Windows registry will be used to find the run-time or you must set the PATH to include the location of cblrtsm.dll prior to running your application.


Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2015-03-05 15:19
Updated by:
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.