
halt
;
end
;
// forces a device inventory
if(
yapiUpdateDeviceList
(
1
,errmsg
)
<
0
)
then
begin
writeln
(
errmsg
)
;
halt
;
end
;
// loads all device handles into dataBuffer
if
yapiGetAllDevices
(
@dataBuffer,
sizeof
(
dataBuffer
)
,neededsize,errmsg
)
<
0
then
begin
writeln
(
errmsg
)
;
halt
;
end
;
// gets device info from each handle
for
i:=
0
to
neededsize
div
sizeof
(
integer
)
-
1
do
begin
if
(
apiGetDeviceInfo
(
dataBuffer
[
i
]
, devinfos, errmsg
)
<
0
)
then
begin
writeln
(
errmsg
)
;
halt
;
end
;
writeln
(
pansichar
(
@devinfos.
serial
)
+
' ('
+
pansichar
(
@devinfos.
productname
)
+
')'
)
;
end
;
end
.
VB6 and yapi.dll
Each entry point from the yapi.dll is duplicated. You will find one regular C-decl version and one
Visual Basic 6 compatible version, prefixed with
vb6_
.
21.4. Porting the high level library
As all the sources of the Yoctopuce API are fully provided, you can very well port the whole API in
the language of your choice. Note, however, that a large portion of the API source code is
automatically generated.
Therefore, it is not necessary for you to port the complete API. You only need to port the
yocto_api
file and one file corresponding to a function, for example
yocto_relay
. After a little additional work,
Yoctopuce is then able to generate all other files. Therefore, we highly recommend that you contact
Yoctopuce support before undertaking to port the Yoctopuce library in another language.
Collaborative work is advantageous to both parties.
21. Using with unsupported languages
132
www.yoctopuce.com
Содержание Yocto-Display
Страница 1: ...Yocto Display User Manual...
Страница 2: ......
Страница 40: ...34 www yoctopuce com...
Страница 52: ...46 www yoctopuce com...
Страница 84: ...78 www yoctopuce com...
Страница 92: ...86 www yoctopuce com...
Страница 130: ...124 www yoctopuce com...
Страница 158: ...22 High level API Reference 152 www yoctopuce com On failure throws an exception or returns a negative error code...
Страница 422: ...416 www yoctopuce com...
Страница 424: ...24 Characteristics 418 www yoctopuce com...