Module
Contents
Index 🔎︎

# IsUnoStruct Function

如果给定的对象具有 Uno 结构，则返回 True。

## 语法：

    IsUnoStruct( Uno type )

## 返回值：

布尔

## 参数：

Uno type : A UnoObject

## 示例：

    Sub Main

    Dim bIsStruct

    ' Instantiate a service

    Dim oSimpleFileAccess

    oSimpleFileAccess = CreateUnoService( "com.sun.star.ucb.SimpleFileAccess" )

    bIsStruct = IsUnoStruct( oSimpleFileAccess )

    MsgBox bIsStruct ' 显示 False，因为 oSimpleFileAccess *不是*结构体

    ' Instantiate a Property struct

    Dim aProperty As New com.sun.star.beans.Property

    bIsStruct = IsUnoStruct( aProperty )

    MsgBox bIsStruct ' Displays True because aProperty is a struct

    bIsStruct = IsUnoStruct( 42 )

    MsgBox bIsStruct ' Displays False because 42 is NO struct

    End Sub