From 940b4d1848e8c70ab7642901a68594e8016caffc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 18:51:28 +0200 Subject: Adding upstream version 1:7.0.4. Signed-off-by: Daniel Baumann --- .../source/text/sbasic/shared/03090403.xhp | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 helpcontent2/source/text/sbasic/shared/03090403.xhp (limited to 'helpcontent2/source/text/sbasic/shared/03090403.xhp') diff --git a/helpcontent2/source/text/sbasic/shared/03090403.xhp b/helpcontent2/source/text/sbasic/shared/03090403.xhp new file mode 100644 index 000000000..2a4b3d519 --- /dev/null +++ b/helpcontent2/source/text/sbasic/shared/03090403.xhp @@ -0,0 +1,71 @@ + + + + + + + Declare Statement + /text/sbasic/shared/03090403.xhp + + + + + + +
+ + Declare statement + + + +Declare Statement + + DLL (Dynamic Link Library) + + +Declares and defines a subroutine in a DLL file that you want to execute from $[officename] Basic. +
+See also: FreeLibrary + +Syntax: + +Declare {Sub | Function} Name Lib "Libname" [Alias "Aliasname"] [Parameter] [As Type] + + +Parameters: + Name: A different name than defined in the DLL, to call the subroutine from $[officename] Basic. + Aliasname: Name of the subroutine as defined in the DLL. + Libname: File or system name of the DLL. This library is automatically loaded the first time the function is used. + Argumentlist: List of parameters representing arguments that are passed to the procedure when it is called. The type and number of parameters is dependent on the executed procedure. + Type: Defines the data type of the value that is returned by a function procedure. You can exclude this parameter if a type-declaration character is entered after the name. +To pass a parameter to a subroutine as a value instead of as a reference, the parameter must be indicated by the keyword ByVal. + +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 + + + +
\ No newline at end of file -- cgit v1.2.3