Contents

# Declare Statement

sagantaa xiqqoofaayelii DLL keessaatti ibsuu fi qindeessuu kan LibreOffice Basic irraa raawwachuu barbaaddu.

Dabalataan ilaali: FreeLibrary

### Syntax:

    Declare {Sub | Function} Name Lib "Libname" [Alias "Aliasname"] [Argumentlist] [As Type]

### Parameters:

Maqaa: maqaan adda addaa kan DLL keessatti qindeeffame, sagantaa xiqqoo LibreOffice Basic irraa waamuuf.

Maqaa maqbirroo: Maqaa sagantaa xiqqoo DLL keessatti qindaa'e.

Libname: maqaa faayelii ykn sirna DLL ti.Faankishinii yeroo jalqabaa fayyadameen Manbarroo kun ofumaan fe'a.

Tarreeffama qajeelfamaa:Tarreeffama ulaagaalee qajeelfama bakka bu'an yeroo waamametti kan adeemsatti darbe.Gosti fi lakkoofsi ulaagaalee adeemsa raawwii irratti hundaa'a.

Gosa: gosa deetaa gatii adeemsa faankishiniin deebi'u qindeessa.Yoo arfiin gosa ibsituu maqaan booda gale ulaagaalee kan dhiisuu dandeessa.

ulaagaalee sagantaa xiqqaatti dabrsuuf akka gatiitti qooda wabii,ulaagaaleen dirqama jefuraa ByValagarsiifamu.

### Example:

    Declare Sub MyMessageBeep Lib "user32.dll" Alias "MessageBeep" ( Long )
    Sub ExampleDeclare
    Dim lValue As Long
        lValue = 5000
        MyMessageBeep( lValue )
        FreeLibrary("user32.dll" )
    End Sub

## Example 2

      REM When passing arrays by reference, do not specify the type of its elements.
      Declare Function GetDiag Lib "C:\\...\\Math.dll" _
         Alias "GetDiag" ( _
         ByVal varName As String, _
         A, _
         ByVal len As Long, _
         ByVal FunctionName As String, _
         B, _
         C) As Long
    Sub MyCode
      Dim A(100) As Long, B(100) As Long, C(100) As Long ' arrays
      R = GetDiag("f", A, 100, "g", B, C)
      Print R
    End Sub

Please support us!