Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Error with Outlook.dll

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-12-2007, 09:46 AM
Knows the basics
 
Join Date: May 2007
Posts: 82
Default Error with Outlook.dll

When I run app with Outlook.dll I got error:

"An error occurred on sub app_start.

Line number: 5

Error description:
TargetInvocationException"

And I need a sample code to access Contacts in device, anybody help me?

Thank you.
Reply With Quote
  #2 (permalink)  
Old 09-12-2007, 11:29 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Do you run it on the device?
Outlook library is only supported on WM5.0 and WM6.0 devices.
If it is a WM5.0 device you should install .Net CF 2.0 and follow these instructions:
www.basic4ppc.com/netcf2.html
Reply With Quote
  #3 (permalink)  
Old 09-13-2007, 04:28 AM
Knows the basics
 
Join Date: May 2007
Posts: 82
Default

Yes, I run on device and my PPC use WM6.0
Reply With Quote
  #4 (permalink)  
Old 09-13-2007, 07:43 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Can you post the code that gives you the error message?

Here is a code to show all the contacts (from the library manual):
Don't forget to add the two objects and create a form with a ListBox.
Code:
<div align="left"><font face="Courier New"><font color="#008000">'Contact is a Contact object and ContactsCollection is a PimCollection  object.</font></font>
<font face="Courier New"><font color="#0000ff">Sub</font></font><font face="Courier New"> Globals</font>

<font face=
"Courier New"><font color="#0000ff">End Sub</font></font>

<font face=
"Courier New"><font color="#0000ff">Sub </font></font><font face="Courier New">App_Start</font>
<font face=
"Courier New">      Form1.Show</font>
<font face=
"Courier New">      Contact.New1</font>
<font face=
"Courier New">      ContactsCollection.New1("Contacts")</font>
<font face=
"Courier New">      ContactsCollection.SortItems("FirstName",false) </font><font face="Courier New"><font color="#008000">'sorts the  contacts using the first name field.</font></font>
<font face="Courier New"><font color="#0000ff">For </font></font><font face="Courier New">i = 0 </font><font face="Courier New"><font color="#0000ff">to </font></font><font face="Courier New">ContactsCollection.Count - 1</font>
<font face=
"Courier New">            Contact.Value = ContactsCollection.GetItem(i)</font>
<font face=
"Courier New">            ListBox1.Add(Contact.FirstName & " " & Contact.LastName) </font><font face="Courier New"><font color="#008000">'Add the contact's first and last name to ListBox1.</font></font>
<font face="Courier New"><font color="#0000ff">Next</font></font></div><font face="Courier New"><font color="#0000ff">End Sub
</font></font>
Reply With Quote
  #5 (permalink)  
Old 09-15-2007, 05:06 AM
Knows the basics
 
Join Date: May 2007
Posts: 82
Default

Thank you, Erel

I run your code and got an errror:

"Line 11

Error description:
Syntax error."

What's wrong?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
New Outlook library Erel Announcements 13 11-07-2008 02:39 PM
Outlook.dll weirdness kolbe Questions (Windows Mobile) 5 05-30-2008 06:59 AM
Error loading pogram.\folder\Outlook.dll berndgoedecke Questions (Windows Mobile) 6 04-22-2008 03:24 PM
SMS in Outlook Alex812 Basic4ppc Wishlist 3 01-20-2008 09:32 AM
Outlook.dll error after compiling Graley Questions (Windows Mobile) 1 09-14-2007 05:30 PM


All times are GMT. The time now is 11:11 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0