This is an old revision of the document!


FIXME This page is not fully translated, yet. Please help completing the translation.
(remove this paragraph once the translation is finished)

USB Exported Control API > BS2_AllocateUsbContext


[+ 2.5.0] Allocates context which manages & controls USB device. Log and user data can be retrieved from USB device through the USB context.

Declaration

#include "BS_API.h"
 
void* BS2_AllocateUsbContext(const char* szDir);

Parameter

  • [In] szDir : USB device directory

NOTE
The logsObj variable needs to return the memory to the system by the BS2_ReleaseObject function after being used.

Return Value

Returns NULL when there is not enough system memory, if not, returns the allocated Context.

See Also