VCActiveXReference.TypeLibraryName 속성
ActiveX(COM) 형식 라이브러리 참조의 이름을 가져옵니다.
네임스페이스: Microsoft.VisualStudio.VCProjectEngine
어셈블리: Microsoft.VisualStudio.VCProjectEngine(Microsoft.VisualStudio.VCProjectEngine.dll)
구문
‘선언
ReadOnly Property TypeLibraryName As String
string TypeLibraryName { get; }
property String^ TypeLibraryName {
String^ get ();
}
abstract TypeLibraryName : string with get
function get TypeLibraryName () : String
속성 값
형식: System.String
형식 라이브러리 참조의 이름을 나타내는 문자열입니다.
설명
ActiveX (COM) 형식 라이브러리에 참조 되지 않는 한이 속성이 빈 문자열을 반환 합니다.
이 샘플을 컴파일하고 실행하는 방법을 보려면 방법: Visual C++ 코드 모델 확장성에 대한 예제 코드 컴파일을 참조하십시오.
예제
[Visual Basic]
이 예제 솔루션의 각 프로젝트 반복 하 고 각 ActiveX (COM) 컨트롤의 형식 라이브러리 이름을 나열 합니다.
' Add a reference to Microsoft.VisualStudio.VCProjectEngine and have a
' Visual C++ project loaded before running this example. Also, you
' should have at least one ActiveX (COM) reference in a project.
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module1
Sub Test()
Dim proj As Project
Dim vcproj As VCProject
Dim ref As VCReference
Dim axref As VCActiveXReference
On Error Resume Next
' Loop each project in the solution.
For Each proj In DTE.Solution.Projects
vcproj = Nothing
vcproj = CType(proj.Object, VCProject)
' If this project is a Visual C++ project.
If Not vcproj Is Nothing Then
' Loop the references for this Visual C++ project.
For Each ref In vcproj.VCReferences
axref = Nothing
axref = CType(ref, VCActiveXReference)
' If this reference is an ActiveX reference.
If Not axref Is Nothing Then
MsgBox("Type library name: " & _
axref.TypeLibraryName)
End If
Next
End If
Next
End Sub
End Module
.NET Framework 보안
- 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.