I've generated an RCW and one of the methods takes a ref object (VARIANT*) now in my source I've got the following
byte[] thingy = new byte[1024]; thingy = Encoding.ASCII.GetBytes('Hello World"); To pass the byte thingy across to the COM world I have to change it to an object (I assume this is boxing? but notto sure how ref and boxing go together any links to help?) so the call is Object othingy = thingy; DoTheCall( ref othingy); Why can't I simply cast thingy at the time of call to an object like so DoTheCall( ref (object)thingy ); Regards, Robert Rolls **********************************************************************" This correspondence is for the named person's use only. It may contain confidential or legally privileged information or both. " No confidentiality or privilege is waived or lost by any " mistransmission. If you receive this correspondence in error, please immediately delete it from your system and notify the sender. You must not disclose, copy or rely on any part of this correspondence if you are not the intended recipient. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of Vodafone. This email has been checked for viruses. ********************************************************************************************** You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.