Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C0000..5 error when using Outlook automation
Message
From
28/07/2001 10:22:09
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
C0000..5 error when using Outlook automation
Miscellaneous
Thread ID:
00536843
Message ID:
00536843
Views:
49
Hi all,

Finally got my download of VFP7. The first thing I did was recompile an existing VFP6 app that has been in production use for a couple of years. I have a synchronization routine with outlook that never had a problem in 6, but crashes with the fatal C0000005 (whatever) error on the last line of code below.

** Get reference to outlook
oOutlook = LaunchOutlook() && uses GetObj
loSpace = oOutlook.GetNameSpace("MAPI")
loSelFolder = .NULL.
FOR EACH loFolder IN loSpace.Folders
IF ALLT(loFolder.name) == m.OLSyncFolder
loSelfolder = loFolder
EXIT
ENDIF
FOR EACH loSubFolder IN loFolder.Folders
IF ALLT(loSubfolder.name) == m.OLSyncFolder
loSelfolder = loSubFolder
EXIT
ENDIF
FOR EACH loSubX IN loSubFolder.Folders
IF ALLT(loSubX.name) == m.OLSyncFolder
loSelfolder = loSubX
EXIT
ENDIF
ENDFOR
ENDFOR
IF !ISNULL(loSelFolder)
EXIT
ENDIF
ENDFOR

IF ISNULL(loSelFolder)
=MESSAGEBOX("Folder '" + m.OlSyncfolder + "' is invalid or not found.",48,"System Message")
RETURN
ENDIF
** UPDATE
*- Reference the selected folder
*- Contact Items
IF Type("loSelfolder")<>"O"
=MESSAGEBOX("Invalid folder selected",48, "Sync Error!" )
RETURN
ENDIF

loContacts = loSelfolder.Items
----------------------------------

The loSelfolder object is an object at this point in the code.

Has anything changed in the COM interface that might cause this.

Thanks all,
Next
Reply
Map
View

Click here to load this message in the networking platform