Friend procedure is callable from amodule that is outside theclass, but part of the project within which the class is defined. This error has the following causes and solutions:

  • You tried to call the Friend procedure of a class. Although your reference variable is of the proper type, the variable points to an instance that isn’t an instance of the class. For example, this can occur if there are two classes, class ics and class y (that implements class y ), but you mistakenly assign the instance of classy to the instance of class ics.
  • You tried to access a Friend property or method either cross-process or cross-thread. Friend procedures are not part of a class’s public interface, so they cannot be marshaled cross-process or cross-thread.