locked
How to use Embedded VC++ code in Visual Studio 2005 RRS feed

  • Question

  • I have the following situation:

    I am working on a C# project for Pocket PC and I want to add OCR functionality to my application. The only SDK for Windows CE I found is made for Embedded Visual C++ 4.0. Unfortunately I don't know how to use this SDK within Visual Studio 2005. Is that possible at all?

    My ideas are:

    1. Compile this SDK under Embedded VC++ as DLL and add a reference to it in VS2005.
    2. Convert the eVC++ project to VS2005 project, compile a DLL and use it as reference.

    I don't know if this makes sense? Is there another way to use this SDK in my VS2005 project?

    I tried to convert to VS2005 with the wizard, but it fails with: "No platforms are available that match this project file's original platforms.". I have Windows Mobile 5 and 6 SDKs installed on the machine...


    I'm stuck on this and a bit confused... and I would appreciate any help.

    Cheers,
    Vasil
    Monday, April 28, 2008 9:07 PM

Answers

  • Vasil:

     

    I'm not familiar with this OCR SDK you are referring to, but if it lives on the device's DLL, you can load that DLL at run-time (LoadLibrary()), get pointers to the functions you need and call those functions. When you're done, free the DLL (FreeLibrary()).

     

    Jean

     

    Wednesday, April 30, 2008 12:11 PM

All replies

  • Vasil:

     

    I'm not familiar with this OCR SDK you are referring to, but if it lives on the device's DLL, you can load that DLL at run-time (LoadLibrary()), get pointers to the functions you need and call those functions. When you're done, free the DLL (FreeLibrary()).

     

    Jean

     

    Wednesday, April 30, 2008 12:11 PM
  • Jean,

    it is not the LoadLibrary() what I actually need. I guess I should use the P/Invoke procedure, in order to be able to use the methods from the C++ DLL...

    I am still wriggling...
    Thursday, May 15, 2008 1:36 PM
  • 1.       It does not matter which toolset you would use to compile that C++ library. Using modern tools like VS 2008 or VS 2005 is probably a good idea but eVC 4 would do.

    2.       To access native library from managed code you would to P/Invoke (in case that library exposes flat C entry points) or use COM interop (in case this library is a COM object).

    If you’re not familiar with P/Invoke or COM interop there are number of articles on MSDN I’m sure you’ll be able to find on your own in no time.

     

    Thursday, May 15, 2008 4:54 PM