VirtualBox

Changeset 8560 in vbox for trunk/src


Ignore:
Timestamp:
May 5, 2008 10:09:29 AM (17 years ago)
Author:
vboxsync
Message:

To/FromNative - windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/fileio-win.cpp

    r8245 r8560  
    126126
    127127    return fIsBeyondLimit;
     128}
     129
     130
     131RTR3DECL(int) RTFileFromNative(PRTFILE pFile, RTHCINTPTR uNative)
     132{
     133    HANDLE h = (HANDLE)uNative;
     134    if (    h == INVALID_HANDLE_VALUE
     135        ||  (RTFILE)uNative != uNative)
     136    {
     137        AssertMsgFailed(("%p\n", uNative));
     138        *pFile = NIL_RTFILE;
     139        return VERR_INVALID_HANDLE;
     140    }
     141    *pFile = (RTFILE)h;
     142    return VINF_SUCCESS;
     143}
     144
     145
     146RTR3DECL(RTHCINTPTR) RTFileToNative(RTFILE File)
     147{
     148    AssertReturn(File != NIL_RTFILE, (RTHCINTPTR)INVALID_HANDLE_VALUE);
     149    return (RTHCINTPTR)File;
    128150}
    129151
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette