Problems with a C++ compiled DLL on my pocketPC 2002 app

Problems with a C++ compiled DLL on my pocketPC 2002 app

Post by jayder » Thu, 29 May 2003 08:51:07



I am using eVC 4 with service pack 2 and the standard sdk. the device is a
Ipaq 3955 (ARM Processor).
my problem is this. I know the dll works as it should(cause I use it on many
apps on a desktop PC) I have compiled it on eVC4 and the linking went fine(I
had to remove some basic stuff that was not needed for eVC ) with only
warnings.. that were the same warnings as on VS6 compile..... but anyway the
dll works. I compiled it as an ARMV4 processor because ARM was not
available. Is this a problem?...

I am using C# to call this dll

public static extern int kOpen(int Port);
On the eVC++ side it looks like this...
NoMangle __declspec (dllexport) long __stdcall kOpen(long &nPort){
// this is a wrapper function
 return my.Open(nPort);

Quote:}

I looked at the myCE.exp file on the C++ side of things and it looks normal
compared to the PC dll.exp..

I am getting a MissingMethodException!

thanks in advanced,

Jay

 
 
 

Problems with a C++ compiled DLL on my pocketPC 2002 app

Post by Alex Feinman [MVP » Thu, 29 May 2003 09:20:27


I think you will need to use eVC3 with PPC2002 device.


> I am using eVC 4 with service pack 2 and the standard sdk. the device is a
> Ipaq 3955 (ARM Processor).
> my problem is this. I know the dll works as it should(cause I use it on
many
> apps on a desktop PC) I have compiled it on eVC4 and the linking went
fine(I
> had to remove some basic stuff that was not needed for eVC ) with only
> warnings.. that were the same warnings as on VS6 compile..... but anyway
the
> dll works. I compiled it as an ARMV4 processor because ARM was not
> available. Is this a problem?...

> I am using C# to call this dll

> public static extern int kOpen(int Port);
> On the eVC++ side it looks like this...
> NoMangle __declspec (dllexport) long __stdcall kOpen(long &nPort){
> // this is a wrapper function
>  return my.Open(nPort);
> }

> I looked at the myCE.exp file on the C++ side of things and it looks
normal
> compared to the PC dll.exp..

> I am getting a MissingMethodException!

> thanks in advanced,

> Jay


 
 
 

Problems with a C++ compiled DLL on my pocketPC 2002 app

Post by Neil Enns [MS » Thu, 29 May 2003 09:50:19


Alex is correct. I'm not sure if it's the cause of your issue, but Pocket PC
2002 development using EVC4 is not supported. You still need to use EVC3.

--
Neil Enns
Lead Program Manager
Microsoft Mobile Devices Product Group

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



> I think you will need to use eVC3 with PPC2002 device.



> > I am using eVC 4 with service pack 2 and the standard sdk. the device is
a
> > Ipaq 3955 (ARM Processor).
> > my problem is this. I know the dll works as it should(cause I use it on
> many
> > apps on a desktop PC) I have compiled it on eVC4 and the linking went
> fine(I
> > had to remove some basic stuff that was not needed for eVC ) with only
> > warnings.. that were the same warnings as on VS6 compile..... but anyway
> the
> > dll works. I compiled it as an ARMV4 processor because ARM was not
> > available. Is this a problem?...

> > I am using C# to call this dll

> > public static extern int kOpen(int Port);
> > On the eVC++ side it looks like this...
> > NoMangle __declspec (dllexport) long __stdcall kOpen(long &nPort){
> > // this is a wrapper function
> >  return my.Open(nPort);
> > }

> > I looked at the myCE.exp file on the C++ side of things and it looks
> normal
> > compared to the PC dll.exp..

> > I am getting a MissingMethodException!

> > thanks in advanced,

> > Jay

 
 
 

Problems with a C++ compiled DLL on my pocketPC 2002 app

Post by Alex Feinman [MVP » Thu, 29 May 2003 09:54:15


It looks like he's got wrong calling convention. In eVC 3 you only get one.
It looks like under eVC 4 you now get a choice.



> Alex is correct. I'm not sure if it's the cause of your issue, but Pocket
PC
> 2002 development using EVC4 is not supported. You still need to use EVC3.

> --
> Neil Enns
> Lead Program Manager
> Microsoft Mobile Devices Product Group

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



> > I think you will need to use eVC3 with PPC2002 device.



> > > I am using eVC 4 with service pack 2 and the standard sdk. the device
is
> a
> > > Ipaq 3955 (ARM Processor).
> > > my problem is this. I know the dll works as it should(cause I use it
on
> > many
> > > apps on a desktop PC) I have compiled it on eVC4 and the linking went
> > fine(I
> > > had to remove some basic stuff that was not needed for eVC ) with only
> > > warnings.. that were the same warnings as on VS6 compile..... but
anyway
> > the
> > > dll works. I compiled it as an ARMV4 processor because ARM was not
> > > available. Is this a problem?...

> > > I am using C# to call this dll

> > > public static extern int kOpen(int Port);
> > > On the eVC++ side it looks like this...
> > > NoMangle __declspec (dllexport) long __stdcall kOpen(long &nPort){
> > > // this is a wrapper function
> > >  return my.Open(nPort);
> > > }

> > > I looked at the myCE.exp file on the C++ side of things and it looks
> > normal
> > > compared to the PC dll.exp..

> > > I am getting a MissingMethodException!

> > > thanks in advanced,

> > > Jay

 
 
 

Problems with a C++ compiled DLL on my pocketPC 2002 app

Post by Chris Tacke, eMV » Thu, 29 May 2003 10:00:30


It's definitely the problem.  eVC 4.0 signs the binaries so that 3.0 sees
them as incompatible with the OS.

-Chris



> Alex is correct. I'm not sure if it's the cause of your issue, but Pocket
PC
> 2002 development using EVC4 is not supported. You still need to use EVC3.

> --
> Neil Enns
> Lead Program Manager
> Microsoft Mobile Devices Product Group

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



> > I think you will need to use eVC3 with PPC2002 device.



> > > I am using eVC 4 with service pack 2 and the standard sdk. the device
is
> a
> > > Ipaq 3955 (ARM Processor).
> > > my problem is this. I know the dll works as it should(cause I use it
on
> > many
> > > apps on a desktop PC) I have compiled it on eVC4 and the linking went
> > fine(I
> > > had to remove some basic stuff that was not needed for eVC ) with only
> > > warnings.. that were the same warnings as on VS6 compile..... but
anyway
> > the
> > > dll works. I compiled it as an ARMV4 processor because ARM was not
> > > available. Is this a problem?...

> > > I am using C# to call this dll

> > > public static extern int kOpen(int Port);
> > > On the eVC++ side it looks like this...
> > > NoMangle __declspec (dllexport) long __stdcall kOpen(long &nPort){
> > > // this is a wrapper function
> > >  return my.Open(nPort);
> > > }

> > > I looked at the myCE.exp file on the C++ side of things and it looks
> > normal
> > > compared to the PC dll.exp..

> > > I am getting a MissingMethodException!

> > > thanks in advanced,

> > > Jay

 
 
 

Problems with a C++ compiled DLL on my pocketPC 2002 app

Post by Alex Feinman [MVP » Thu, 29 May 2003 10:20:51


Which they are because WINAPI is defined differently, right?



> It's definitely the problem.  eVC 4.0 signs the binaries so that 3.0 sees
> them as incompatible with the OS.

> -Chris



> > Alex is correct. I'm not sure if it's the cause of your issue, but
Pocket
> PC
> > 2002 development using EVC4 is not supported. You still need to use
EVC3.

> > --
> > Neil Enns
> > Lead Program Manager
> > Microsoft Mobile Devices Product Group

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



> > > I think you will need to use eVC3 with PPC2002 device.



> > > > I am using eVC 4 with service pack 2 and the standard sdk. the
device
> is
> > a
> > > > Ipaq 3955 (ARM Processor).
> > > > my problem is this. I know the dll works as it should(cause I use it
> on
> > > many
> > > > apps on a desktop PC) I have compiled it on eVC4 and the linking
went
> > > fine(I
> > > > had to remove some basic stuff that was not needed for eVC ) with
only
> > > > warnings.. that were the same warnings as on VS6 compile..... but
> anyway
> > > the
> > > > dll works. I compiled it as an ARMV4 processor because ARM was not
> > > > available. Is this a problem?...

> > > > I am using C# to call this dll

> > > > public static extern int kOpen(int Port);
> > > > On the eVC++ side it looks like this...
> > > > NoMangle __declspec (dllexport) long __stdcall kOpen(long &nPort){
> > > > // this is a wrapper function
> > > >  return my.Open(nPort);
> > > > }

> > > > I looked at the myCE.exp file on the C++ side of things and it looks
> > > normal
> > > > compared to the PC dll.exp..

> > > > I am getting a MissingMethodException!

> > > > thanks in advanced,

> > > > Jay

 
 
 

Problems with a C++ compiled DLL on my pocketPC 2002 app

Post by Chris Tacke, eMV » Thu, 29 May 2003 10:39:20


You got it.

eVC 3.0 binaries *will* however run just fine on 4.0 (in fact I don't use
eVC 4.0 too often).

-Chris



> Which they are because WINAPI is defined differently, right?



> > It's definitely the problem.  eVC 4.0 signs the binaries so that 3.0
sees
> > them as incompatible with the OS.

> > -Chris



> > > Alex is correct. I'm not sure if it's the cause of your issue, but
> Pocket
> > PC
> > > 2002 development using EVC4 is not supported. You still need to use
> EVC3.

> > > --
> > > Neil Enns
> > > Lead Program Manager
> > > Microsoft Mobile Devices Product Group

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



> > > > I think you will need to use eVC3 with PPC2002 device.



> > > > > I am using eVC 4 with service pack 2 and the standard sdk. the
> device
> > is
> > > a
> > > > > Ipaq 3955 (ARM Processor).
> > > > > my problem is this. I know the dll works as it should(cause I use
it
> > on
> > > > many
> > > > > apps on a desktop PC) I have compiled it on eVC4 and the linking
> went
> > > > fine(I
> > > > > had to remove some basic stuff that was not needed for eVC ) with
> only
> > > > > warnings.. that were the same warnings as on VS6 compile..... but
> > anyway
> > > > the
> > > > > dll works. I compiled it as an ARMV4 processor because ARM was not
> > > > > available. Is this a problem?...

> > > > > I am using C# to call this dll

> > > > > public static extern int kOpen(int Port);
> > > > > On the eVC++ side it looks like this...
> > > > > NoMangle __declspec (dllexport) long __stdcall kOpen(long &nPort){
> > > > > // this is a wrapper function
> > > > >  return my.Open(nPort);
> > > > > }

> > > > > I looked at the myCE.exp file on the C++ side of things and it
looks
> > > > normal
> > > > > compared to the PC dll.exp..

> > > > > I am getting a MissingMethodException!

> > > > > thanks in advanced,

> > > > > Jay

 
 
 

Problems with a C++ compiled DLL on my pocketPC 2002 app

Post by Alex Feinman [MVP » Thu, 29 May 2003 10:43:09


What happens with CF binaries?  Remember, I have that code that generates
function call by emitting CPU instructions on the fly. There I assume a
certain calling convention. If OS's perceived calling convention is coded in
the PE header, what does .Net compiler do? Would the code generated to
WindowsCE.NET platform use a different calling convention?



> You got it.

> eVC 3.0 binaries *will* however run just fine on 4.0 (in fact I don't use
> eVC 4.0 too often).

> -Chris



> > Which they are because WINAPI is defined differently, right?



> > > It's definitely the problem.  eVC 4.0 signs the binaries so that 3.0
> sees
> > > them as incompatible with the OS.

> > > -Chris



> > > > Alex is correct. I'm not sure if it's the cause of your issue, but
> > Pocket
> > > PC
> > > > 2002 development using EVC4 is not supported. You still need to use
> > EVC3.

> > > > --
> > > > Neil Enns
> > > > Lead Program Manager
> > > > Microsoft Mobile Devices Product Group

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



> > > > > I think you will need to use eVC3 with PPC2002 device.



> > > > > > I am using eVC 4 with service pack 2 and the standard sdk. the
> > device
> > > is
> > > > a
> > > > > > Ipaq 3955 (ARM Processor).
> > > > > > my problem is this. I know the dll works as it should(cause I
use
> it
> > > on
> > > > > many
> > > > > > apps on a desktop PC) I have compiled it on eVC4 and the linking
> > went
> > > > > fine(I
> > > > > > had to remove some basic stuff that was not needed for eVC )
with
> > only
> > > > > > warnings.. that were the same warnings as on VS6 compile.....
but
> > > anyway
> > > > > the
> > > > > > dll works. I compiled it as an ARMV4 processor because ARM was
not
> > > > > > available. Is this a problem?...

> > > > > > I am using C# to call this dll

> > > > > > public static extern int kOpen(int Port);
> > > > > > On the eVC++ side it looks like this...
> > > > > > NoMangle __declspec (dllexport) long __stdcall kOpen(long
&nPort){
> > > > > > // this is a wrapper function
> > > > > >  return my.Open(nPort);
> > > > > > }

> > > > > > I looked at the myCE.exp file on the C++ side of things and it
> looks
> > > > > normal
> > > > > > compared to the PC dll.exp..

> > > > > > I am getting a MissingMethodException!

> > > > > > thanks in advanced,

> > > > > > Jay

 
 
 

Problems with a C++ compiled DLL on my pocketPC 2002 app

Post by Paul G. Tobey [eMVP » Fri, 30 May 2003 00:40:29


Your .NET CF declaration is wrong.  Note that the C++ DLL declares the
parameter as a *reference* to a long, while you're passing a long itself...

Paul T.


> I am using eVC 4 with service pack 2 and the standard sdk. the device is a
> Ipaq 3955 (ARM Processor).
> my problem is this. I know the dll works as it should(cause I use it on
many
> apps on a desktop PC) I have compiled it on eVC4 and the linking went
fine(I
> had to remove some basic stuff that was not needed for eVC ) with only
> warnings.. that were the same warnings as on VS6 compile..... but anyway
the
> dll works. I compiled it as an ARMV4 processor because ARM was not
> available. Is this a problem?...

> I am using C# to call this dll

> public static extern int kOpen(int Port);
> On the eVC++ side it looks like this...
> NoMangle __declspec (dllexport) long __stdcall kOpen(long &nPort){
> // this is a wrapper function
>  return my.Open(nPort);
> }

> I looked at the myCE.exp file on the C++ side of things and it looks
normal
> compared to the PC dll.exp..

> I am getting a MissingMethodException!

> thanks in advanced,

> Jay

 
 
 

Problems with a C++ compiled DLL on my pocketPC 2002 app

Post by Gran » Fri, 30 May 2003 16:27:48


Off topic but, you're telling me that when we finally get a brand-new OS
that suposednly supports C++ style exception handling, we'll still be forced
to use eVC 3.0 for our native developement needs?  eVC3 is ancient, it has
tons of know and documented bugs, and produces poorly optimized code.  eVC4
is only marginally better in many respects, but at least it has exceptions!
When will get something good for those of use who really need speed (yes
there are apps out there that just can't run on the compact frameworks
because of performance issues).

--
--Grant


> Alex is correct. I'm not sure if it's the cause of your issue, but Pocket
PC
> 2002 development using EVC4 is not supported. You still need to use EVC3.

> --
> Neil Enns
> Lead Program Manager
> Microsoft Mobile Devices Product Group

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



> > I think you will need to use eVC3 with PPC2002 device.



> > > I am using eVC 4 with service pack 2 and the standard sdk. the device
is
> a
> > > Ipaq 3955 (ARM Processor).
> > > my problem is this. I know the dll works as it should(cause I use it
on
> > many
> > > apps on a desktop PC) I have compiled it on eVC4 and the linking went
> > fine(I
> > > had to remove some basic stuff that was not needed for eVC ) with only
> > > warnings.. that were the same warnings as on VS6 compile..... but
anyway
> > the
> > > dll works. I compiled it as an ARMV4 processor because ARM was not
> > > available. Is this a problem?...

> > > I am using C# to call this dll

> > > public static extern int kOpen(int Port);
> > > On the eVC++ side it looks like this...
> > > NoMangle __declspec (dllexport) long __stdcall kOpen(long &nPort){
> > > // this is a wrapper function
> > >  return my.Open(nPort);
> > > }

> > > I looked at the myCE.exp file on the C++ side of things and it looks
> > normal
> > > compared to the PC dll.exp..

> > > I am getting a MissingMethodException!

> > > thanks in advanced,

> > > Jay

 
 
 

Problems with a C++ compiled DLL on my pocketPC 2002 app

Post by Maarten Struy » Fri, 30 May 2003 17:41:47


It is not about a brand-new OS, but about PocketPC 2002 which runs Windows
CE 3.0.

--
Regards,

Maarten Struys
PTS Software bv
----

> Off topic but, you're telling me that when we finally get a brand-new OS
> that suposednly supports C++ style exception handling, we'll still be
forced
> to use eVC 3.0 for our native developement needs?  eVC3 is ancient, it has
> tons of know and documented bugs, and produces poorly optimized code.
eVC4
> is only marginally better in many respects, but at least it has
exceptions!
> When will get something good for those of use who really need speed (yes
> there are apps out there that just can't run on the compact frameworks
> because of performance issues).

> --
> --Grant


> > Alex is correct. I'm not sure if it's the cause of your issue, but
Pocket
> PC
> > 2002 development using EVC4 is not supported. You still need to use
EVC3.

> > --
> > Neil Enns
> > Lead Program Manager
> > Microsoft Mobile Devices Product Group

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



> > > I think you will need to use eVC3 with PPC2002 device.



> > > > I am using eVC 4 with service pack 2 and the standard sdk. the
device
> is
> > a
> > > > Ipaq 3955 (ARM Processor).
> > > > my problem is this. I know the dll works as it should(cause I use it
> on
> > > many
> > > > apps on a desktop PC) I have compiled it on eVC4 and the linking
went
> > > fine(I
> > > > had to remove some basic stuff that was not needed for eVC ) with
only
> > > > warnings.. that were the same warnings as on VS6 compile..... but
> anyway
> > > the
> > > > dll works. I compiled it as an ARMV4 processor because ARM was not
> > > > available. Is this a problem?...

> > > > I am using C# to call this dll

> > > > public static extern int kOpen(int Port);
> > > > On the eVC++ side it looks like this...
> > > > NoMangle __declspec (dllexport) long __stdcall kOpen(long &nPort){
> > > > // this is a wrapper function
> > > >  return my.Open(nPort);
> > > > }

> > > > I looked at the myCE.exp file on the C++ side of things and it looks
> > > normal
> > > > compared to the PC dll.exp..

> > > > I am getting a MissingMethodException!

> > > > thanks in advanced,

> > > > Jay

 
 
 

Problems with a C++ compiled DLL on my pocketPC 2002 app

Post by Gran » Sat, 31 May 2003 14:27:18


Sorry I was only reading with half a brain.  I thought I read PPC 2003,
which according to rumor is based off of CE 4.2.

--
--Grant

> It is not about a brand-new OS, but about PocketPC 2002 which runs Windows
> CE 3.0.

> --
> Regards,

> Maarten Struys
> PTS Software bv
> ----


> > Off topic but, you're telling me that when we finally get a brand-new OS
> > that suposednly supports C++ style exception handling, we'll still be
> forced
> > to use eVC 3.0 for our native developement needs?  eVC3 is ancient, it
has
> > tons of know and documented bugs, and produces poorly optimized code.
> eVC4
> > is only marginally better in many respects, but at least it has
> exceptions!
> > When will get something good for those of use who really need speed (yes
> > there are apps out there that just can't run on the compact frameworks
> > because of performance issues).

> > --
> > --Grant


> > > Alex is correct. I'm not sure if it's the cause of your issue, but
> Pocket
> > PC
> > > 2002 development using EVC4 is not supported. You still need to use
> EVC3.

> > > --
> > > Neil Enns
> > > Lead Program Manager
> > > Microsoft Mobile Devices Product Group

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



> > > > I think you will need to use eVC3 with PPC2002 device.



> > > > > I am using eVC 4 with service pack 2 and the standard sdk. the
> device
> > is
> > > a
> > > > > Ipaq 3955 (ARM Processor).
> > > > > my problem is this. I know the dll works as it should(cause I use
it
> > on
> > > > many
> > > > > apps on a desktop PC) I have compiled it on eVC4 and the linking
> went
> > > > fine(I
> > > > > had to remove some basic stuff that was not needed for eVC ) with
> only
> > > > > warnings.. that were the same warnings as on VS6 compile..... but
> > anyway
> > > > the
> > > > > dll works. I compiled it as an ARMV4 processor because ARM was not
> > > > > available. Is this a problem?...

> > > > > I am using C# to call this dll

> > > > > public static extern int kOpen(int Port);
> > > > > On the eVC++ side it looks like this...
> > > > > NoMangle __declspec (dllexport) long __stdcall kOpen(long &nPort){
> > > > > // this is a wrapper function
> > > > >  return my.Open(nPort);
> > > > > }

> > > > > I looked at the myCE.exp file on the C++ side of things and it
looks
> > > > normal
> > > > > compared to the PC dll.exp..

> > > > > I am getting a MissingMethodException!

> > > > > thanks in advanced,

> > > > > Jay

 
 
 

1. deploying apps for PocketPC 2002 using .Net CF and SQLCE ?

Pardon me if this question has been answered before here - i'm new to
developing apps for PocketPC's

from my research so far - the application can be developed using .Net CF but
* How will .Net CF runtime be deployed to the IPAQ's running Pocket PC 2002
since it's not bundled already, if it can be deployed to Pocket PC 2000
devices, that'll be nice too, but not a requirement
* What will be / is the cost of the .Net CF runtime per device ?
* What are the setup / installation options for packaging / deploying the
applications to these IPAQ's ?
* What are the licensing options for SQLCE on the IPAQ's, these pda's will
be replicating with the main data store on a SQL  Server box !

We are evaluating building an application with the CF and SDE and answers to
the above would be critical to deciding on the platform.

Also, it appears that the VS.Net 2003 ( including the .Net CF, SDE ) will be
released on or around Dec 21, 2002, can someone from Microsoft please
confirm this ?

Thanks

2. FS98 &SCENERY FOR WINDOWS 95

3. PocketPC 2002 emulator and VS.NET 2002

4. iPaq fix - they ship it out first?

5. Problem creating activex object with JScript for pocketpc 2002

6. No Documentation for OSF/1?

7. PocketPC 2002 Navigation problems...

8. reminder alarm

9. C#, Tapi and p/invoke on PocketPC 2002

10. Getting DeviceID (Serial Number) Of PocketPC 2002

11. PocketPC 2002 as .NET Platform

12. Visual Studio .NET 2003: Computer crashes when starting PocketPC 2002 emulator to debug

13. vb.net: CE 4.2 vs. PocketPC 2002/3