Connection to desktopPC using ActiveSync via WLAN

  • Thread starter Thread starter Christiane Duethorn
  • Start date Start date
C

Christiane Duethorn

Hi there,

a while ago I posted a message asking how to start ActivieSync
programmatically from my .net CF Application. I'm now using the
Opennet.Winapi.core.createProcess(repllog.exe", "/sync"), which seems to
work fine apart from the first connection taking a very long time. Once
the connection is established there are no problems transferring files
with file.copy.
My device has its own IP address, I have gateway and DNS setup properly
to get into our LAN and I've established a partnership to my desctopPC
with ActiveSync and I have a network share for a directory on my
desktopPC. Does anybody have any experiences with ActiveSync and WLANs,
how can I find out what parameters there are for repllog? Where is the
difference between parameter '/sync' and '/remote'?
Thanks very much in advance
Christiane
 
Hi christiane,
If you want to access files on your LAN, I don't think you have to use
ActiveSync.
We access files on our LAN over Wi-Fi and we do it without ActiveSync.

i.e. File.Copy ("\\SERVER_NAME\C$\FOLDER1\FILE_NAME.EXTENSION", "\LOCAL
FOLDER\LOCAL_FILE_NAME.EXTENSION");

The first time you try to execute this code it will ask for your network
credentials (username, password, domain). From then on, it will not ask you
again because it registers the data on the device.

We are trying to find a way to pass the network credentials programmaticaly
without having to go through the standard Pocket PC Networking dialog.

thank you.
 
If you solve your problem: pass the network credentials programmatically
without having to go through the standard Pocket PC Networking dialog.

The please post the solution here.

I tried to port a VB.Net solution for such from a Windows Application to a
Compact framework one, but can't get it to work as a Smart Device
application. It complies fine, but the code, when run, produces the error
"Not supported exception"

I am using:

<System.Runtime.InteropServices.DllImport("mpr.dll", SetLastError:=False)> _
Public Shared Function WNetAddConnection2W(ByVal
objNetResource As NETRESOURCE _
, ByVal strPassword As
String _
, ByVal lngUserName As
String _
, ByVal lngFlags As Int32)
As Integer

End Function
 
Hello,

Thanks very much for your post. I suppose you are right, I've taken the
ActiveSync part out of my application and it still works fine - apart
from being ever so slow the first time the connection is set up. I don't
think the problem is in my application because setting up the connection
using the file explorer with the shared network resource on the same PC
I'm using from my app takes a long time too.
Are there any networksettings I could check? Any ideas?

Passing the network credentials would be a good idea but I haven't put
any effort into this topic yet.

TIA
Christiane
 
Back
Top