mThis error in 2014r2

I am using the Chilkat_v9_5_0 ActiveX which works great in 2014r1 and r1.1 but in 2014r2 the first line line of the code below is causing the classes to fail and raise an exception but I have not idea what it is doing or what mThis actually does as it doesnt appear to be declared anywhere. As I say it works fine in version prior to r2. Anyone got any ideas what this line is trying to do or why it might be failing.

If mThis = Nil Then Raise New NilObjectException Dim func As New UnlockComponent_Func2(mThis.Ptr( 0 ).Ptr(872 )) Dim resultCode As Integer Dim Local_code_Param As Ptr Local_code_Param = COM.SysAllocString( code_Param ) Dim Return_retVal_Param As Integer resultCode = func.Invoke(mThis, Local_code_Param, Return_retVal_Param) COM.SysFreeString(Local_code_Param) If resultCode = 0 Then Return Return_retVal_Param Else // Throw Exception Raise New COM.COMException("Failed on UnlockComponent", resultCode) End If

Ok, I discovered that this turned out to be an issue if you call a method in an activex twice to unlock the component. Changed it so that I only call it once and it now works. Odd because I have not changed this code for ages and all worked before r2.