~ubuntu-branches/ubuntu/maverick/librapi2/maverick

« back to all changes in this revision

Viewing changes to tests/rapi/CeFindAllDatabases.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Volker Christian
  • Date: 2004-03-25 15:38:55 UTC
  • Revision ID: james.westby@ubuntu.com-20040325153855-bcjmhydo8rufdgsv
Tags: upstream-0.8.9
ImportĀ upstreamĀ versionĀ 0.8.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "test.h"
 
2
 
 
3
int main()
 
4
{
 
5
        VERIFY_HRESULT(CeRapiInit());
 
6
 
 
7
        CEDB_FIND_DATA* find_data = NULL;
 
8
        WORD db_count = 0;
 
9
        
 
10
        TEST_NOT_FALSE(CeFindAllDatabases(0, 0xffff, &db_count, &find_data));
 
11
 
 
12
        printf("Number of databases: %u\n", db_count);
 
13
        for (unsigned i = 0; i < db_count; i++)
 
14
                printf("Database %3u: \"%s\" (oid=0x%x, type=0x%x, rows=%u)\n", i, 
 
15
                                from_unicode(find_data[i].DbInfo.szDbaseName), 
 
16
                                find_data[i].OidDb,
 
17
                                (unsigned)find_data[i].DbInfo.dwDbaseType,
 
18
                                find_data[i].DbInfo.wNumRecords);
 
19
        
 
20
        TEST_HRESULT(CeRapiFreeBuffer(find_data));
 
21
 
 
22
        VERIFY_HRESULT(CeRapiUninit());
 
23
        return TEST_SUCCEEDED;
 
24
}
 
25