all groups > visual c libraries > november 2003 >
You're in the visual c libraries group:
Repost: Re: DllImport for Windows CE for pocket PC device development
visual c libraries:
Hi Chris and BJ, I am working in the same library too. I tired to use the Visual C++ to link to this win ce.net dll, and from Visual C++, I can see the method and build with the following code: // This is the main project file for VC++ application project // generated using an Application Wizard. #include <windows.h> #include <stdio.h> #using <mscorlib.dll> #include <tchar.h> using namespace System::Runtime::InteropServices; #using "MPU-L465.dll" using namespace System; using namespace SII; int _tmain(void) { Int32 rc; SII::MPU_L465 * mpul465 = new SII::MPU_L465(); Console::WriteLine(S"Hello World"); System::String *obj1 = new String (_T("3")); mpul465->ComPort=obj1; return 0; } but it failed in the 2nd line of the main program when creating constuructor. The message I got is a missing link. It failed in crt0.c in line 259: #else /* WPRFLAG */ __initenv = _environ; mainret = main(__argc, __argv, _environ); and we a look at the even lot, the linking problem occur in CEUDPPerfExt.dll from the WinCE library and I have that fiile in the indicated folder. So.. I wonder if anyone can give me any suggestions? [quoted text, click to view] "BJ" <caophong@hotmail.com> wrote in message news:%23O0ihHYmDHA.2244@TK2MSFTNGP12.phx.gbl... > Thanks Chris. > > dumpbin.exe sure is nice. I found out that my library is a "Private > Assembly" hence, it needs to be loaded differently. > >
You're using a development environment which doesn't support your target device. If you want to use unmanaged C++ to program your Pocket PC, you should download eMbedded Visual C++ (3.0 or 4.0, depending on whether you are using PPC 2000/2002 or 2003). You *can* use managed code on your Pocket PC, but you must have Visual ***Studio***.NET 2003 Pro or better to do that. By the same token, if you have a DLL which is compiled for Windows CE.NET, it *won't work* on desktop Windows without being recompiled. Paul T. [quoted text, click to view] "Kenric Li" <likenric@hotmail.com> wrote in message news:O$lyjG9oDHA.2820@TK2MSFTNGP10.phx.gbl... > Hi Steve, > > I am using Visual C++ .net 2002. The dll I am linking seems to be > programmed by Windows CE.net > > Would you kindly give me any suggestions? > > Regards, > > Kenric > > > "Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in message > news:eNX46x8oDHA.2820@TK2MSFTNGP10.phx.gbl... > > What language are you using there? That looks like managed C++ which is > NOT > > supported on Windows CE.NET devices at this time. > > > > -- > > Steve Maillet (eMVP) > > Entelechy Consulting > > smaillet_AT_EntelechyConsulting_DOT_com > > > > > >
1) Targeting Windows CE.NET? If so, download and install eMbedded Visual C++ 4.0. 2) Well, for this, you'll have to get eMbedded Visual C++ ***3.0***. You won't be able to use that same DLL from #1 in this scenario, though, as it's OS version will be set to a higher number than the OS on the PPC2002, so it won't run. You'll have to either get the source and build it yourself with eVC 3 or have whomever developed it originally rebuild it with eVC 3 for you. 3) OK. If you're targeting PPC 2002, then you'd use eVC 3.0 for this. Paul T. [quoted text, click to view] "Kenric Li" <likenric@hotmail.com> wrote in message news:OUQUQn9oDHA.2772@TK2MSFTNGP12.phx.gbl... > Paul, > > So can you give me some advice on what I can do? Here are my design > constraints: > > 1) I have an dll which was programmed by Windows CE .Net, that I have to > link to and developed on top of. > > 2) I would like to develop a dll / library (can be either by managed or > unmanaged code) which link to that dll indicated in (1) to be ran on Pocket > PC 2002. > > 3) My preference is to develop some other unmanaged C++ code to invoke the > layer in (2) > > Thanks > > Kenric > > > > "Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote in > message news:e0QjJa9oDHA.360@TK2MSFTNGP12.phx.gbl... > > You're using a development environment which doesn't support your target > > device. If you want to use unmanaged C++ to program your Pocket PC, you > > should download eMbedded Visual C++ (3.0 or 4.0, depending on whether you > > are using PPC 2000/2002 or 2003). > > > > You *can* use managed code on your Pocket PC, but you must have Visual > > ***Studio***.NET 2003 Pro or better to do that. > > > > By the same token, if you have a DLL which is compiled for Windows CE.NET, > > it *won't work* on desktop Windows without being recompiled. > > > > Paul T. > > > > "Kenric Li" <likenric@hotmail.com> wrote in message > > news:O$lyjG9oDHA.2820@TK2MSFTNGP10.phx.gbl... > > > Hi Steve, > > > > > > I am using Visual C++ .net 2002. The dll I am linking seems to be > > > programmed by Windows CE.net > > > > > > Would you kindly give me any suggestions? > > > > > > Regards, > > > > > > Kenric > > > > > > > > > "Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in > message > > > news:eNX46x8oDHA.2820@TK2MSFTNGP10.phx.gbl... > > > > What language are you using there? That looks like managed C++ which > is > > > NOT > > > > supported on Windows CE.NET devices at this time. > > > > > > > > -- > > > > Steve Maillet (eMVP) > > > > Entelechy Consulting > > > > smaillet_AT_EntelechyConsulting_DOT_com > > > > > > > > > > > > > > > > > > > >
What language are you using there? That looks like managed C++ which is NOT supported on Windows CE.NET devices at this time. -- Steve Maillet (eMVP) Entelechy Consulting smaillet_AT_EntelechyConsulting_DOT_com
Hi Steve, I am using Visual C++ .net 2002. The dll I am linking seems to be programmed by Windows CE.net Would you kindly give me any suggestions? Regards, Kenric [quoted text, click to view] "Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in message news:eNX46x8oDHA.2820@TK2MSFTNGP10.phx.gbl... > What language are you using there? That looks like managed C++ which is NOT > supported on Windows CE.NET devices at this time. > > -- > Steve Maillet (eMVP) > Entelechy Consulting > smaillet_AT_EntelechyConsulting_DOT_com > >
Paul, So can you give me some advice on what I can do? Here are my design constraints: 1) I have an dll which was programmed by Windows CE .Net, that I have to link to and developed on top of. 2) I would like to develop a dll / library (can be either by managed or unmanaged code) which link to that dll indicated in (1) to be ran on Pocket PC 2002. 3) My preference is to develop some other unmanaged C++ code to invoke the layer in (2) Thanks Kenric "Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote in message news:e0QjJa9oDHA.360@TK2MSFTNGP12.phx.gbl... [quoted text, click to view] > You're using a development environment which doesn't support your target > device. If you want to use unmanaged C++ to program your Pocket PC, you > should download eMbedded Visual C++ (3.0 or 4.0, depending on whether you > are using PPC 2000/2002 or 2003). > > You *can* use managed code on your Pocket PC, but you must have Visual > ***Studio***.NET 2003 Pro or better to do that. > > By the same token, if you have a DLL which is compiled for Windows CE.NET, > it *won't work* on desktop Windows without being recompiled. > > Paul T. > > "Kenric Li" <likenric@hotmail.com> wrote in message > news:O$lyjG9oDHA.2820@TK2MSFTNGP10.phx.gbl... > > Hi Steve, > > > > I am using Visual C++ .net 2002. The dll I am linking seems to be > > programmed by Windows CE.net > > > > Would you kindly give me any suggestions? > > > > Regards, > > > > Kenric > > > > > > "Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in message > > news:eNX46x8oDHA.2820@TK2MSFTNGP10.phx.gbl... > > > What language are you using there? That looks like managed C++ which is > > NOT > > > supported on Windows CE.NET devices at this time. > > > > > > -- > > > Steve Maillet (eMVP) > > > Entelechy Consulting > > > smaillet_AT_EntelechyConsulting_DOT_com > > > > > > > > > > > >
Paul, Thanks for your advice. Kenric "Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote in message news:elw6Bv9oDHA.1284@TK2MSFTNGP09.phx.gbl... [quoted text, click to view] > 1) Targeting Windows CE.NET? If so, download and install eMbedded Visual > C++ 4.0. > > 2) Well, for this, you'll have to get eMbedded Visual C++ ***3.0***. You > won't be able to use that same DLL from #1 in this scenario, though, as it's > OS version will be set to a higher number than the OS on the PPC2002, so it > won't run. You'll have to either get the source and build it yourself with > eVC 3 or have whomever developed it originally rebuild it with eVC 3 for > you. > > 3) OK. If you're targeting PPC 2002, then you'd use eVC 3.0 for this. > > Paul T. > > "Kenric Li" <likenric@hotmail.com> wrote in message > news:OUQUQn9oDHA.2772@TK2MSFTNGP12.phx.gbl... > > Paul, > > > > So can you give me some advice on what I can do? Here are my design > > constraints: > > > > 1) I have an dll which was programmed by Windows CE .Net, that I have to > > link to and developed on top of. > > > > 2) I would like to develop a dll / library (can be either by managed or > > unmanaged code) which link to that dll indicated in (1) to be ran on > Pocket > > PC 2002. > > > > 3) My preference is to develop some other unmanaged C++ code to invoke the > > layer in (2) > > > > Thanks > > > > Kenric > > > > > > > > "Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote in > > message news:e0QjJa9oDHA.360@TK2MSFTNGP12.phx.gbl... > > > You're using a development environment which doesn't support your target > > > device. If you want to use unmanaged C++ to program your Pocket PC, you > > > should download eMbedded Visual C++ (3.0 or 4.0, depending on whether > you > > > are using PPC 2000/2002 or 2003). > > > > > > You *can* use managed code on your Pocket PC, but you must have Visual > > > ***Studio***.NET 2003 Pro or better to do that. > > > > > > By the same token, if you have a DLL which is compiled for Windows > CE.NET, > > > it *won't work* on desktop Windows without being recompiled. > > > > > > Paul T. > > > > > > "Kenric Li" <likenric@hotmail.com> wrote in message > > > news:O$lyjG9oDHA.2820@TK2MSFTNGP10.phx.gbl... > > > > Hi Steve, > > > > > > > > I am using Visual C++ .net 2002. The dll I am linking seems to be > > > > programmed by Windows CE.net > > > > > > > > Would you kindly give me any suggestions? > > > > > > > > Regards, > > > > > > > > Kenric > > > > > > > > > > > > "Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in > > message > > > > news:eNX46x8oDHA.2820@TK2MSFTNGP10.phx.gbl... > > > > > What language are you using there? That looks like managed C++ which > > is > > > > NOT > > > > > supported on Windows CE.NET devices at this time. > > > > > > > > > > -- > > > > > Steve Maillet (eMVP) > > > > > Entelechy Consulting > > > > > smaillet_AT_EntelechyConsulting_DOT_com > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Ken, I think the best way to do this is C# or VB.NET. However, since the library is developed in WinCE.NET. It may not work with PocketPC 2002 (WinCE 3.0). You may need to have it run in PocketPC 2003 (WinCE.NET). [quoted text, click to view] "Kenric Li" <likenric@hotmail.com> wrote in message news:On5CuAIpDHA.2488@TK2MSFTNGP12.phx.gbl... > Paul, > > Actually, I have a very fundamental question: > > If I have a dll developed in unmanaged visual C++, is it possible for it to > invoke a managed dll which used some .net APIs > > Regards, > > Kenric > > > "Kenric Li" <likenric@hotmail.com> wrote in message > news:u3ZcQ09oDHA.2232@TK2MSFTNGP09.phx.gbl... > > Paul, > > > > Thanks for your advice. > > > > Kenric > > > > > > "Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote in > > message news:elw6Bv9oDHA.1284@TK2MSFTNGP09.phx.gbl... > > > 1) Targeting Windows CE.NET? If so, download and install eMbedded > Visual > > > C++ 4.0. > > > > > > 2) Well, for this, you'll have to get eMbedded Visual C++ ***3.0***. > You > > > won't be able to use that same DLL from #1 in this scenario, though, as > > it's > > > OS version will be set to a higher number than the OS on the PPC2002, so > > it > > > won't run. You'll have to either get the source and build it yourself > > with > > > eVC 3 or have whomever developed it originally rebuild it with eVC 3 for > > > you. > > > > > > 3) OK. If you're targeting PPC 2002, then you'd use eVC 3.0 for this. > > > > > > Paul T. > > > > > > "Kenric Li" <likenric@hotmail.com> wrote in message > > > news:OUQUQn9oDHA.2772@TK2MSFTNGP12.phx.gbl... > > > > Paul, > > > > > > > > So can you give me some advice on what I can do? Here are my design > > > > constraints: > > > > > > > > 1) I have an dll which was programmed by Windows CE .Net, that I have > to > > > > link to and developed on top of. > > > > > > > > 2) I would like to develop a dll / library (can be either by managed > or > > > > unmanaged code) which link to that dll indicated in (1) to be ran on > > > Pocket > > > > PC 2002. > > > > > > > > 3) My preference is to develop some other unmanaged C++ code to invoke > > the > > > > layer in (2) > > > > > > > > Thanks > > > > > > > > Kenric > > > > > > > > > > > > > > > > "Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote > in > > > > message news:e0QjJa9oDHA.360@TK2MSFTNGP12.phx.gbl... > > > > > You're using a development environment which doesn't support your > > target > > > > > device. If you want to use unmanaged C++ to program your Pocket PC, > > you > > > > > should download eMbedded Visual C++ (3.0 or 4.0, depending on > whether > > > you > > > > > are using PPC 2000/2002 or 2003). > > > > > > > > > > You *can* use managed code on your Pocket PC, but you must have > Visual > > > > > ***Studio***.NET 2003 Pro or better to do that. > > > > > > > > > > By the same token, if you have a DLL which is compiled for Windows > > > CE.NET, > > > > > it *won't work* on desktop Windows without being recompiled. > > > > > > > > > > Paul T. > > > > > > > > > > "Kenric Li" <likenric@hotmail.com> wrote in message > > > > > news:O$lyjG9oDHA.2820@TK2MSFTNGP10.phx.gbl... > > > > > > Hi Steve, > > > > > > > > > > > > I am using Visual C++ .net 2002. The dll I am linking seems to be > > > > > > programmed by Windows CE.net > > > > > > > > > > > > Would you kindly give me any suggestions? > > > > > > > > > > > > Regards, > > > > > > > > > > > > Kenric > > > > > > > > > > > > > > > > > > "Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in > > > > message > > > > > > news:eNX46x8oDHA.2820@TK2MSFTNGP10.phx.gbl... > > > > > > > What language are you using there? That looks like managed C++ > > which > > > > is > > > > > > NOT > > > > > > > supported on Windows CE.NET devices at this time. > > > > > > > > > > > > > > -- > > > > > > > Steve Maillet (eMVP) > > > > > > > Entelechy Consulting > > > > > > > smaillet_AT_EntelechyConsulting_DOT_com > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Paul, Actually, I have a very fundamental question: If I have a dll developed in unmanaged visual C++, is it possible for it to invoke a managed dll which used some .net APIs Regards, Kenric [quoted text, click to view] "Kenric Li" <likenric@hotmail.com> wrote in message news:u3ZcQ09oDHA.2232@TK2MSFTNGP09.phx.gbl... > Paul, > > Thanks for your advice. > > Kenric > > > "Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote in > message news:elw6Bv9oDHA.1284@TK2MSFTNGP09.phx.gbl... > > 1) Targeting Windows CE.NET? If so, download and install eMbedded Visual > > C++ 4.0. > > > > 2) Well, for this, you'll have to get eMbedded Visual C++ ***3.0***. You > > won't be able to use that same DLL from #1 in this scenario, though, as > it's > > OS version will be set to a higher number than the OS on the PPC2002, so > it > > won't run. You'll have to either get the source and build it yourself > with > > eVC 3 or have whomever developed it originally rebuild it with eVC 3 for > > you. > > > > 3) OK. If you're targeting PPC 2002, then you'd use eVC 3.0 for this. > > > > Paul T. > > > > "Kenric Li" <likenric@hotmail.com> wrote in message > > news:OUQUQn9oDHA.2772@TK2MSFTNGP12.phx.gbl... > > > Paul, > > > > > > So can you give me some advice on what I can do? Here are my design > > > constraints: > > > > > > 1) I have an dll which was programmed by Windows CE .Net, that I have to > > > link to and developed on top of. > > > > > > 2) I would like to develop a dll / library (can be either by managed or > > > unmanaged code) which link to that dll indicated in (1) to be ran on > > Pocket > > > PC 2002. > > > > > > 3) My preference is to develop some other unmanaged C++ code to invoke > the > > > layer in (2) > > > > > > Thanks > > > > > > Kenric > > > > > > > > > > > > "Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote in > > > message news:e0QjJa9oDHA.360@TK2MSFTNGP12.phx.gbl... > > > > You're using a development environment which doesn't support your > target > > > > device. If you want to use unmanaged C++ to program your Pocket PC, > you > > > > should download eMbedded Visual C++ (3.0 or 4.0, depending on whether > > you > > > > are using PPC 2000/2002 or 2003). > > > > > > > > You *can* use managed code on your Pocket PC, but you must have Visual > > > > ***Studio***.NET 2003 Pro or better to do that. > > > > > > > > By the same token, if you have a DLL which is compiled for Windows > > CE.NET, > > > > it *won't work* on desktop Windows without being recompiled. > > > > > > > > Paul T. > > > > > > > > "Kenric Li" <likenric@hotmail.com> wrote in message > > > > news:O$lyjG9oDHA.2820@TK2MSFTNGP10.phx.gbl... > > > > > Hi Steve, > > > > > > > > > > I am using Visual C++ .net 2002. The dll I am linking seems to be > > > > > programmed by Windows CE.net > > > > > > > > > > Would you kindly give me any suggestions? > > > > > > > > > > Regards, > > > > > > > > > > Kenric > > > > > > > > > > > > > > > "Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in > > > message > > > > > news:eNX46x8oDHA.2820@TK2MSFTNGP10.phx.gbl... > > > > > > What language are you using there? That looks like managed C++ > which > > > is > > > > > NOT > > > > > > supported on Windows CE.NET devices at this time. > > > > > > > > > > > > -- > > > > > > Steve Maillet (eMVP) > > > > > > Entelechy Consulting > > > > > > smaillet_AT_EntelechyConsulting_DOT_com > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Kenric, You can't invoke code in Compact Framework DLLs from an eVC++ DLL. You could do something crude like CreateProcess to execute a managed app from an unmanaged one and the managed app could understand command line args passed to it, but that's about it. -- Ginny Caughey ..Net Compact Framework MVP [quoted text, click to view] "Kenric Li" <likenric@hotmail.com> wrote in message news:On5CuAIpDHA.2488@TK2MSFTNGP12.phx.gbl... > Paul, > > Actually, I have a very fundamental question: > > If I have a dll developed in unmanaged visual C++, is it possible for it to > invoke a managed dll which used some .net APIs > > Regards, > > Kenric > > > "Kenric Li" <likenric@hotmail.com> wrote in message > news:u3ZcQ09oDHA.2232@TK2MSFTNGP09.phx.gbl... > > Paul, > > > > Thanks for your advice. > > > > Kenric > > > > > > "Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote in > > message news:elw6Bv9oDHA.1284@TK2MSFTNGP09.phx.gbl... > > > 1) Targeting Windows CE.NET? If so, download and install eMbedded > Visual > > > C++ 4.0. > > > > > > 2) Well, for this, you'll have to get eMbedded Visual C++ ***3.0***. > You > > > won't be able to use that same DLL from #1 in this scenario, though, as > > it's > > > OS version will be set to a higher number than the OS on the PPC2002, so > > it > > > won't run. You'll have to either get the source and build it yourself > > with > > > eVC 3 or have whomever developed it originally rebuild it with eVC 3 for > > > you. > > > > > > 3) OK. If you're targeting PPC 2002, then you'd use eVC 3.0 for this. > > > > > > Paul T. > > > > > > "Kenric Li" <likenric@hotmail.com> wrote in message > > > news:OUQUQn9oDHA.2772@TK2MSFTNGP12.phx.gbl... > > > > Paul, > > > > > > > > So can you give me some advice on what I can do? Here are my design > > > > constraints: > > > > > > > > 1) I have an dll which was programmed by Windows CE .Net, that I have > to > > > > link to and developed on top of. > > > > > > > > 2) I would like to develop a dll / library (can be either by managed > or > > > > unmanaged code) which link to that dll indicated in (1) to be ran on > > > Pocket > > > > PC 2002. > > > > > > > > 3) My preference is to develop some other unmanaged C++ code to invoke > > the > > > > layer in (2) > > > > > > > > Thanks > > > > > > > > Kenric > > > > > > > > > > > > > > > > "Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote > in > > > > message news:e0QjJa9oDHA.360@TK2MSFTNGP12.phx.gbl... > > > > > You're using a development environment which doesn't support your > > target > > > > > device. If you want to use unmanaged C++ to program your Pocket PC, > > you > > > > > should download eMbedded Visual C++ (3.0 or 4.0, depending on > whether > > > you > > > > > are using PPC 2000/2002 or 2003). > > > > > > > > > > You *can* use managed code on your Pocket PC, but you must have > Visual > > > > > ***Studio***.NET 2003 Pro or better to do that. > > > > > > > > > > By the same token, if you have a DLL which is compiled for Windows > > > CE.NET, > > > > > it *won't work* on desktop Windows without being recompiled. > > > > > > > > > > Paul T. > > > > > > > > > > "Kenric Li" <likenric@hotmail.com> wrote in message > > > > > news:O$lyjG9oDHA.2820@TK2MSFTNGP10.phx.gbl... > > > > > > Hi Steve, > > > > > > > > > > > > I am using Visual C++ .net 2002. The dll I am linking seems to be > > > > > > programmed by Windows CE.net > > > > > > > > > > > > Would you kindly give me any suggestions? > > > > > > > > > > > > Regards, > > > > > > > > > > > > Kenric > > > > > > > > > > > > > > > > > > "Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in > > > > message > > > > > > news:eNX46x8oDHA.2820@TK2MSFTNGP10.phx.gbl... > > > > > > > What language are you using there? That looks like managed C++ > > which > > > > is > > > > > > NOT > > > > > > > supported on Windows CE.NET devices at this time. > > > > > > > > > > > > > > -- > > > > > > > Steve Maillet (eMVP) > > > > > > > Entelechy Consulting > > > > > > > smaillet_AT_EntelechyConsulting_DOT_com > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Don't see what you're looking for? Try a search.
|
|
|