Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Outlook.dll weirdness


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-28-2008, 09:41 PM
Junior Member
 
Join Date: Sep 2007
Posts: 28
Question Outlook.dll weirdness

Hello all,

I'm writing a simple app for the device that will let you save and restore all your contacts and calendar events. I'm using wm5 and netcf 2 and basic4ppc v6.3.

I've encountered several problems I can't seem to figure out. It is related to my use of outlook.dll.

The optimized force qvga compilation gives the following error at runtime.

Quote:
System.typeloadexception: an error message cannot be displayed because an optional resource assembly containing it cannot be found at system.reflection.assembly.getype() at b4p.start..ctor() at B4P.start.main()
The non optimized compilation gives the following error.

Quote:
an error message cannot be displayed because an optional resource assembly cantaining it cannot be found.
The regular optimized compilation will run but then gives me the later of the two errors from time to time in the following code.

Code:
	For i = 0 To PCol_contacts.Count-1
		PCol_contacts.RemoveItem(i)
		label1.Text="Contact "&i&" removed"
	Next
	Msgbox("Removed all Contacts")
If I have 400 contacts it will produce an error after deleting 200, if I press yes to continue, then the error pops up after deleting 100, then at 50, then at 25, and so on. Very strange.

I encountered the following problem Problem with Contacts but I don't think it's related because for now I'm just ignoring the webpage field.

Any ideas?
Reply With Quote
  #2 (permalink)  
Old 05-29-2008, 02:21 PM
willisgt's Avatar
Senior Member
 
Join Date: Aug 2007
Location: Nacogdoches, Texas USA
Posts: 157
Default

If the problem is what I think it is, then this should fix it:

Code:
For i = PCol_contacts.Count-1 to 0 Step -1
		PCol_contacts.RemoveItem(i)
		label1.Text="Contact "&i&" removed"
	Next
Please let me know if this fixes the problem.


Gary
__________________
PC: Windows XP Pro SP3 / Basic4PPC v6.5
PPC: HTC 8925 (AT&T Tilt) / Windows Mobile 6
Reply With Quote
  #3 (permalink)  
Old 05-29-2008, 02:34 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,770
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Thanks for the nudge Gary. I see "what you think it is" and it explains an entirely different iteration problem I had a few months ago that I could not explain at the time. I missed the obvious in not trying a reverse iteration I guess
Reply With Quote
  #4 (permalink)  
Old 05-29-2008, 05:00 PM
willisgt's Avatar
Senior Member
 
Join Date: Aug 2007
Location: Nacogdoches, Texas USA
Posts: 157
Default

*sheepish grin* I suddenly feel like the little mouse that pulled a thorn from the lion's paw...
__________________
PC: Windows XP Pro SP3 / Basic4PPC v6.5
PPC: HTC 8925 (AT&T Tilt) / Windows Mobile 6
Reply With Quote
  #5 (permalink)  
Old 05-29-2008, 10:33 PM
Junior Member
 
Join Date: Sep 2007
Posts: 28
Default

Thank you Gary and agraham.

Reversing the iteration did solve one problem. So what is the theory here? Why an error after deleting half the contacts? Data structure bug?

The other problems turned out to be kinda silly. The QGVA compilation didn't work because I named the project outlook. When you compile in this mode it makes a dll named after the project name. This overwrites the original outlook.dll! I'll report this little bug.

For the non optimized compilation I just didn't include all the dlls.

Thanks again.
Reply With Quote
  #6 (permalink)  
Old 05-30-2008, 07:59 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

After removing contact number 0, contact number 1 becomes 0, contact 2 becomes contact 1... contact n becomes contact n-1.
This code will also work:
Code:
For i = 0 To PCol_contacts.Count-1
		PCol_contacts.RemoveItem(0)
		label1.Text="Contact "&i&" removed"
	Next
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
SMS in Outlook Alex812 Basic4ppc Wishlist 3 01-20-2008 10:32 AM
Problems with outlook.dll Gerd Bug Reports 5 12-14-2007 01:35 PM
outlook.dll with WM2003SE luckyluc78 Basic4ppc Wishlist 0 09-26-2007 09:41 AM
Error with Outlook.dll conf Questions & Help Needed 4 09-15-2007 06:06 AM
2 questions about Outlook Alex812 Questions & Help Needed 1 08-27-2007 07:54 PM


All times are GMT. The time now is 04:17 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0