BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-03-2007, 05:54 AM   #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 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  
Old 09-03-2007, 11:08 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Perfect Storm's Avatar
 
Join Date: Dec 2006
Location: Ottawa
Model: 8900
OS: 4.6.1.114
Carrier: Rogers
Posts: 2,467
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Might I suggest a targeted audience: http://www.blackberryforums.com/developer-forum/
__________________
www.petermac.ca - Photo wallpapers only in BlackBerry Internet Browser
www.BBeXtras.com - Photo wallpapers sent to your BlackBerry
BlackBerry Themes
Offline  
Old 09-03-2007, 11:26 PM   #3 (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

Thanks for your information.
Offline  
Old 09-03-2007, 11:29 PM   #4 (permalink)
BBF Moderator
 
John Clark's Avatar
 
Join Date: Jun 2005
Model: Z30
OS: 10.2.1.x
PIN: s & needles
Carrier: AT&T
Posts: 34,703
Post Thanks: 4
Thanked 112 Times in 79 Posts
Default

Moved to the Developer's Forum
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

TELEPHONE OFFICE BUSINESS 10 PHONE VOIP SYSTEM 6 YR WARRANTY “INSTALLED”
$2538.0
TELEPHONE OFFICE BUSINESS 10 PHONE  VOIP SYSTEM 6 YR WARRANTY “INSTALLED”  pictureOne lot of 6 CISCO 7941 VOIP IP Business Phones CP-7941G Gray w/Stand WORKING
$224.99
One lot of 6 CISCO 7941 VOIP IP Business Phones CP-7941G Gray w/Stand WORKING pictureShoreTel IP 560G IP560G Black Office Phone VoIP w/ Handset & Stand
$150.0
ShoreTel IP 560G IP560G Black Office Phone VoIP w/ Handset & Stand pictureAvaya 9620 IP VOIP Business Office Telephone with Stand Lot of 400 Phones
$7500.0
Avaya 9620 IP VOIP Business Office Telephone with Stand Lot of 400 Phones  pictureAvaya 9611G IP VOIP Telephone Display Phone
$95.0
Avaya 9611G IP VOIP Telephone Display Phone picture






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