Hello list,

I am trying to interface the dallas TMex (ibutton) library to rebol. 
I'ts programmed (the library) in pascal so I don't know if it is 
possible to interface it with rebol. Sofar it is possible to open a 
session and do the first setup. After that.....?

The problem is with:

*short far pascal TMFirst(*
*long* /session_handle/*, *   // session handle for the desired 1-Wire 
network
*void far **/state_buffer/  // state buffer provided for the 1-Wire 
network session
*);

*and:

*short far pascal TMRom(*
*long* /session_handle/*, *   // session handle for the desired 1-Wire 
network
*void far **/state_buffer,/ // state buffer provided for the 1-Wire 
network session
*short far **/ROM/          // buffer to read or write from the internal 
ROM buffer
*);

*What do I do with the *state_buffer?
The doc says:

/state_buffer/

Specifies a pointer to a memory location that TMEX keeps all of the 
state information for the 1-Wire networks. This parameter is required by 
most TMEX API functions.

I tried in Rebol something like this:

tmfirst: make routine! [
    session [integer!]
    buffer [string!]
    return: [integer!]] tmex-lib "TMFirst"

I tried it even with a struct! but also no luck.

How do I define "buffer" and how do I pass the buffer-pointer to TMrom?
Rebol crashes or the buffer stay's empty.

Has someone tried this before or is this something way above my head???

Thanks for your time!

Tim
-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to