hi,

i'm new to this environment, porting an app from xp to wince. one of the in
house libraries that i'm porting has a call to the c lib function mkdir(). i
can't find any trace or hint of this in the wince or embedded libraries.
does wince use a different call to make a new folder? does it not allow you
to make folders from an app?

also, with no errno.h, what do you do with errno? the same lib
specifically checks for EEXIST, a standard error that errno can be set to if
a file or directory doesn't exist. how does wince use, or does it use, errno?

thanks

mickm

Re: Questions about Standard C lib functions by r_z_aret

r_z_aret
Mon Mar 13 17:12:22 CST 2006

On Mon, 13 Mar 2006 11:30:11 -0800, Mickey Mestel
<MickeyMestel@discussions.microsoft.com> wrote:

> hi,
>
>i'm new to this environment, porting an app from xp to wince. one of the in
>house libraries that i'm porting has a call to the c lib function mkdir(). i
>can't find any trace or hint of this in the wince or embedded libraries.
>does wince use a different call to make a new folder? does it not allow you
>to make folders from an app?

I use CreateDirectory for CE and "big" Windows.


>
>also, with no errno.h, what do you do with errno? the same lib
>specifically checks for EEXIST, a standard error that errno can be set to if
>a file or directory doesn't exist. how does wince use, or does it use, errno?

I can't help with this.


>
>thanks
>
>mickm
>

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com

Re: Questions about Standard C lib functions by kkowalczyk

kkowalczyk
Mon Mar 13 23:56:35 CST 2006

>also, with no errno.h, what do you do with errno? the same lib
>specifically checks for EEXIST, a standard error that errno can be set to if
>a file or directory doesn't exist. how does wince use, or does it use, errno?

In general, rough equivalent of of errno on Windows is GetLastError()
API. For example, if CreateDirectory fails you can call GetLastError()
and it might e.g. returns ERROR_ALREADY_EXISTS (which might be
equivalent of checking for errno == EEXIST). But you really need to
figure out the semantics of an API you're porting and find an API that
does the same thing on Windows. There is no one answer for all possible
uses of errno.

Krzysztof Kowalczyk | http://blog.kowalczyk.info