Sample declarations – PB Docs 125

Sample declarations

Suppose you have created a C dynamic library, SIMPLE.DLL,
that contains a function called SimpleFunc that
accepts two parameters: a character string and a structure. The
following statement declares the function in PowerBuilder, passing
the arguments by reference:

By default, PowerBuilder handles string arguments and return
values as if they have Unicode encoding. If SimpleFunc passes ANSI
strings as arguments, you must use this syntax to declare it:

Declaring Windows API functions

The Windows API includes over a thousand functions that you
can call from PowerBuilder. The following examples show sample declarations
for functions in the 32-bit Windows API libraries KERNEL32.DLL, GDI32.DLL,
and USER32.DLL.

note.png Windows API calls

Some 32-bit function names end with A (for ANSI) or W (for
wide). Use wide function names in PowerBuilder.

For a complete list of Windows API functions,
see the Microsoft Windows SDK documentation. For examples of PowerBuilder
declaration syntax and scripts, search for Windows API calls in
the Technical Documents section of the Sybase Web site
.

The following statements declare a function that gets the
handle of any window that is called by name, and a function that
releases the open object handle:

The following statement declares a function that draws a pie
chart based on the coordinates received:

The following statement declares an external C function named IsZoomed:

A script that uses IsZoomed is included
as an example in “Using utility functions
to manage information”
.

For more information about these functions,
see the Microsoft documentation in the MSDN Library
.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x