1 /* 2 * PROJECT: ReactOS Application compatibility module 3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) 4 * PURPOSE: Shim database string table interface 5 * COPYRIGHT: Copyright 2016 Mark Jansen (mark.jansen@reactos.org) 6 */ 7 8 #ifndef SDBSTRINGTABLE_H 9 #define SDBSTRINGTABLE_H 10 11 #ifdef __cplusplus 12 extern "C" { 13 #endif 14 15 16 /** 17 * Destroy the hashtable and release all resources. 18 * 19 * @param [in] table Pointer to table pointer, will be cleared after use 20 * 21 */ 22 void SdbpTableDestroy(struct SdbStringHashTable* * table); 23 24 /** 25 * Find an entry in the stringtable, or allocate it when an entry could not be found. 26 * - When the string specified does not yet exist, a new entry will be added to the table, 27 * and the pTagid specified will be associated with this string. 28 * - When the string specified does already exist, 29 * the TAGID associated with this string will be returned in pTagid. 30 * 31 * 32 * @param [in] table Pointer to table pointer, will be allocated when needed. 33 * @param [in] str The string to search for 34 * @param [in,out] pTagid 35 * the data written (in bytes) 36 * 37 * @return TRUE if the string was added to the table, FALSE if it already existed 38 */ 39 BOOL SdbpAddStringToTable(struct SdbStringHashTable* * table, const WCHAR* str, TAGID* pTagid); 40 41 42 #ifdef __cplusplus 43 } // extern "C" 44 #endif 45 46 #endif // SDBSTRINGTABLE_H 47