System.Dll NotFoundException

Questions about Wine on Linux
Locked
wine4work
Level 2
Level 2
Posts: 12
Joined: Tue Mar 28, 2023 3:26 am

System.Dll NotFoundException

Post by wine4work »

Hi, i'm running into a wall right and need some help cause the program i'm working on just won't get to run as it should. It says it's missing a dll but that file is in the same folder as the .exe and don't know what to do about this.
To be more precise i'm making a new Thread run and call a function that is on this custom dll. Could someone explain what i'm doing wrong or how to fix this? Thanks.
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: System.Dll NotFoundException

Post by jkfloris »

If you run Wine from the folder that contains the exe file, it should find the DLL file as well.
Or you could use wine start

Code: Select all

cd /path/to/exe
wine program.exe
# or
wine start /unix /path/to/exe/program.exe
If this does not help, you can use the loaddll and module winedebug channels to see what is going wrong.

Code: Select all

WINEDEBUG="+loaddll,+module" wine program.exe
wine4work
Level 2
Level 2
Posts: 12
Joined: Tue Mar 28, 2023 3:26 am

Re: System.Dll NotFoundException

Post by wine4work »

Thanks, this has demostrated that other dll's are being loaded but not this one i need in particular. Also tried to register this dll but couldn't.
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: System.Dll NotFoundException

Post by jkfloris »

Does the DLL file appear in the debug output? Or is the file just skipped?
You could also try to copy the DLL file to ~/.wine/drive_c/windows/system32/ or ~/.wine/drive_c/windows/syswow64.
wine4work
Level 2
Level 2
Posts: 12
Joined: Tue Mar 28, 2023 3:26 am

Re: System.Dll NotFoundException

Post by wine4work »

Have been looking it closer, seems it tries to load, and it does, but it puts me off that (wrapper managed-to-native) text..

Code: Select all

[2023/05/24 - 12:02:33.106]  CheckConnectionStatus:    C:\TPOSI\bin
0138:trace:loaddll:build_module Loaded L"C:\\TPOSI\\bin\\psnetworkstatus.dll" at 000000000AA90000: native
System.EntryPointNotFoundException: psNetworkStatus_startHostStatusService2 assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) wnstefconsole.Controller.psNetworkStatus_startHostStatusService2(intptr)
  at wnstefconsole.Controller.ComprobarEstadoConexion () [0x00985] in <5b8f269a2ae347d68eda3ac1de1e51ea>:0
[2023/05/24 - 12:02:33.119]  CheckConnectionStatus:    General error checking connection status. System.EntryPointNotFoundException: psNetworkStatus_startHostStatusService2 assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) wnstefconsole.Controller.psNetworkStatus_startHostStatusService2(intptr)
  at wnstefconsole.Controller.ComprobarEstadoConexion () [0x00985] in <5b8f269a2ae347d68eda3ac1de1e51ea>:0
[2023/05/24 - 12:02:33.119]  BREAKPOiNT:               This is where problem is
[2023/05/24 - 12:02:33.119]  BREAKPOiNT:               psNetworkStatus_startHostStatusService2 assembly:<unknown assembly> type:<unknown type> member:(null)
[2023/05/24 - 12:02:33.119]  BREAKPOiNT:               -------------------------------------------------------------------------------
if i take away the dll and move it to other place it makes no effect appart from the exception.message displaying psnetworkstatus.dll instead of psNetworkStatus_startHostStatusService2 inside the breakpoint log I made, thanks for the help.
Locked