Hi,
Rene W. Olsen wrote:
Now I have found whats is wrong.. if I calles my main interface "main" I get an extra Obtain() call like this [...] So that do I do know?
What you see is an oversight in Exec: Normally, old libraries provide a main interface with all the previous functionality, named "main". When calling OpenLibrary, it automatically executes GetInterface(.., "main", ...), since this is used by legacy jump tables.
To prevent this from happening, add the tag item
CLT_NoLegacyIFace, TRUE,
to the CreateLibrary tag list.
I'm not sure, though, if that's already in the released kernel. You might want to add the tag nontheless (it's not rejected because of this). If it's not part of your header files, it's defined as
#define CLT_NoLegacyIFace (TAG_USER + 12)
If in doubt, give the interface a meaninngful name. In the case of libusb, "usb" might be a good idea.
Regards,