Maybe the link relationship is not configured properly.
When is s.dll used first? Is it when loading (that is, when starting A) or running (when calling functions in S)?
If so When loading and debugging, a lib file is required to specify the function signature in the dll. It needs to be configured in the solution. You can refer to some of my notes:
If it is runtime, you need to pass loadLibrary, etc. function to use.