platform compliance

Hi,

I am trying to port a C++ project from linux to pocket pc 2003 .

I have pbs with 2 functions: getenv and _dup (which is equivalent to fcntl).

Is there a way of getting around these 2 functions (seems they re not available on windows ce).

thanks.


Answer this question

platform compliance

  • Ihabd

    You'll have to rework your code for both of those.

    getenv:
    On CE there's no concept of environment variables so you should be able to #if the code that refers to getenv and not affect your CE executable.  If you're setting and using environment variables for some internal usage, you'll need to find a different way of implement the functionality.  (Using the registry is a common approach taken).

    _dup:
    Looking at the desktop implementation (If you have Visual Studio installed, you can look under the crt\src directory), it looks like you might be able to use DuplicateHandle to implement your own version of _dup.  (Depending on how much of _dup you are trying to use).






  • platform compliance