New RDP 8 (mstscax.dll v6.2) embedded in Delphi 7 gives access violation
Asked Answered
E

0

6

My old Delphi 7 program with embedded RDP client have been working for years, but it gives Access Violations on Windows 8 and if you install RDP 8 on Windows 7, where the mstscax.dll file (with the ActiveX component) is updated to version 6.2.

Until recently my project had imported Type Library from mstscax.dll v6.0 and I was using TMsRdpClient5 if the GUID was in registry and otherwise TMsRdpClient2 for backwards compatibility with XP. To investigate this new problem, I installed RDP 8 on my Windows 7 32bit where my Delphi 7 resides, imported a new Type-Library MSTSCLib_TLB and this is my findings:

In all components I can set properties directly on the component like Domain and ColorDepth with no errors. But if I want to set properties like AdvancedSettings2.RDPPort, AdvancedSettings2.ClearTextPassword or SecuredSettings2.StartProgram, it results in "Access Violation in module mstscax.dll. Read of adress..."

All those properties resides in "sub interfaces", and the problem is that these functions in the imported library code (returning the "Sub interfaces") results in Access Violations:

function Get_AdvancedSettings2: IMsRdpClientAdvancedSettings;
function Get_SecuredSettings2: IMsRdpClientSecuredSettings;

What has Microsoft changed in mstscax.dll that the imported type library cannot interface with? Is it possible to import type library in the newest Delphi XE3 and use it in Delphi 7 and hope this would implement some new technology correctly?

My Delphi 7 has all updates installed. Any help would be greatly appreciated.

Elene answered 25/1, 2013 at 11:6 Comment(3)
You should suspect the typelib importer. See what has changed from the one you used to work with, and the newly imported one.Maniacal
Old typelib also doesnt work with RDP 8 and new typelib only adds more components TMsRdpClient6-8 and AdvancedSettings6-8Elene
If the new typelib includes definitions for those two functions, they're still available, and so are the interfaces they return. It's impossible to tell you why your code is causing an AV, because no one but you can see your code.Zhao

© 2022 - 2024 — McMap. All rights reserved.