BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-03-2007, 11:18 PM   #1 (permalink)
New Member
 
Join Date: Sep 2007
Model: 8800
PIN: N/A
Carrier: Don't know
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem of using desktop api

Please Login to Remove!

Hi all,
I'm trying to write a desktop add-in to sync contact data between PC and BB device. But when I connect to the simulator and trace the DesktopSample code, the GetCount() function of IRimTablesPtr is always return 0. Is there anything that I have missed? Please advice, thanks!


HRESULT __stdcall CDesktopSample::raw_Process (
IRimUtility * pRimUtility,
IRimDatabaseAccess * pRimDeviceAccess )
{
try {
IRimUtilityPtr utilities = pRimUtility; //wrap in a smar pointer for ease of use
IRimProgressPtr progress = utilities; //this will throw an exception if the query fails
IRimDatabaseAccessPtr p = pRimDeviceAccess; //create a smart pointer for ease of use
IRimTablesPtr tables = p->GetTables();


//get the contacts table
IRimTablePtr contactTable;
long nTable = tables->GetCount(); // always return 0

if(!nTable)
return 0;

for(long i=1; i<=nTable; i++)
{
_bstr_t tableName = tables->GetItem(_variant_t(i))->GetName();
if(tableName == _bstr_t("Contacts"))
{
contactTable = tables->GetItem(_variant_t(i));
}
}
....
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Allen Bradley 1747-L552 /C SLC 500 SLC 5/05 Processor 32K Memory F/W 10
$1399.99
Allen Bradley 1747-L552 /C SLC 500 SLC 5/05 Processor 32K Memory F/W 10 picture4-PCS MEMORY IC MT58LC32K36B4LG10 MICRON 58LC32K36B4LG10
$30.14
4-PCS MEMORY IC MT58LC32K36B4LG10 MICRON 58LC32K36B4LG10 picture15-PCS MEMORY IC V53C16258HT40 DRAM CHIP EDO 4M-BIT 5V MVC 53C16258HT40
$35.3
15-PCS MEMORY IC V53C16258HT40 DRAM CHIP EDO 4M-BIT 5V MVC 53C16258HT40 pictureMEMORY IC XC1702LVQ44C PROM SERIAL 2M-BIT 3.3V 44-PIN VTQ XC1702LVQ44C 1702LVQ44
$26.95
MEMORY IC XC1702LVQ44C PROM SERIAL 2M-BIT 3.3V 44-PIN VTQ XC1702LVQ44C 1702LVQ44 picture15-PCS MEMORY IC M29F016B70N1 40-PIN TSOP ST MICRO 29F016B70N1 M29F016B70N
$30.92
15-PCS MEMORY IC M29F016B70N1 40-PIN TSOP ST MICRO 29F016B70N1 M29F016B70N picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.