Closed PCAssistSoftware closed 4 years ago
Which version of VS/.NET/Windows are you using?
Is the pre-build script executed correctly in vs? There is an issue with the SendKeys in MSTSClib which is fixed with these commands:
Or just copy the MSTSCLib.dll and AxMSTSCLib.dll from my latest release in the Debug folder...
This is the line with the issue: https://github.com/BornToBeRoot/NETworkManager/blob/b0c66fd1a3f7befb20667dc4f4f0c6c7dfb4ee29/Source/NETworkManager/Controls/RemoteDesktopControl.xaml.cs#L308
VS 2019 / Windows 10 / .NET 4.7.2
Actually no the pre-build script didn't allow me to build, so I removed it, not knowing it was related, will add it back tomorrow and let you know exactly why it fails to build with the script enabled
It has nothing to do with the script as that is a build event and I can't get as far as building because of the error in the code as per original report - have attached screenshot this time which hopefully makes it clearer.
Can you delete the bin
and obj
folder and rebuild the solution with the working .ps1 pre build script.
These commands need to be executed to modify the MSTSCLib.dll to allow the additional arguments (pbArrayKeyUp
and plKeyData
) in the function SendKeys:
The pre build script does:
1) Build MSTSCLib.dll
and AxMSTSCLib.dll
with aximp.exe
from \system32\mstscax.dll
2) Decompile (ildasm.exe
), Modify and Compoile (ilasm.exe
) the MSTSCLib.dll
to use the SendKeys function (IMsRdpClientNonScriptable::SendKeys)
Deleting bin and obj and then rebuilding seems to have resolved the problem - thank you very much :)
Great!
Line 308 of RemoteDesktopControl.xaml.cs
Get
Argument 2 must be passed with the 'ref' keyword Argument 3 must be passed with the 'ref' keyword
This is with a fresh download from master branch when trying to build/run the code?