CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: What are CRT file descriptors in Windows?

  1. #1
    Join Date
    Dec 2014
    Posts
    13

    What are CRT file descriptors in Windows?

    I've always thought that in Windows there are only Windows file handles (which are somewhat the counterpart of file descriptors in Linux), and that a FILE wraps a Windows file handle, but now I am reading about what are called CRT file descriptors, and that a FILE actually wraps a CRT file descriptor and in turn a CRT file descriptor maps to a Windows file handle.

    There are a whole set of functions that work with CRT file descriptors, such as _open() and _close() (which seems like the POSIX open() and close()!).

    To me this seems like a POSIX layer built on top of Win32 handles! Is my understanding on this issue correct? and why is this architecture used, why not just have a FILE wrap a Windows file handle directly?

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,607

    Re: What are CRT file descriptors in Windows?

    Your understanding is correct. POSIX layer really exists in Windows, and the reason for introducing it was the intention of providing POSIX API for the sake of compatibility and easy porting from other platforms.
    Best regards,
    Igor

  3. #3
    Join Date
    Jan 2021
    Posts
    8

    Re: What are CRT file descriptors in Windows?

    The C Run-time Library (CRT) is the part of the C++ Standard Library that incorporates the ISO C99 standard library. The Visual C++ libraries that implement the CRT support native code development, and both mixed native and managed code. All versions of the CRT support multi-threaded development. Most of the libraries support both static linking, to link the library directly into your code, or dynamic linking to let your code use common DLL files.
    Starting in Visual Studio 2015, the CRT has been refactored into new binaries. The Universal CRT (UCRT) contains the functions and globals exported by the standard C99 CRT library. The UCRT is now a Windows component, and ships as part of Windows 10. The static library, DLL import library, and header files for the UCRT are now found in the Windows 10 SDK. When you install Visual C++, Visual Studio setup installs the subset of the Windows 10 SDK required to use the UCRT. You can use the UCRT on any version of Windows supported by Visual Studio 2015 and later versions.

    I hope the information about CRT file descriptors will be useful to you!
    Tim Paine

  4. #4
    Join Date
    Jan 2021
    Posts
    8

    Re: What are CRT file descriptors in Windows?

    Manually Converting Exchange OST File to Outlook PST File

    There are two popular manual solutions executing which you can convert OST file into PST file or move OST data to the PST file.

    A. Archiving OST data to PST file
    B. Using Export Feature in Outlook

    A. Archiving OST emails to PST file
    Before starting the procedure in this solution, it is to be mentioned that user cannot move contacts to PST file through this method. Only emails can be archived to PST.
    You need to enable archive in order to save OST emails to a new archive PST file. Also, OST file needs to be accessed in the Outlook application. Perform the given steps to enable archive for an OST mailbox.

    Open your Outlook application and then navigate to File>Options.
    Now, click on Advanced option. Under AutoArchive feature section, click on AutoArchive Settings.
    In the opened AutoArchive window, add values as per your need to AutoArchive frequency of days, period for deletion of old items, etc. Here, under Move old items to section, you can browse and add the PST location where you want to save OST archived data. After all AutoArchive settings, click OK.

    B. Using Export feature in Outlook
    Run the Outlook application. Go to File>Open & Export>Import/Export.
    Select the option saying Export to a file and click on Next.
    Next, it will ask the file type you want to save the OST data. Select Outlook Data File (.pst) option. Click Next.
    You can move a single mailbox folder (mostly used Inbox folder) to PST. Select your choice and also select the checkbox Include sub folders. Then click on Next to continue.
    Click Browse and enter the address for the PST file location on your system. Choose any option for duplicate items and click on Finish.
    Learn about <advertising ink removed> migration of Microsoft 365 services in detail.

    I hope this is helpful!
    Tim Paine
    Last edited by 2kaud; January 1st, 2021 at 07:50 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)