My client insists on using it this way. After some exploration, I finally found a solution.
The invocation of the smartcard is done through the SCard_XXX methods in Winscard.dll, which implements the following mechanisms:
- If the remote service TermService is disabled, it directly calls the local smartcard.
- If the program calling Winscard.dll is a Windows service, it directly calls the local smartcard.
- Otherwise, it determines that it is a remote call and forwards the invocation to the remote service.
Therefore, by changing the name of TermService or using a Windows service program, it is possible to achieve the invocation of the local smartcard.