0 Replies Latest reply on Apr 26, 2013 8:32 AM by Gelowitz

    InDesign 5.0.4 on Windows 7 - Return argument has an invalid type


      We have a VB.NET application using the InDesign SDK.  This works perfectly on Windows XP, but is failing on Windows 7 64-bit.


      The line of code that it is failing on is:
      myInDesign.ScriptPreferences.UserInteractionLevel = InDesign.idUserInteractionLevels.idNeverInteract


      The error message that we receive is:
      System.InvalidCastException: Return argument has an invalid type.
      at System.Runtime.Remoting.Proxies.RealProxy.ValidateReturnArg(Object arg, Type paramType)
      at System.Runtime.Remoting.Proxies.RealProxy.PropagateOutParameters(IMessage msg, Object[] outArgs, Object returnValue)
      at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
      at InDesign._Application.get_ScriptPreferences()


      Any ideas as to why setting the UserInteractionLevel is failing on Windows 7 64-bit and not Windows XP?

      How can we solve this?