2025-04-27 07:49:33 -04:00

80 lines
1.4 KiB
C++
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "..\..\tigris.hxx"
#include <stdlib.h>
CXoverMap XMap;
int
_cdecl
main(
int argc,
char *argv[]
)
{
CHAR buf[512];
DWORD bufLen = 512;
PCHAR xxx;
InitAsyncTrace( );
XMap.Initialize( );
FILETIME filetime ;
GetSystemTimeAsFileTime( &filetime ) ;
xxx = "\tThisisthedata\tandhereitis";
XMap.CreateNovEntry(
123,
555,
filetime,
xxx,
strlen(xxx),
TRUE
);
if (XMap.CreateNovEntry(
123,
555,
filetime,
xxx,
strlen(xxx),
FALSE
)) {
printf("!!!Inserted twice!\n");
goto exit;
}
//
// Delete
//
#if 0
if (!XMap.DeleteNovEntry(
123,
555
)) {
printf("Cannot delete!\n");
goto exit;
}
#endif
if (XMap.SearchNovEntry(
123,
555,
buf,
&bufLen
) ) {
printf("bufLen %d buf %s\n",bufLen,buf);
} else {
printf("not found!\n");
}
exit:
XMap.Shutdown( );
TermAsyncTrace( );
return(1);
}