Status of WinCE support???

2007-06-06
2013-04-08
  • Byron Guernsey

    Byron Guernsey - 2007-06-06

    What is the status of WinCE support in SmartWin++?

    Neither the Windows CE library, nor the sample solution will compile from the RC4 distribution.  Errors that have been discussed in these forums in the "WinCE Experience" thread and were claimed to have been fixed in CVS as of 4/11 still exist in the code in RC4.  In addition, there are other errors:

    1>LibraryLoader.cpp
    1>.\source\LibraryLoader.cpp(106) : error C2664: 'GetProcAddressW' : cannot convert parameter 2 from 'const char *' to 'LPCWSTR'
    1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    1>.\source\LibraryLoader.cpp(112) : error C2664: 'GetProcAddressW' : cannot convert parameter 2 from 'LPCSTR' to 'LPCWSTR'
    1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

    Is there a prior version of SmartWin++ that work with Windows CE?  Is this support dying on the vine?  Sadly, this isn't the first WinCE GUI Toolkit I've tried that fails to build.  wxWidgets also seems to fail build, but their discussions suggest that WinCE support is secondary.  SmartWin++ seemed to indicate in all literature that WinCE support is a core function of the project.

    Is someone testing these RC builds with the CE compilers?

     
    • andrew7

      andrew7 - 2007-06-09

      The solution to the above error is:

          // Get procedure address from loaded library by name
          FARPROC LibraryLoader::getProcAddress( const SmartUtil::tstring & procedureName )
          {
      #ifdef WINCE   
              return ::GetProcAddress( itsHMod, SmartUtil::UnicodeGuaranteed::doConvert( procedureName, SmartUtil::ConversionCodepage::ANSI ).c_str() );
      #else
              return ::GetProcAddress( itsHMod, SmartUtil::AsciiGuaranteed::doConvert( procedureName, SmartUtil::ConversionCodepage::ANSI ).c_str() );
      #endif
              // Strangely, GetProcAddress for WinCE needs LPCWSTR, and for Windows needs LPCSTR. 

          }

          // Get procedure address from loaded library by ordinal value
          FARPROC LibraryLoader::getProcAddress( long procedureOrdinal )
          {
      #ifdef WINCE   
              return ::GetProcAddress( itsHMod, (LPCWSTR)0 + procedureOrdinal );
      #else
              return ::GetProcAddress( itsHMod, (LPCSTR)0 + procedureOrdinal );
      #endif
          }

      This is checked into CVS, and I have built the wince side, and run it some on the emulation in Orcas on Vista. 

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks