locked
create folder with RAPI RRS feed

  • Question

  • hi to all

    i m new to windows mobile developement.

    i m trying to create new folder at C:\\ using RAPi.dll

    i have used the simple code like

     

     [DllImport("rapi.dll", CharSet = CharSet.Unicode)]

            public static extern bool CeCreateDirectory(string lpPathName, IntPtr lpSecurityAttributes);

     

     try   {

                    IntPtr ptr = IntPtr.Zero;

                    CeCreateDirectory("c:\\bin", ptr);

                }

                catch (DllNotFoundException err)

                {

                    MessageBox.Show(err.Message);

                }

    When i run this code then at the line

    CeCreateDirectory("c:\\bin", ptr); gives error

    Can't find PInvoke DLL 'rapi.dll'.

    so how can i load that dll. I have downloaded that dll but dont know what to do further.

    and please tell me how can i get basic knowledge of windows mobile.( Any tutorial).

    Thanks.

    Siddharth

    Tuesday, June 29, 2010 1:12 PM

Answers

  • Hi Sid_diu,

    This happens when your application is not able to find that rapi.dll file on device.

    And these dlls have to be put either in your application folder or inside the windows folder of the device.

    You have 2 option to do this:

    1. Either copy it manually to your mobile in Windows folder or your application folder.
    2. Include that dll in your project as a file and go to property of that dll file by right click on it.Then make
                        Copy always for Copy to output directory
    • Marked as answer by warrentang Monday, July 5, 2010 5:04 AM
    Wednesday, June 30, 2010 11:16 AM

All replies

  • Sounds like ActiveSync (Windows Mobile Device Centre) is not installed.
    Controls for WPF, Windows Forms and Silverlight at http://www.divelements.co.uk
    Tuesday, June 29, 2010 1:54 PM
  • Thanks for reply Tim Dawson

     

    i have already installed Active Sync 4.5.0 on my PC.

    Any other options? 

    Wednesday, June 30, 2010 4:32 AM
  • If you're getting an error saying rapi.dll was not found, then ActiveSync is not installed correctly on your PC. The fact that you said you had downloaded the dll, without mentioning correctly installing ActiveSync, makes me suspicious.
    Controls for WPF, Windows Forms and Silverlight at http://www.divelements.co.uk
    Wednesday, June 30, 2010 8:39 AM
  • Hello Sir,

    Thanks for reply Tim Dawson

    i have downloaded again Active Sync 4.5 but still having problem.

    Can u please tell me what is the exact procedure  to do this.

    And as i have asked in my first above post i want some good study materials to read it.

    If u can help me i will very thankful  to u.

    Thank for ur reply again.

    Wednesday, June 30, 2010 10:53 AM
  • Hi Sid_diu,

    This happens when your application is not able to find that rapi.dll file on device.

    And these dlls have to be put either in your application folder or inside the windows folder of the device.

    You have 2 option to do this:

    1. Either copy it manually to your mobile in Windows folder or your application folder.
    2. Include that dll in your project as a file and go to property of that dll file by right click on it.Then make
                        Copy always for Copy to output directory
    • Marked as answer by warrentang Monday, July 5, 2010 5:04 AM
    Wednesday, June 30, 2010 11:16 AM