Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 01:41:43 +0000



Post From: LINK : fatal error LNK1104: cannot open file 'C:\SierraChart\Data\your_dll_name.dll'

[2019-09-26 05:43:38]
User569373 - Posts: 13
Hi,

Today I got again the error "LINK : fatal error LNK1104: cannot open file 'C:\SierraChart\Data\your_dll_name.dll' ". This happens from time to time (weeks/months) during development.

Usually it happens after a crash of Sierra Chart due to my own programming errors. It doesn’t happen each time after a crash, but in my case it was after some crashes.

Symptoms: You suddenly get the error above when you build your advanced study DLL. In the message log window you see the line “Unloading DLL C:\SierraChart\Data\ your_dll_name.dll | 2019-09-26 01:04:46.745”. This says Sierra Chart tries to unload the DLL. It doesn’t matter if Sierra Chart was successful unloading -> in fact it was not. As an example, you can check with the Microsoft Sysinternal Tool “Process Explorer” (refer to other internet posts how doing this). There you can see, that the DLL is still connected to the Sierra Chart process. After a successful unload this is not the case.

“Release All DLLs and Deny load” does not help.
“Release Single DLLs and Deny load” does not help.
Freeing up the DLL via UDP Port (refer to other Sierra Chart posts) does not help.

My Solution: Perform a windows registry search with regedit. Search about your DLL name. In my case it was found the following entry:

[HKEY_USERS\S-1-5-21-137675215-4240082731-3378321674-1001\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]

"C:\\SierraChart\\SierraChart_64.exe"="$ IgnoreFreeLibrary< your_dll_name.dll'.dll>"

IgnoreFreeLibrary: As I understood, this tells the OS to ignore DLL unload requests regarding this specific DLL. This entry suddenly appears. This is not only related to Sierra Chart.

It is good practice to export the Registry Hive you want to work on before you make changes to a registry entry. Remove ONLY the line regarding your DLL. In my case this was:

"C:\\SierraChart\\SierraChart_64.exe"="$ IgnoreFreeLibrary< your_dll_name.dll'.dll>"

Reboot the computer. If you are lucky you are done.

User569373