PC Review


Reply
 
 
=?Utf-8?B?SmVyZW15?=
Guest
Posts: n/a
 
      7th Mar 2007
I have posted this before but I am not sure where I left off and I am still
having an issue with it.

I have the exact same code that works on Windows Mobile 5 Pocket PC Ed. on
two different Ipaqs and a Palm Treo Phone.

I create a SmartPhone build for the same stuff and everything works fine
except pinvoke throws an exception claiming there is a "Missing Method".

Is there any special differences between SmartPhone version and Pocket PC
version for pinvoking a custom dll?

Thank you very much.
 
Reply With Quote
 
 
 
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      7th Mar 2007
Not in how you do it, but in what APIs are available, yes.

Paul T.

"Jeremy" <(E-Mail Removed)> wrote in message
news:BAD361AB-180D-42E6-8024-(E-Mail Removed)...
>I have posted this before but I am not sure where I left off and I am still
> having an issue with it.
>
> I have the exact same code that works on Windows Mobile 5 Pocket PC Ed. on
> two different Ipaqs and a Palm Treo Phone.
>
> I create a SmartPhone build for the same stuff and everything works fine
> except pinvoke throws an exception claiming there is a "Missing Method".
>
> Is there any special differences between SmartPhone version and Pocket PC
> version for pinvoking a custom dll?
>
> Thank you very much.



 
Reply With Quote
 
=?Utf-8?B?SmVyZW15?=
Guest
Posts: n/a
 
      7th Mar 2007
Well I mean like the following:

[DllImport("MyDLL.dll",CharSet=CharSet.Unicode,SetLastError=true)]
public static extern bool MyMethod();

where I define in my native dll:

extern "C" {
MYDLL_API BOOL MyMethod();
};

"Paul G. Tobey [eMVP]" wrote:

> Not in how you do it, but in what APIs are available, yes.
>
> Paul T.
>
> "Jeremy" <(E-Mail Removed)> wrote in message
> news:BAD361AB-180D-42E6-8024-(E-Mail Removed)...
> >I have posted this before but I am not sure where I left off and I am still
> > having an issue with it.
> >
> > I have the exact same code that works on Windows Mobile 5 Pocket PC Ed. on
> > two different Ipaqs and a Palm Treo Phone.
> >
> > I create a SmartPhone build for the same stuff and everything works fine
> > except pinvoke throws an exception claiming there is a "Missing Method".
> >
> > Is there any special differences between SmartPhone version and Pocket PC
> > version for pinvoking a custom dll?
> >
> > Thank you very much.

>
>
>

 
Reply With Quote
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      7th Mar 2007
Well, if you're sure that your native DLL is in a suitable location and that
the missing method exception isn't being thrown because of an error on your
part, it could be a lack of your application and DLL being signed and the
SmartPhone locked. I would expect that it's more likely to be your fault
for that particular exception, though.

Paul T.

"Jeremy" <(E-Mail Removed)> wrote in message
news:F9B27690-5362-4B4C-9794-(E-Mail Removed)...
> Well I mean like the following:
>
> [DllImport("MyDLL.dll",CharSet=CharSet.Unicode,SetLastError=true)]
> public static extern bool MyMethod();
>
> where I define in my native dll:
>
> extern "C" {
> MYDLL_API BOOL MyMethod();
> };
>
> "Paul G. Tobey [eMVP]" wrote:
>
>> Not in how you do it, but in what APIs are available, yes.
>>
>> Paul T.
>>
>> "Jeremy" <(E-Mail Removed)> wrote in message
>> news:BAD361AB-180D-42E6-8024-(E-Mail Removed)...
>> >I have posted this before but I am not sure where I left off and I am
>> >still
>> > having an issue with it.
>> >
>> > I have the exact same code that works on Windows Mobile 5 Pocket PC Ed.
>> > on
>> > two different Ipaqs and a Palm Treo Phone.
>> >
>> > I create a SmartPhone build for the same stuff and everything works
>> > fine
>> > except pinvoke throws an exception claiming there is a "Missing
>> > Method".
>> >
>> > Is there any special differences between SmartPhone version and Pocket
>> > PC
>> > version for pinvoking a custom dll?
>> >
>> > Thank you very much.

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?SmVyZW15?=
Guest
Posts: n/a
 
      7th Mar 2007
I have the dll alongside the application in the same directory although it is
invisible on the device itself I can see it using windows explorer on my
desktop. Someone mentioned it needed to be in the Windows directory so I
tried copying it there and that didnt work either. Like I said it works
perfect on Pocket PC edition, just not SmartPhone.

"Jeremy" wrote:

> Well I mean like the following:
>
> [DllImport("MyDLL.dll",CharSet=CharSet.Unicode,SetLastError=true)]
> public static extern bool MyMethod();
>
> where I define in my native dll:
>
> extern "C" {
> MYDLL_API BOOL MyMethod();
> };
>
> "Paul G. Tobey [eMVP]" wrote:
>
> > Not in how you do it, but in what APIs are available, yes.
> >
> > Paul T.
> >
> > "Jeremy" <(E-Mail Removed)> wrote in message
> > news:BAD361AB-180D-42E6-8024-(E-Mail Removed)...
> > >I have posted this before but I am not sure where I left off and I am still
> > > having an issue with it.
> > >
> > > I have the exact same code that works on Windows Mobile 5 Pocket PC Ed. on
> > > two different Ipaqs and a Palm Treo Phone.
> > >
> > > I create a SmartPhone build for the same stuff and everything works fine
> > > except pinvoke throws an exception claiming there is a "Missing Method".
> > >
> > > Is there any special differences between SmartPhone version and Pocket PC
> > > version for pinvoking a custom dll?
> > >
> > > Thank you very much.

> >
> >
> >

 
Reply With Quote
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      7th Mar 2007
Well, when all of the possible explanations are exhausted, start with the
impossible. Signing is the first thing that comes to my mind, anyway. You
might try testing that by writing a *native code* application to call that
DLL and see what happens with it.

Paul T.

"Jeremy" <(E-Mail Removed)> wrote in message
news:C89E0D9A-3CDD-4CCB-89DE-(E-Mail Removed)...
>I have the dll alongside the application in the same directory although it
>is
> invisible on the device itself I can see it using windows explorer on my
> desktop. Someone mentioned it needed to be in the Windows directory so I
> tried copying it there and that didnt work either. Like I said it works
> perfect on Pocket PC edition, just not SmartPhone.
>
> "Jeremy" wrote:
>
>> Well I mean like the following:
>>
>> [DllImport("MyDLL.dll",CharSet=CharSet.Unicode,SetLastError=true)]
>> public static extern bool MyMethod();
>>
>> where I define in my native dll:
>>
>> extern "C" {
>> MYDLL_API BOOL MyMethod();
>> };
>>
>> "Paul G. Tobey [eMVP]" wrote:
>>
>> > Not in how you do it, but in what APIs are available, yes.
>> >
>> > Paul T.
>> >
>> > "Jeremy" <(E-Mail Removed)> wrote in message
>> > news:BAD361AB-180D-42E6-8024-(E-Mail Removed)...
>> > >I have posted this before but I am not sure where I left off and I am
>> > >still
>> > > having an issue with it.
>> > >
>> > > I have the exact same code that works on Windows Mobile 5 Pocket PC
>> > > Ed. on
>> > > two different Ipaqs and a Palm Treo Phone.
>> > >
>> > > I create a SmartPhone build for the same stuff and everything works
>> > > fine
>> > > except pinvoke throws an exception claiming there is a "Missing
>> > > Method".
>> > >
>> > > Is there any special differences between SmartPhone version and
>> > > Pocket PC
>> > > version for pinvoking a custom dll?
>> > >
>> > > Thank you very much.
>> >
>> >
>> >



 
Reply With Quote
 
=?Utf-8?B?SmVyZW15?=
Guest
Posts: n/a
 
      8th Mar 2007
I see it now I wasnt signing the dll properly.

Thanks for pointing me in the right direction.

"Paul G. Tobey [eMVP]" wrote:

> Well, when all of the possible explanations are exhausted, start with the
> impossible. Signing is the first thing that comes to my mind, anyway. You
> might try testing that by writing a *native code* application to call that
> DLL and see what happens with it.
>
> Paul T.
>
> "Jeremy" <(E-Mail Removed)> wrote in message
> news:C89E0D9A-3CDD-4CCB-89DE-(E-Mail Removed)...
> >I have the dll alongside the application in the same directory although it
> >is
> > invisible on the device itself I can see it using windows explorer on my
> > desktop. Someone mentioned it needed to be in the Windows directory so I
> > tried copying it there and that didnt work either. Like I said it works
> > perfect on Pocket PC edition, just not SmartPhone.
> >
> > "Jeremy" wrote:
> >
> >> Well I mean like the following:
> >>
> >> [DllImport("MyDLL.dll",CharSet=CharSet.Unicode,SetLastError=true)]
> >> public static extern bool MyMethod();
> >>
> >> where I define in my native dll:
> >>
> >> extern "C" {
> >> MYDLL_API BOOL MyMethod();
> >> };
> >>
> >> "Paul G. Tobey [eMVP]" wrote:
> >>
> >> > Not in how you do it, but in what APIs are available, yes.
> >> >
> >> > Paul T.
> >> >
> >> > "Jeremy" <(E-Mail Removed)> wrote in message
> >> > news:BAD361AB-180D-42E6-8024-(E-Mail Removed)...
> >> > >I have posted this before but I am not sure where I left off and I am
> >> > >still
> >> > > having an issue with it.
> >> > >
> >> > > I have the exact same code that works on Windows Mobile 5 Pocket PC
> >> > > Ed. on
> >> > > two different Ipaqs and a Palm Treo Phone.
> >> > >
> >> > > I create a SmartPhone build for the same stuff and everything works
> >> > > fine
> >> > > except pinvoke throws an exception claiming there is a "Missing
> >> > > Method".
> >> > >
> >> > > Is there any special differences between SmartPhone version and
> >> > > Pocket PC
> >> > > version for pinvoking a custom dll?
> >> > >
> >> > > Thank you very much.
> >> >
> >> >
> >> >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pinvoke help Ringo Microsoft C# .NET 9 7th May 2007 09:59 PM
PInvoke AGL =?Utf-8?B?U3RyaWRlcg==?= Microsoft Dot NET Compact Framework 3 18th Apr 2007 04:01 PM
pInvoke API to c# GTi Microsoft C# .NET 1 16th Aug 2006 04:00 PM
help with pinvoke =?Utf-8?B?c2F2YWdl?= Microsoft Dot NET 7 5th Jun 2005 02:36 AM
PInvoke - [Out] vs out? Tim Johnson Microsoft Dot NET Compact Framework 3 20th Oct 2004 09:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:10 PM.