Greetings, I have a program which send out mails which works fine on a number of pc’s except on this Windows Server 2012 PC. It gives and error ClaRunExt.DLL could not be found.
I have tried installing c++ 2005,2013 redistributable, .net4.5 but no luck.
Any advice appreciated…
You didn’t say whether you confirmed that the ClaRunExt.DLL file exists in your application folder.
Hi yes , its there. Its just on this 1 particular pc where im having this issue
Maybe Process Monitor (aka procmon) could help you diagnose the problem. https://docs.microsoft.com/en-us/sysinternals/downloads/procmon.
If you’ve never used procmon, here’s a few tips to avoid problems:
- Use a good filter. I use “Process Name is myexe.exe”.
- Under the “Filter” menu, tell it to “Drop Filtered Events”. Otherwise you get thousands and thousands of events and it can bog down the system in very little time.
- Use Ctrl+E to enable/disable the capture of events.
As an aside, I get the following warning about the same file with every full compile. Don’t remember in which Clarion version it first began to display, but it’s been a long time. Always been curious if it is the same for everyone else.
clarunext.dll could not be copied. Error: The process cannot access the file because it is being used by another process.
Hi,
Relating to the aside, yes I have been getting the same thing as totalhip for a long time when building a standalone exe. The build process copies the DLL to the output folder rather than work with it in the Clarion folders themselves. I don’t know why SV do this. The exe will certainly run when deployed elsewhere without it.
Regards Jim
Hi Kayjee,
The error is misleading - it’s not that the DLL is missing, but some of the VC++ dependencies can not be found.
This has come up several times on the newsgroups.
There’s an issue with clarunext and it’s dependancies upon VC++ runtimes that aren’t always present, and a separate issue with Server 2016.
Several threads in the Clarion10 newsgroup cover this eg
Subject ’ clarunext .dll could not be found in Terminal services’
From Jan K. van Dalen
Date 15/05/2018
Quote
Yep we’ve had this misleading error too.
Quote from my post of 22/02/2017
The trouble with the stuff in clarunext .DLL is that it has a dependancy upon certain VC++ runtimes and they’re not always present.
So you could end up having to run the setup exe on lots of workstations.
I spent several days creating a Clarion app to access an ASP.NET WebService using the WebRequest wrapper in clarunext .DLL - all worked fine on my machine and several machines at the client site and at work.
But some of the machines didn’t work and running the clarunext setup.exe program didn’t fix the problem on any of the Windows 10 machines.
EnQuote
There’s also an issue with Server 2016 and clarunext .dll
It’s built with a target of .NET 4.5 which doesn’t work/like Server 2016
Diego posted a .NET 4.61 version on this newsgroup in the thread subject
" clarunext .DLL on Server 2016" 26/09/2017
EndQuote
If you can find ClaRunExtSetup.exe try running that.
Thanks for the feedback, I manage to claRunExtSetup.exe, installed it rebooted server, but still no luck.
At a loss at the moment…
I finally resolved this.
I installed every C++ redistributable.
Here is link to download all c++ that worked for me if anybody else gets stuck with this.
This is an old post. But it doesn’t seem to be answered.
The problem is, the error message is not correct. I suspect it wasn’t ever tested. I discover the error messae comes from the source code for clarunext. I wrote a little Clarion program that gives the correct error message for the error.
The error is encountered if you run your Clarion program on a Windows server.
The clarunext.dll is not missing. It is indeed on your server, and probably right there in your application folder.
The fix is easy. Copy the msvcr120.dll from your Window 11 (or 10) computer’s C:\Windows\SysWOW64 folder to the Windows Server, and put it in your application folder.
My msvcr120.dll is dated Feb 10, 2016 and has 971,584 bytes. -Bob
This is a question based on an old (2019) post I found when searching for info on ClaRunext.dll.
Must that .dll exist in the application folder? Could it be elsewhere? I have tried putting it in the same data folder as the .tps tables but with no luck.
A corollary question is why is it not linked into a standalone app built with link mode LIB?
Thanks for any insight you may offer.
Yes, ClaRunExt.dll can be in the application folder or on a search path.
I have tried putting it in the same data folder as the .tps tables but with no luck.
It doesn’t matter where the tps files are. It matters where the .exe is.
By “no luck” you probably mean, you are the getting the message: “ClaRunExt.DLL not found”.
As I mentioned in my March 2023 post, that message is wrong. The error is not that it can’t be found. If you look at the Clarion source code where that comes from, you can see it is not correct error message to display. Instead, the problem is the msvcr120.dll file is wrong.
You might be able to install C++ runtime to fix the program, but all you need is the msvcr120.dll file from Windows 10 or 11. My file is dated Feb 10, 2016 and has 971,584 bytes. I just add it to my application folder.
Re: your corollary question. I think it’s because the ClaRunExt was a separate tool and not part of the main Clarion program. It should have been, but they didn’t do it like that.
If you would like it, I created a little Clarion source program that give the correct error message instead of “ClaRunExt.DLL not found”. Here is the source.
PROGRAM
MAP
MODULE('Win64Api')
ClaRunExt_LoadLibrary(CONST *CSTRING pszModuleName), |
UNSIGNED, PASCAL, NAME('LoadLibraryA')
ClaRunExt_GetLastError(), ULONG, PASCAL, NAME('GetLastError')
END
END
INCLUDE('ClaRunExt.INC'),ONCE
ModuleName CSTRING('ClaRunExt.dll'),PRIVATE
CODE
h# = ClaRunExt_LoadLibrary (ModuleName)
e# = ClaRunExt_GetLastError()
IF h# = 0
MESSAGE('Get last error = ' & e# & |
'|' & ModuleName & ' failed to load.', |
'Load Library: Win64Api', ICON:Exclamation)
ELSE
MESSAGE(ModuleName & ' loaded successfully.' & |
'|Address handle = ' & FORMAT(h#, @n14) & |
'|Get last error = ' & e#, |
'Load Library: Win64Api', ICON:Asterisk)
END
Thank you. That has been more than helpful.
I should have include the LoadLib.prj. Here it is.
-- LoadLib #noedit #system win64 #model clarion dll #pragma debug(vid=>full) #pragma optimize(cpu=>586) #compile "LoadLib.clw" #link "LoadLib.exe"
Here is LoadLib.sln.
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 # Clarion 2.1.0.2447 Project("{12B76EC0-1D7B-4FA7-A7D0-C524288B48A1}") = "LoadLib", "LoadLib.cwproj", "{CC3E161E-6AE0-464A-9BA5-32B2AA1EACB4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {CC3E161E-6AE0-464A-9BA5-32B2AA1EACB4}.Debug|Win32.Build.0 = Debug|Win32 {CC3E161E-6AE0-464A-9BA5-32B2AA1EACB4}.Debug|Win32.ActiveCfg = Debug|Win32 {CC3E161E-6AE0-464A-9BA5-32B2AA1EACB4}.Release|Win32.Build.0 = Release|Win32 {CC3E161E-6AE0-464A-9BA5-32B2AA1EACB4}.Release|Win32.ActiveCfg = Release|Win32 EndGlobalSection EndGlobal
The Load Library Error Message helps, but still leaves a mystery why it fails. The Last Error Code will provide a clue e.g. 3=File not found.
Looking at ClaRunExt.DLL in Dependency Walker it appears statically linked to 22 exports in MSVCR120.DLL. So if that DLL was missing, or did not have those exports, then ClaRunExt.DLL would fail to load, but you would not know exactly why.
You could add similar code to what you have to check if you can LoadLibrary() for MSVCR120.DLL and report that failure. You could go a step further and try to GetProcAddress() on those 22 exports and report any failures. There is code for that in ClaRunExt.clw to call GetProcAddress() then TestFnPtr().
??2@YAPAXI@Z
??3@YAXPAX@Z
__CppXcptFilter
__FrameUnwindFilter
__clean_type_info_names_internal
__crtTerminateProcess
__crtUnhandledException
__dllonexit
_amsg_exit
_calloc_crt
_cexit
_crt_debugger_hook
_except_handler4_common
_initterm
_initterm_e
_lock
_malloc_crt
_onexit
_unlock
free
memcpy_s
strcpy_s