IInterfaceInfo.Source 속성

인터페이스의 소스 인지 여부를 나타내는 값을 가져옵니다-클라이언트, 전화 보다는 수신 대기 하는 인터페이스입니다.

네임스페이스:  Microsoft.VisualStudio.VsWizard
어셈블리:  Microsoft.VisualStudio.VsWizard(Microsoft.VisualStudio.VsWizard.dll)

구문

‘선언
ReadOnly Property Source As Boolean
bool Source { get; }
property bool Source {
    bool get ();
}
abstract Source : bool with get
function get Source () : boolean

속성 값

형식: System.Boolean
true 소스 인터페이스인 경우. 그렇지 않으면 false.

설명

클라이언트 인터페이스를 호출 하 여 (예를 들어,을 C++의 연결점) 대신 소스 인터페이스를 클라이언트에 전달 하는 인터페이스입니다.서버 호출 또는 여러 클라이언트 인터페이스를 허용 하는 경우 호출이 multiplexes을 하 고 클라이언트는 처리기를 구현 합니다.

하나의 인터페이스를 해당된 coclass에서 [원본]을 표시할 수 있습니다.

예제

// From the Visual C++ Member Variable wizard

function GenerateActiveXControlClassText(oTypeLib)
{
   var strClassText = "";

   var oInterfaces = oTypeLib.Interfaces;
   var nCount = oInterfaces.Count;

   var bGenerate_Array = new Array();
   var Name_Array = new Array();
   var Base_Array = new Array();
   var i;
   for (i = 0; i < nCount; i++)
   {
      var oInterface = oInterfaces.item(i+1);

      if (oInterface.CoClass != CONTROL_TYPE.text 
         || oInterface.Default == false 
         || oInterface.Source == true)
         continue;

      Name_Array[i] = oInterface.Name;
      Base_Array[i] = oInterface.Base;
      bGenerate_Array[i] = true;
   }
   for (i = 0; i < nCount; i++)
   {
      if (oInterface.CoClass != CONTROL_TYPE.text 
         || oInterface.Default == false 
         || oInterface.Source == true)
         continue;

      var strBase = Base_Array[i];
      if(strBase && strBase.length && 
         strBase!="IDispatch" && strBase!="IUnknown")
      {
         for(var j=0; j< nCount; j++)
         {
            if(strBase == Name_Array[j])
            {
               bGenerate_Array[j] = false;
               break;
            }
         }
      }
   }
   for (i = 0; i <  nCount; i++)
   {
      var oInterface = oInterfaces.item(i+1);
      if(!bGenerate_Array[i])
      {
         strClassText += "// Interface: " + Name_Array[i] + " not generated, because it was a base interface for others.\n\n";
      }
      else if (oInterface.Type == 2 
               && oInterface.CoClass == CONTROL_TYPE.text 
               && oInterface.Default 
               && !oInterface.Source)  // einterfaceDispinterface
      {
         strClassText += "// ";
         strClassText += Name_Array[i];
         strClassText += "\r\n\r\n// Functions\r\n//\r\n\r\n";
         strClassText += GetFuncText(oTypeLib, oInterface, strClassText);
      }
   }
   return strClassText;
}

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

IInterfaceInfo 인터페이스

Microsoft.VisualStudio.VsWizard 네임스페이스