~~NOTOC~~ [[use_exported_control_api]] > [[BS2_AllocateUsbContext]] ---- ===== BS2_AllocateUsbContext===== ''[Deprecated]''[+ 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 ==== [[BS2_ReleaseUsbContext]]\\ [[BS2_GetUserDatabaseInfoFromDir]]\\ [[BS2_GetUserListFromDir]]\\ [[BS2_GetUserInfosFromDir]]\\ [[BS2_GetUserDatasFromDir]]\\ [[BS2_GetUserInfosExFromDir]]\\ [[BS2_GetUserDatasExFromDir]]\\ [[BS2_GetLogFromDir]]\\ [[BS2_GetLogBlobFromDir]]\\ [[BS2_GetFilteredLogFromDir]]