C and C++ Programming Resources | C & C++ Code Example Index | C++ Code Example Index

 

 

 

 

The Windows C Run-Time (CRT) Sample Code Index Page

 

The following source code samples are making use the Windows C run-time library. The C run-time library provides routines for Windows operating system programming that based on C language. These routines automate many common programming tasks that are not provided by the standard C and C++ languages. There are many library files that contain Windows C run-time library that are discussed in MSDN.

 

 

C Run-Time, CRT (The C Run-Time/CRT code samples used in Windows programming)

  1. Spawning a process using _spawn function family

  2. Another example of passing an argument to the Windows process

  3. Passing an argument to the Windows process

  4. The _exec C function family example, executing other processes

  5. Executing the Windows process (program)

  6. Windows processes: the _execl() and _spawnl() function families

  7. Another localtime(), _localtime64(), _localetime64_s() functions

  8. localtime_s(), _localtime64_s(), asctime_s() C functions

  9. The ftime64_s() and ctime_s() functions: Displaying the current system date and time

  10. The _gmtime64_s() and asctime_s() functions: converting the coordinated universal time to ASCII strings

  11. Another setlocale(), _gmtime64_s(), _time64() and strftime() program example

  12. The setlocale(), strftime() and gmtime() functions: set the current locale to "Italian" and "French"

  13. The DeleteVolumeMountPoint() function: Unmount the disk from a folder C program example

  14. GetVolumeNameForVolumeMountPoint(), SetVolumeMountPoint(), GetVolumePathName() functions

  15. More on volume management functions - finding the mount point

  16. GetVolumeInformation(), ProcessVolume(), FindNextVolume(), FindVolumeClose() functions

  17. FindVolumeClose(), FindFirstVolume(), GetVolumeInformation() functions

  18. GetDiskFreeSpace(), GetDiskFreeSpaceEx() - finding disk free space

  19. QueryDosDevice() - Querying and displaying dos devices

  20. GetLogicalDriveStrings() - Finding DOS logical drive strings

  21. GetLogicalDrives() - finding DOS logical devices

  22. GetDriveType() - finding the drive types

  23. GetCurrentDirectory(), SetCurrentDirectory(), GetWindowsDirectory(), GetSystemDirectory() functions

  24. CreateDirectory(), CreateFile(), CloseHandle(), DeleteFile() and RemoveDirectory() functions

  25. CreateFile(), ReadFile(), SetFilePointer(), WriteFile(), LockFile(), UnlockFile() and CloseHandle() functions

  26. CreateFile() and SetFilePointer() functions

  27. CreateFile(), GetFileTime(), FileTimeToSystemTime(), SystemTimeToTzSpecificLocalTime() functions

  28. GetFileType(), GetFileSize(), GetFileTime(), FileTimeToSystemTime(), SystemTimeToTzToSpecificLocalTime() functions

  29. CreateFile(), GetFileType(), GetFileSize(), CloseHandle()

  30. CreateFile(), GetFileType(), GetBinaryType(), CloseHandle()

  31. SearchPath() function, searching a file

  32. FindFirstFile(), lstrcpy(), lstrcat(), SetFileAttributes(), CopyFile(), FindClose() functions

  33. CreateFile(), GetTempPath(), GetTempFileName(), WriteFile() etc

  34. CreateFile(), GetTempFileName(), ReadFile(), CloseHandle() and MoveFile()

  35. Using ReplaceFile() function to replace a file

  36. FindFirstFile() and macros for Windows header files

  37. GetShortPathName() - displaying short and long path name

  38. Run-time error of the access violation reading and writing

  39. CreateFile(), CloseHandle() and DeleteFile()

  40. Using standard input and output handle

  41. CreateFile(), GetHandleInformation() and CloseHandle()

  42. Using perror(), strerror_s() and _strerror_s()

  43. Displaying time in various format

  44. Various functions for drive, directory, file and permission

  45. Opening file for input and output, file handle and then close it

  46. Using the _stat64() and _ctime64_s()/_ctime64() functions

  47. Using _umask() to set the file-permission mask

  48. Directory, file and permissions (attributes)

  49. Using _getdrive(), _getch(), _putch(), _getdcwd(), _chdrive() etc

  50. Using _makepath()/_makepath_s(), _splitpath()/_splitpath_s() function in C program

  51. Using _fullpath() function

  52. Using _sopen()/_sopen_s(), _close(), _chsize()

  53. Using _chdir(), ctime()/ctime_s(), _findfirst(), _findnext() etc.

  54. Using _getdiskfree() function

  55. Another _getdrives() example

  56. Using _getdrives() function

 

 

 

C and C++ Programming Resources | C & C++ Code Example Index | C++ Code Example Index