When we install our embedded vb application on a pocket pc we also install
files to support the DEVICETODESKTOP and DESKTOPTODEVICE api's. We run an
application from the desktop that uses these api's to copy a *.cdb to the
desktop as a *.mdb, and the reverse. This worked for years with pocketpc
devices. With WM5 we had to install the extra files (ADOCE runtimes), but
this has worked for months on devices with Windows Mobile 5 and Active Sync
4.1 or 4.2. The desktops are XP, W2k, or W2k3.
Recently this has started to fail on some machines. When the desktop app
calls DEVICETODESKTOP we get Error 53, file not found "c:\Program
Files\Microsoft ActiveSync\adofiltr.dll".
We declare the api as follows:
Private Declare Function DEVICETODESKTOP Lib _
"c:\program files\Microsoft ActiveSync\adofiltr.dll" ( _
ByVal desktoplocn As String, _
ByVal tablelist As String, _
ByVal sync As Boolean, _
ByVal overwrite As Integer, _
ByVal devicelocn As String) As Long
We then use it with syntax similar to:
lngReturnValue = DEVICETODESKTOP(App.Path & "\Data.mdb", _
"table1..table2..table2..", _
False, True, strCDBLocation & "Data.cdb")
Per suggestions in an old posting in this newsgroup, we tried declaring the
api with no hard coded path and placing the dll in the same folder as the
exe. We also tried passing a blank string for tablelist (no list of database
tables). We've tried reinstalling everything, but we still get the same
error. We have tried adofiltr.dll version 4.1 and 4.2, and tried with it in
several locations. Our applications (desktop and mobile) have not changed
since Spring.
We fear a recent update has altered security. We can't tell the difference
between installations where this works and where it fails. Any ideas or
suggestions.
--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net