hello to all fellows
i am using VS 2003 with CF 1.0 and C#. i have pocket PC (Windows
Mobile 5.0). my task is to vibrate a pocket pc with p/invoke. i have
found a solution but it is not working in my favour. it gives me
exception Missing Method Exception
my code is
[DllImport("aygshell.dll")]
private static extern int Vibrate(int cvn,IntPtr rgvn,bool
fRepeat,uint dwTimeout);
public static bool Play()
{
int result = Vibrate(0, IntPtr.Zero, true, 0xffffffff);

if(result!=0)
{
return false;
}
return true;
}

[DllImport("aygshell.dll")]
private static extern int vibrateStop();
public static bool Stop()
{
int result = vibrateStop();

if(result!=0)
{
return false;
}
return true;
}
but when i call play() for vibration MissingMethod Exception occurs.
can anyone give me solution
regards
Hassan Mushtaq

Re: Vibrate Windows Mobile 5.0 with P/Invoke by Christian

Christian
Sat Mar 08 10:20:50 CST 2008

The Vibrate API is only for Smartphones. You can use the Notification LED
driver for vibrating a Pocket PC.
http://msdn2.microsoft.com/en-us/library/aa917805.aspx

OpenNETCF made some nice wrappers for it in their Smart Device Framework
(OpenNETCF.Notification.Led)

--
Regards,
Christian Resma Helle
http://christian-helle.blogspot.com


"hassanmushtaq" <hassangugu@gmail.com> wrote in message
news:51aca1e0-b2b3-4492-a258-44e046c9c0a2@o77g2000hsf.googlegroups.com...
> hello to all fellows
> i am using VS 2003 with CF 1.0 and C#. i have pocket PC (Windows
> Mobile 5.0). my task is to vibrate a pocket pc with p/invoke. i have
> found a solution but it is not working in my favour. it gives me
> exception Missing Method Exception
> my code is
> [DllImport("aygshell.dll")]
> private static extern int Vibrate(int cvn,IntPtr rgvn,bool
> fRepeat,uint dwTimeout);
> public static bool Play()
> {
> int result = Vibrate(0, IntPtr.Zero, true, 0xffffffff);
>
> if(result!=0)
> {
> return false;
> }
> return true;
> }
>
> [DllImport("aygshell.dll")]
> private static extern int vibrateStop();
> public static bool Stop()
> {
> int result = vibrateStop();
>
> if(result!=0)
> {
> return false;
> }
> return true;
> }
> but when i call play() for vibration MissingMethod Exception occurs.
> can anyone give me solution
> regards
> Hassan Mushtaq


Re: Vibrate Windows Mobile 5.0 with P/Invoke by hassanmushtaq

hassanmushtaq
Mon Mar 10 00:52:21 CDT 2008

On Mar 8, 9:20=A0pm, "Christian Resma Helle" <xtian...@gmail.com> wrote:
> The Vibrate API is only for Smartphones. You can use the Notification LED
> driver for vibrating a Pocket PC.http://msdn2.microsoft.com/en-us/library/=
aa917805.aspx
>
> OpenNETCF made some nice wrappers for it in their Smart Device Framework
> (OpenNETCF.Notification.Led)
>
> --
> Regards,
> Christian Resma Hellehttp://christian-helle.blogspot.com
>
> "hassanmushtaq" <hassang...@gmail.com> wrote in message
>
> news:51aca1e0-b2b3-4492-a258-44e046c9c0a2@o77g2000hsf.googlegroups.com...
>
>
>
> > hello to all fellows
> > i am using VS 2003 with CF 1.0 and C#. i have pocket PC (Windows
> > Mobile 5.0). my task is to vibrate a pocket pc with p/invoke. i have
> > found a solution but it is not working in my favour. it gives me
> > exception Missing Method Exception
> > my code is
> > [DllImport("aygshell.dll")]
> > private static extern int Vibrate(int cvn,IntPtr rgvn,bool
> > fRepeat,uint dwTimeout);
> > public static bool Play()
> > {
> > int result =3D Vibrate(0, IntPtr.Zero, true, 0xffffffff);
>
> > if(result!=3D0)
> > {
> > return false;
> > }
> > return true;
> > }
>
> > [DllImport("aygshell.dll")]
> > private static extern int vibrateStop();
> > public static bool Stop()
> > {
> > int result =3D vibrateStop();
>
> > if(result!=3D0)
> > {
> > return false;
> > }
> > return true;
> > }
> > but when i call play() for vibration MissingMethod Exception occurs.
> > can anyone give me solution
> > regards
> > Hassan Mushtaq- Hide quoted text -
>
> - Show quoted text -

hi and thanks to turning me in right direction.
in this microsoft link i have looked many times but i can't be able to
implement them. so can u help me to implementing me this Notification
LED driver.
and i can't use OpenNETCF dll so please i m waiting for ur solution
regards
hassan mushtaq

Re: Vibrate Windows Mobile 5.0 with P/Invoke by Christian

Christian
Mon Mar 10 02:45:28 CDT 2008

hi hassan,

I don't understand why you can use the SDF? The community edition is free. I
don't mind helping you implement it, but I don't see the need to re-invent
the wheel...

--
Regards,
Christian Resma Helle
http://christian-helle.blogspot.com


"hassanmushtaq" <hassangugu@gmail.com> wrote in message
news:89e8c704-c782-4554-b585-c9d3e61cc62f@8g2000hse.googlegroups.com...
On Mar 8, 9:20 pm, "Christian Resma Helle" <xtian...@gmail.com> wrote:
> The Vibrate API is only for Smartphones. You can use the Notification LED
> driver for vibrating a Pocket
> PC.http://msdn2.microsoft.com/en-us/library/aa917805.aspx
>
> OpenNETCF made some nice wrappers for it in their Smart Device Framework
> (OpenNETCF.Notification.Led)
>
> --
> Regards,
> Christian Resma Hellehttp://christian-helle.blogspot.com
>
> "hassanmushtaq" <hassang...@gmail.com> wrote in message
>
> news:51aca1e0-b2b3-4492-a258-44e046c9c0a2@o77g2000hsf.googlegroups.com...
>
>
>
> > hello to all fellows
> > i am using VS 2003 with CF 1.0 and C#. i have pocket PC (Windows
> > Mobile 5.0). my task is to vibrate a pocket pc with p/invoke. i have
> > found a solution but it is not working in my favour. it gives me
> > exception Missing Method Exception
> > my code is
> > [DllImport("aygshell.dll")]
> > private static extern int Vibrate(int cvn,IntPtr rgvn,bool
> > fRepeat,uint dwTimeout);
> > public static bool Play()
> > {
> > int result = Vibrate(0, IntPtr.Zero, true, 0xffffffff);
>
> > if(result!=0)
> > {
> > return false;
> > }
> > return true;
> > }
>
> > [DllImport("aygshell.dll")]
> > private static extern int vibrateStop();
> > public static bool Stop()
> > {
> > int result = vibrateStop();
>
> > if(result!=0)
> > {
> > return false;
> > }
> > return true;
> > }
> > but when i call play() for vibration MissingMethod Exception occurs.
> > can anyone give me solution
> > regards
> > Hassan Mushtaq- Hide quoted text -
>
> - Show quoted text -

hi and thanks to turning me in right direction.
in this microsoft link i have looked many times but i can't be able to
implement them. so can u help me to implementing me this Notification
LED driver.
and i can't use OpenNETCF dll so please i m waiting for ur solution
regards
hassan mushtaq



Re: Vibrate Windows Mobile 5.0 with P/Invoke by Christian

Christian
Mon Mar 10 02:49:13 CDT 2008

Hi Hassan,

I forgot to mention that the source code for the Notification LED API
wrapper is available in the SDF 1.4. You can just download the source code
for that and look for OpenNETCF.WindowsCE.Forms.Led if you really don't want
to depend on the SDF dll's

--
Regards,
Christian Resma Helle
http://christian-helle.blogspot.com


"hassanmushtaq" <hassangugu@gmail.com> wrote in message
news:89e8c704-c782-4554-b585-c9d3e61cc62f@8g2000hse.googlegroups.com...
On Mar 8, 9:20 pm, "Christian Resma Helle" <xtian...@gmail.com> wrote:
> The Vibrate API is only for Smartphones. You can use the Notification LED
> driver for vibrating a Pocket
> PC.http://msdn2.microsoft.com/en-us/library/aa917805.aspx
>
> OpenNETCF made some nice wrappers for it in their Smart Device Framework
> (OpenNETCF.Notification.Led)
>
> --
> Regards,
> Christian Resma Hellehttp://christian-helle.blogspot.com
>
> "hassanmushtaq" <hassang...@gmail.com> wrote in message
>
> news:51aca1e0-b2b3-4492-a258-44e046c9c0a2@o77g2000hsf.googlegroups.com...
>
>
>
> > hello to all fellows
> > i am using VS 2003 with CF 1.0 and C#. i have pocket PC (Windows
> > Mobile 5.0). my task is to vibrate a pocket pc with p/invoke. i have
> > found a solution but it is not working in my favour. it gives me
> > exception Missing Method Exception
> > my code is
> > [DllImport("aygshell.dll")]
> > private static extern int Vibrate(int cvn,IntPtr rgvn,bool
> > fRepeat,uint dwTimeout);
> > public static bool Play()
> > {
> > int result = Vibrate(0, IntPtr.Zero, true, 0xffffffff);
>
> > if(result!=0)
> > {
> > return false;
> > }
> > return true;
> > }
>
> > [DllImport("aygshell.dll")]
> > private static extern int vibrateStop();
> > public static bool Stop()
> > {
> > int result = vibrateStop();
>
> > if(result!=0)
> > {
> > return false;
> > }
> > return true;
> > }
> > but when i call play() for vibration MissingMethod Exception occurs.
> > can anyone give me solution
> > regards
> > Hassan Mushtaq- Hide quoted text -
>
> - Show quoted text -

hi and thanks to turning me in right direction.
in this microsoft link i have looked many times but i can't be able to
implement them. so can u help me to implementing me this Notification
LED driver.
and i can't use OpenNETCF dll so please i m waiting for ur solution
regards
hassan mushtaq



Re: Vibrate Windows Mobile 5.0 with P/Invoke by hassanmushtaq

hassanmushtaq
Tue Mar 11 06:29:44 CDT 2008

On Mar 10, 12:49=A0pm, "Christian Resma Helle" <xtian...@gmail.com>
wrote:
> Hi Hassan,
>
> I forgot to mention that the source code for the Notification LED API
> wrapper is available in the SDF 1.4. You can just download the source code=

> for that and look for OpenNETCF.WindowsCE.Forms.Led if you really don't wa=
nt
> to depend on the SDF dll's
>
> --
> Regards,
> Christian Resma Hellehttp://christian-helle.blogspot.com
>
> "hassanmushtaq" <hassang...@gmail.com> wrote in message
>
> news:89e8c704-c782-4554-b585-c9d3e61cc62f@8g2000hse.googlegroups.com...
> On Mar 8, 9:20 pm, "Christian Resma Helle" <xtian...@gmail.com> wrote:
>
>
>
>
>
> > The Vibrate API is only for Smartphones. You can use the Notification LE=
D
> > driver for vibrating a Pocket
> > PC.http://msdn2.microsoft.com/en-us/library/aa917805.aspx
>
> > OpenNETCF made some nice wrappers for it in their Smart Device Framework=

> > (OpenNETCF.Notification.Led)
>
> > --
> > Regards,
> > Christian Resma Hellehttp://christian-helle.blogspot.com
>
> > "hassanmushtaq" <hassang...@gmail.com> wrote in message
>
> >news:51aca1e0-b2b3-4492-a258-44e046c9c0a2@o77g2000hsf.googlegroups.com...=

>
> > > hello to all fellows
> > > i am using VS 2003 with CF 1.0 and C#. i have pocket PC (Windows
> > > Mobile 5.0). my task is to vibrate a pocket pc with p/invoke. i have
> > > found a solution but it is not working in my favour. it gives me
> > > exception Missing Method Exception
> > > my code is
> > > [DllImport("aygshell.dll")]
> > > private static extern int Vibrate(int cvn,IntPtr rgvn,bool
> > > fRepeat,uint dwTimeout);
> > > public static bool Play()
> > > {
> > > int result =3D Vibrate(0, IntPtr.Zero, true, 0xffffffff);
>
> > > if(result!=3D0)
> > > {
> > > return false;
> > > }
> > > return true;
> > > }
>
> > > [DllImport("aygshell.dll")]
> > > private static extern int vibrateStop();
> > > public static bool Stop()
> > > {
> > > int result =3D vibrateStop();
>
> > > if(result!=3D0)
> > > {
> > > return false;
> > > }
> > > return true;
> > > }
> > > but when i call play() for vibration MissingMethod Exception occurs.
> > > can anyone give me solution
> > > regards
> > > Hassan Mushtaq- Hide quoted text -
>
> > - Show quoted text -
>
> hi and thanks to turning me in right direction.
> in this microsoft link i have looked many times but i can't be able to
> implement them. so can u help me to implementing me this Notification
> LED driver.
> and i can't use OpenNETCF dll so please i m waiting for ur solution
> regards
> hassan mushtaq- Hide quoted text -
>
> - Show quoted text -

thanks alot chiristian resma. i have solved the problem....

Re: Vibrate Windows Mobile 5.0 with P/Invoke by Hilton

Hilton
Sun Mar 30 02:07:28 CDT 2008

Why not just: "return result == 0;

...or:

return Vibrate(0, IntPtr.Zero, true, 0xffffffff) == 0;


"hassanmushtaq" <hassangugu@gmail.com> wrote in message
news:51aca1e0-b2b3-4492-a258-44e046c9c0a2@o77g2000hsf.googlegroups.com...
> hello to all fellows
> i am using VS 2003 with CF 1.0 and C#. i have pocket PC (Windows
> Mobile 5.0). my task is to vibrate a pocket pc with p/invoke. i have
> found a solution but it is not working in my favour. it gives me
> exception Missing Method Exception
> my code is
> [DllImport("aygshell.dll")]
> private static extern int Vibrate(int cvn,IntPtr rgvn,bool
> fRepeat,uint dwTimeout);
> public static bool Play()
> {
> int result = Vibrate(0, IntPtr.Zero, true, 0xffffffff);
>
> if(result!=0)
> {
> return false;
> }
> return true;
> }
>
> [DllImport("aygshell.dll")]
> private static extern int vibrateStop();
> public static bool Stop()
> {
> int result = vibrateStop();
>
> if(result!=0)
> {
> return false;
> }
> return true;
> }
> but when i call play() for vibration MissingMethod Exception occurs.
> can anyone give me solution
> regards
> Hassan Mushtaq
>