equal
deleted
inserted
replaced
3164 @param aHandleOrError A handle-number, if zero or positive; an error value, if negative. |
3164 @param aHandleOrError A handle-number, if zero or positive; an error value, if negative. |
3165 |
3165 |
3166 @return KErrNone, if aHandle is a handle-number; the value of aHandleOrError, otherwise. |
3166 @return KErrNone, if aHandle is a handle-number; the value of aHandleOrError, otherwise. |
3167 */ |
3167 */ |
3168 { |
3168 { |
|
3169 #ifndef __SYMC__ |
3169 if(aHandleOrError>=0) |
3170 if(aHandleOrError>=0) |
3170 { |
3171 { |
3171 iHandle = aHandleOrError; |
3172 iHandle = aHandleOrError; |
3172 return KErrNone; |
3173 return KErrNone; |
3173 } |
3174 } |
3174 iHandle = 0; |
3175 iHandle = 0; |
3175 return aHandleOrError; |
3176 return aHandleOrError; |
|
3177 #elif defined(_WIN32) |
|
3178 //Our problem is that win32 handles can be negative |
|
3179 if (aHandleOrError==NULL) |
|
3180 { |
|
3181 //TODO: check GetLastError and return proper error code |
|
3182 return KErrUnknown; |
|
3183 } |
|
3184 //Valid handle |
|
3185 iHandle = aHandleOrError; |
|
3186 return KErrNone; |
|
3187 #else |
|
3188 #error "Platform not supported" |
|
3189 #endif |
3176 } |
3190 } |
3177 |
3191 |
3178 |
3192 |
3179 |
3193 |
3180 |
3194 |