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
Summary of Contents for Yocto-Display
Page 1: ...Yocto Display User Manual...
Page 2: ......
Page 40: ...34 www yoctopuce com...
Page 52: ...46 www yoctopuce com...
Page 84: ...78 www yoctopuce com...
Page 92: ...86 www yoctopuce com...
Page 130: ...124 www yoctopuce com...
Page 422: ...416 www yoctopuce com...