RAPI For Vista

Last post 09-30-2008 7:59 by GavinZac. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 02-08-2008 4:00

    RAPI For Vista

    Hello
    I want to use synchronise my mobile device data with vista system..
    As Windows vista does not support ActiveSync so how can i accomplish this.
    Can I use the same OpenNETCF.DesktopCommunication.dll to do that...
    Please help me

    Thanks and Regard
    Bijaya

    Bijaya Kumar pathia
  • 02-11-2008 1:59 In reply to

    • Neil
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-30-2007
    • North Wales
    • Posts 1,152

    Re: RAPI For Vista

    Yes you can. Depending on what you are doing, we've had some reports that you may need to run with elevated privileges. You can get the latest code from our Subversion repository

    Neil Cowburn
    Principal Partner
    OpenNETCF Consulting, LLC

    This posting is provided "AS IS" with no warranties, and confers no rights.

  • 04-11-2008 11:23 In reply to

    Re: RAPI For Vista

    I've been using OpenNETCF RAPI with XP for months and it works fine, however I'm having problems with Vista 64-bit.  CopyFileToDevice works with 32-bit Vista but throws an exception with 64-bit Vista.  The file *does* show up on the device, but does not oeprate (it's a .cab file).  The exception is "An arithmetic operation caused an overflow" (or something similar).  Any ideas on what's happening?

     

    Thanks,
    Randall Johnson
    Celio Corp

  • 06-15-2008 11:42 In reply to

    • Kevlar
    • Top 200 Contributor
    • Joined on 06-15-2008
    • Posts 3

    Re: RAPI For Vista

     Hello,

    I've been  trying to compile / run the RAPICSharp sample app on Vista64.  I have been having the same problem as Randall.    NOTE: I also tried running it as admin with no luck.  I think I'm going to try to fix this myself, but it's going to take some time since I don't know anything about RAPI. LOL.

    I will try to post this in the bug reporting tool if it isn't already there, but here is the error I get...

    System.OverflowException was unhandled
      Message="Arithmetic operation resulted in an overflow."
      Source="mscorlib"
      StackTrace:
           at System.IntPtr.op_Explicit(IntPtr value)
           at OpenNETCF.Desktop.Communication.RAPI.SetDeviceFileTime(String FileName, RAPIFileTime DesiredTime, DateTime NewTime)
           at OpenNETCF.Desktop.Communication.RAPI.CopyFileToDevice(String LocalFileName, String RemoteFileName, Boolean Overwrite)
        

  • 09-15-2008 21:03 In reply to

    • jleni
    • Not Ranked
    • Joined on 09-16-2008
    • Posts 1

    Re: RAPI For Vista

    I did fix this problem. How can I contribute?
  • 09-30-2008 6:21 In reply to

    Re: RAPI For Vista

     RAPI doesn't work for me on Vista, I get an error thrown that informs me that an "object or method is not implemented"; it's being thrown by OpenNETCF.Desktop.Communication.ActiveSync.ConnectNow();

  • 09-30-2008 6:24 In reply to

    • Neil
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-30-2007
    • North Wales
    • Posts 1,152

    Re: RAPI For Vista

    What happens when you call RAPI::Connect?


  • 09-30-2008 6:27 In reply to

    • Neil
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-30-2007
    • North Wales
    • Posts 1,152

    Re: RAPI For Vista

    jleni:
    I did fix this problem. How can I contribute?

    I think this has already been fixed. You should check against the latest code in our Subversion repository. If it hasn't been fixed, follow the guidelines in the FAQ.


  • 09-30-2008 7:59 In reply to

    Re: RAPI For Vista

    Turns out that a simple:

    myRAPIObject.Connect();

    works. D'oh!

    I think I must have been using the ActiveSync.ConnectNow() incorrectly. On a related note, itspossible to detect that a system is running Vista (or higher) via code so maybe it would be a good idea to have a more informative error for when people try to use the ActiveSync methods on Vista

    public static bool IsVistaOrLater
    {
    get
    {
    return Environment.OSVersion.Platform ==
    PlatformID.Win32NT && Environment.OSVersion.Version.Major >= 6;
    }
    }
    I'm not pointing this out in an "aren't I clever" kind of way, I'm pointing it out in a "gah! I am an idiot who spent 4 hours fiddling with this and I need every bit of help I can get" way :o

Page 1 of 1 (9 items)