0% found this document useful (0 votes)
19 views

Slides 1 22

Uploaded by

HAMNA KAHLU
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Slides 1 22

Uploaded by

HAMNA KAHLU
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 125

System Programming

Module #1
System Programming

Windows Operating
System
Windows Operating System
Memory Management
• Virtual Memory Management
System
• Transparent access
• Protection
• Huge Virtual Memory address
Space
Windows Operating System
Virtual Memory System

Main Memory Disk


Windows Operating System
File Management
• Named File system
• Hierarchical Directory Structure
• Supports sequential and direct
access
• Efficient File Management
System
Windows Operating System
Processors
• Efficient Allocation of
Computational Tasks
• Support Multiple Processors and
Core
Windows Operating System
Resource Naming and
Location
• Named File system
• Naming system for OS Resources
(Objects)
• OS manages scheduling and
arbitration among these named
Objects
Windows Operating System
Multitasking
• Supports different units of
execution
• Supports asynchronous execution
• Allows preempted Multitasking
• Allows Dynamic Priorities
Windows Operating System
Communication and
Synchronization
• Provides different constructs for
Synchronization and
Communication
• Supports communication over
stand alone computer and
Internet
Windows Operating System
Security and Protection
• Multi-User Systems
• Flexible Mechanism to protect
against unauthorized access
System Programming

Windows Evolution
Windows Evolution
Windows Evolution
• Windows API
• Incremental Steps
Windows Evolution
Themes of Windows
Evolution
• Scalability
• Performance
• Integration
• Ease of Use
• Enhanced API
Windows Evolution
Disk Operating System
(DOS)
• 1980s
• Text Based
• Primitively Multitasking
• FAT based File System
Windows Evolution
Windows 3.1
• GUI Based System
• Used DOS File System
• No Large Files
• No Security
• Primitive Memory Management
Windows Evolution
Windows 95, 97, 98, ME
• Win32
• Better Memory Management
• Did not Support NT technology
Windows Evolution
Windows NT 3.1, 3.5, 4.0
and Windows 2000
• Based on NT kernel
• Supported Multiuser system
• Supported NTFS
• Better Security Features
Windows Evolution
Windows Server 2008
• Professional Use
• Server
• Supported Multicore
Multiprocessor Systems
• 64 bit Support
Windows Evolution
Further Improvements
• Windows XP
• Windows Vista 2007
• Windows 7 (2009)
• Windows 10 (2014)
System Programming

Windows Market
Role
Windows Market Role
Windows Market Role
• Market Dominance
• Availability of development and
integration tools
• Diverse platforms
• Familiar and Generic GUI
• Customizable
• Modern features not found in
other OS
System Programming

Windows,
Standards and
Open Systems
Windows, Standards and Open Systems
Windows, Standards and Open
Systems
• Uniform Implementations
• No non-standard Extensions
• Competent OS products
• Hardware Platform is open
Windows, Standards and Open Systems
Essential Interoperability
Standards Supported by
Windows
• Standard C/C++ Libraries
• Sockets for Networking
• RPCs
• TCP/IP
• X Windows Client Server
• Others

END
System Programming

Windows Principles
Windows Principles
• All the windows resources are
treated as objects. In order to
identify each such object Windows
provides a handle.
• These objects cannot be directly
accessed, they can only be
operated by APIs provided by
Windows
• Examples of such objects are
Processes, threads, pipes, memory
maps, DLLs, events etc.
Windows Principles
• Many API functions may perform
different operations on a handle.
However, to perform well known
high level operation Windows may
provide a convenience function
that methodically uses all the APIs
in a single function.
• A function may have a long list of
parameters. Usually for a simple
operation many of these parameter
or their significance can be ignored.
Windows Principles
• Windows provide a number of
synchronization constructs based
on need
• Basic unit of execution is thread, a
process can have a single or many
threads
• Windows function names are long
but descriptive like
• WaitForSingleObject
• WaitForSingleObjectEx
• WaitForMultipleObjects
• WaitNamedPipe
Windows Principles
• Mostly types defined for Windows
APIs are given in upper cases and
have descriptive names like
• BOOL
• HANDLE
• LPTSTR
• DWORD
• All declarations for Windows API
avoid the pointer operator (*). For
example TCHAR is character type,
LPTSTR is the type used as its
pointer. It has been defined as
TCHAR * for Windows API
Windows Principles
• Hungarian notation is the popular
convention used to define variable.
The prefix letters of variable name
are chosen to signify its data type
for example in the variable name
lpszFilename the prefix characters
signify that the data type of the
variable is long pointer to zero
terminated string.
• All the datatypes, prototypes,
headers etc used by windows API
END are defined in windows.h header
file
System Programming

32-bit and 64-bit


source code
portability
32-bit and 64-bit Source Code Portability
• A single source code can be
built on 32-bit as well as 64-bit
versions
• Usually 32-bit and 64-bit
versions of APIs available
• Compiler determines at run
time which version to use
based on settings
• A 32-bit code can run on 64-
bit hardware but will be
unable to use large disk space
or large pointer or 64-bit
operations
32-bit and 64-bit Source Code Portability
• With some care and trick its
possible to ensure whether
the code will be compiled as
32-bit or 64-bit code.
• A times very little effort
maybe required to port a 32-
bit code into 64-bit.

END
System Programming

When to Use
Standard C Library
for File Operations
When to Use Standard C Library for File Operations
• All C compilers support the
Standard C functions or the ANSI C
functions like fopen() fread()
fwrite() etc.
• In case the program is meant to be
ported to platforms other than
windows then its might occur
useful to use Standard C Library
functions.
• Use of standard functions makes
the code more portable.
When to Use Standard C Library for File Operations
• The standard C functions also make
use of Windows APIs at low level
• However, the use of Standard C
function will render the code
incapable of incorporating
advanced windows file processing
features like file locking,
synchronization, asynchronous I/O,
Random access to files greater
than 4GB and interprocess
communication
When to Use Standard C Library for File Operations
• So as conclusion Standard C library
can be used only it file processing
is required. In order to make the
code capable of using advanced
features like file locking,
asynchronous I/O etc. only
Windows APIs can be used.

END
System Programming

A simple File Copy


Program using
Standard C Library
A Simple File Copy Using Standard C Library
Tools for Running Programs
• A Computer With Windows
• A C/C++ Compiler for
windows, Preferrably
Microsoft Visual Studio any
version above 2005
• Enough RAM and Disk Space
• Microsoft Developer Network
(MSDN) for Reference
A Simple File Copy Using Standard C Library
/* Chapter 1. Basic cp file copy program. C library Implementation. */
/* cpC file1 file2: Copy file1 to file2. */
#include <stdio.h>
#include <errno.h>
#define BUF_SIZE 256
int main(int argc, char *argv[])
{
FILE *inFile, *outFile;
char rec[BUF_SIZE];
size_t bytesIn, bytesOut;
if (argc != 3) {
fprintf(stderr, "Usage: cp file1 file2\n");
return 1;
}
A Simple File Copy Using Standard C Library
/* In later chapters, we'll use the more secure functions, such as fopen_s
* See http://msdn.microsoft.com/en-us/library/8ef0s5kh%28VS.80%29.aspx
* Note that this project defines the macro _CRT_SECURE_NO_WARNINGS to avoid a warning
*/
inFile = fopen(argv[1], "rb");
if (inFile == NULL) {
perror(argv[1]);
return 2;
}
outFile = fopen(argv[2], "wb");
if (outFile == NULL) {
perror(argv[2]);
fclose(inFile);
return 3;
}
A Simple File Copy Using Standard C Library
/* Process the input file a record at a time. */

while ((bytesIn = fread(rec, 1, BUF_SIZE, inFile)) > 0) {


bytesOut = fwrite(rec, 1, bytesIn, outFile);
if (bytesOut != bytesIn) {
perror("Fatal write error.");
fclose(inFile); fclose(outFile);
return 4;
}
}

fclose(inFile);
fclose(outFile);
return 0;
}
A Simple File Copy Using Standard C Library

Demo
System Programming

Module #9
System Programming

A Simple File Copy


Program using
Windows API
A Simple File Copy Program using Windows
API
/* Chapter 1. Basic cp file copy program. Win32 Implementation. */
/* cpW file1 file2: Copy file1 to file2. */
/* Chapter 1. Basic cp file copy program. Win32 Implementation. */
/* cpW file1 file2: Copy file1 to file2. */

#include <windows.h>
#include <stdio.h>
//#include <stringapiset.h>

#define BUF_SIZE 16384 /* Optimal in several experiments. Small values such as 256 give very bad
performance */

int main(int argc, char * argv[])


{
HANDLE hIn, hOut;
DWORD nIn, nOut;
CHAR buffer[BUF_SIZE];
LPWSTR lpwszFile1, lpwszFile2;
A Simple File Copy Program using Windows API
A Simple File Copy Program using Windows API
System Programming

Module #10
System Programming

A Simple File Copy


Program using
Windows
Convenience
Function
Copy Using Convenience Function
/* Chapter 1. Basic cp file copy program.
Windows Implementation using CopyFile for convenience and possible
performance. */
/* cp file1 file2: Copy file1 to file2. */

#include <windows.h>
#include <stdio.h>
#define BUF_SIZE 256
LPWSTR lpwszFile1, lpwszFile2;
INT iLen1, iLen2;

int main (int argc, LPTSTR argv [])


{
if (argc != 3) {
fprintf (stderr, "Usage: cp file1 file2\n");
return 1;
System Programming

Module #11
System Programming

Windows File
System
Windows File Systems
• NT File System (NTFS)
• Security
• Fault Tolerance
• Encryption
• Compression
• Very Huge File
• File Allocation Table (FAT)
• FAT12
• FAT16
• FAT32
Windows File Systems
• CD-ROM File System
(CDFS)
• Supports CD
• Universal Disk Format
(UDF)
• Live File System (LFS) is
enhancement
Windows File Systems
• CD-ROM File System
(CDFS)
• Supports CD
• Universal Disk Format
(UDF)
• Live File System (LFS) is
enhancement
System Programming

Module #12
System Programming

File Naming
Conventions
File Naming Conventions
• File name starts with drive
letter like
A: B: C:
• Network Drive letter starts
with higher letters like
• N: K: L:

• Universal Naming Convention


uses \\ followed by location
like \\computername\filename
• Usually \ is used as pathname
separator. In some cases / is
also used
File Naming Conventions
• ASCII characters 1-31 cannot be used in filenames along with
special characters
• :“|<>?*/\

• File and Directory names are case insensitive by case retaining


(MyFile will be stored as MyFile by could be referred as myFILE)
• Maximum length of filename is 255 while MAX_PATH is 260
• Filename and extension are separated by (.)
• (.) and (..) are special directories
System Programming

Module #13
System Programming

Creating and
Opening Files
Creating and Opening Files
• The CreateFile() API

HANDLE CreateFile(
LPCSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreate,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile
);
Creating and Opening Files
• lpFileName is the string pointer that points to a null
terminated string containing the file name
• dwDesiredAccess is a 32 bit double word whose each bit is a
flag which governs how the file will be access
• GENERIC_READ| GENERIC_WRITE
• Combimes mask to set various bits of the double word
• dwShareMode is the share mode that signifies how the files
will be shared.
• 0 signifies file will not be shared
• FILE_SHARE_READ allows the file to be shared for read
• FILE_SHARE_WRITE allows the file to be shared for write
Creating and Opening Files
• lpSecurityAttributes points to a security attribute structure
• Can be used as NULL for now
• dwCreate signifies whether to create a new file or use and existing one
• CREATE_NEW
• CREATE_ALWAYS
• OPEN_EXISTING
• OPEN_ALWAYS
• dwFlagsAndAttributes signifies attributes of the newly created file
• FILE_ATTRIBUTE_NORMAL
• FILE_ATTRIBUTE_READONLY
• hTemplateFile Used to set attributes of new file as an existing one
• There can be numerous open file handles to a single file
• Windows Vista and above supports the ReOpenFile() function
• ReOpenFile() allows to open an already opened file with entirely different set of
parameters
System Programming

Module #14
System Programming

Reading Writing a
File
Reading a File
• The ReadFile() API
BOOL ReadFile( HANDLE hFile,
LPVOID lpBuffer,
DWORD nNumberOfBytesToRead,
LPDWORD lpNumberOfBytesRead,
LPOVERLAPPED lpOverlapped );
Reading a File
• If the file is not opened in concurrent mode then
ReadFile() starts reading from the current
position.
• if the current location is End of File then no error
occurs and *lpNumberOfBytesRead is set to 0
• The function returns FALSE if it fails in case any of
the parameter is invalid.
Reading a File
• HANDLE hFile is the file handle
• LPVOID lpBuffer is the address of the array that
stores the data read from the file
• DWORD nNumberOfBytesToRead is the number of
bytes to be read from the file
• LPDWORD lpNumberOfBytesRead is the number of
bytes actually read
• LPOVERLAPPED lpOverlapped is used for
concurrent processing.
Writing Files
• WriteFile() API
BOOL WriteFile( HANDLE hFile,
LPCVOID lpBuffer,
DWORD nNumberOfBytesToWrite,
LPDWORD lpNumberOfBytesWritten,
LPOVERLAPPED lpOverlapped );
• To write through the current size of file the file must
be opened with FILE_FLAG_WRITE_THROUGH option
System Programming

Module #15
System Programming

Closing a File
Closing a File
• The CloseFile() API

BOOL CloseHandle( HANDLE hObject );


• HANDLE is the file handle
• BOOL signifies whether the operations was
successful or not
• After using CloseHandle() the HANDLE is more
valid
System Programming

Module #16
System Programming

Unicode and
Generic Characters
Unicode and Generic Characters
• ASCII is the 8-bit code while UNICODE is a 16 bit code
• Window supports both UNICODE and ASCII characters.
Usually windows have different API function variants to deal
with UNICODE and ASCII characters.
• UNICODE is used to represent character in other languages
as well like Arabic, Urdu, Chinese etc.
• Structure of code may change while writing code for ASCII
or UNICODE
• Here we learn how to write Generic Programs that works for
UNICODE as well as ASCII without any modifications
Unicode and Generic Characters
• Define all characters strings etc using generic data types
TCHAR, LPTSTR, LPCTST
• Macros #define UNICODE and #define _UNICODE
should be used before #include <windows.h> macro.
• First macro controls the windows API
• Second control C variable definition
• Use of these macros will force a generic variable (TCHAR) to be
used and defined as UNICODE (WCHAR)
• Since the size of ASCII and UNICODE are different there for
sizeof() operator should be used to get size of any such
variable,
Unicode and Generic Characters
• Use generic C library functions like
• _itot(), _stprintf(), _tcscopy(), _ttoi() etc,
consult MSDN for whole list. All of them uses the Generic
string types.
• Use the _TEXT or _T macro for representing string
constants
eg Use _T(“My Text”); rather than
“My Text” or L(“My Text”);
• All these generic C functions for string requires the
header file tchar.h
Unicode and Generic Characters
• Unicode is now widely used in windows. NTFS stored file
named internally in Unicode and also some APIs only support
Unicode.
• The UNICODE macro works somewhat in following way
internally
#ifdef UNICODE
#define TCHAR WCHAR
#else
#define TCHAR CHAR
#endif
System Programming

Module #17
System Programming

Generic Functions
Generic Functions
• Generic functions
• _tcscmp()
• _tcscmpi()
Can be used in lie of
• lstrcmp()
• lstrcmpi()
• Some functions that deal with Unicode characters and string
and work with locale setting transparent are
• CharUpper()
• IsCharAlphaNumeric()
• CompareString()
Generic Functions
• Generic main function is also modified
• In terms of the data types of its parameters
• And its name as given below

#include <windows.h>
#include <tchar.h>
int _tmain(int argc, LPTSTR argv[])
{
...
}
Generic Functions
• Windows usually have two versions for each API
function
• For example TextOut will have two variants
• TextOutA (16 bit API)
• TextOutW (32 bit API)
• The use of generic datatypes and UNICODE macro
enables the compiler to decide which version to
choose.
System Programming

Module #18
System Programming

Unicode Strategies
Unicode Strategy
• While writing a new
code or
enhancing/porting an
existing one a
programmer can
choose to adapt any
of the following
strategies based on
requirements
Unicode Strategy
• 8 bit only
• Ignore Unicode
• Use data types like
char or CHAR
• Use standard Library
functions like printf(),
scanf(), atoi() etc.
Unicode Strategy
• 8 bit or Unicode using
generic code
• The UNICODE macro is
used to switch between
8 bit and Unicode
• Generic functions are
used
• TCHAR data type is
used
Unicode Strategy
• Unicode only
• This option is these
days most popularly
practiced
• Unicode functions are
used
• Wide character
(WCHAR) data type is
used
Unicode Strategy
• Unicode and 8 bit
• This option includes
writing code for both
Unicode and 8 bit
• Decision regarding
which option to
choose is made at
runtime.
Unicode Strategy
• Use of Unicode only
strategy is now
increasingly popular
• Use of generic code can
at times occur to be
awkward and may
require extra effort
• However use of generic
code makes the code
most flexible.
System Programming

Module #19
System Programming

Reporting Errors
Reporting Errors
• Reporting errors in a
meaningful manner
requires use of
function
GetLastError()
• It returns an error
code and ensures its
unique to the thread.
Reporting Errors
• FormatMessage() translates the
error code into meaningful
English or Language selected in
preferences
• FormatMessage() used the error
code, another parameter
indicates the message is to
generated by system.
• A message string reference
against the error code is stored in
another parameter
• Another function LocalFree() is
also used whenever
FormatMessage() is used.
System Programming

Module #20
System Programming

Example: Reporting
Errors
Example: Reporting Errors
• This example makes
use of these following
customized header
files
• Environment.h
• Everything.h
Example: Reporting Errors
• Environment.h includes
macros for the
environment of the
program which is
basically the used of
UNICODE macro
• Everything.h includes all
the header file that will
be typically required for
all the subsequent
programs
Example: Reporting Errors
• Environment.h
#if (WIN32_WINNT >= 0x0600)
#define WIN32_WINNT 0x0600 /* Enable use of NT 5 (XP, 2000,
2003) functions */
#else
#if (WIN32_WINNT >= 0x0500)
#define WIN32_WINNT 0x0500 /* Enable use of NT 5 (XP, 2000,
2003) functions */
#endif
#endif
Example: Reporting Errors
• Environment.h
#ifdef UNICODE
#define _UNICODE
#endif
#ifndef UNICODE
#undef _UNICODE
#endif
#define LANG_DFLT LANG_ENGLISH
#define SUBLANG_DFLT SUBLANG_ENGLISH_US
Example: Reporting Errors
• Everything.h
#include "Environment.h"
#include <windows.h>
#include <tchar.h>
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <io.h>
#include <WinSock2.h>
#include "support.h"
#ifdef _MT
#include <process.h>
#endif
Example: Reporting Errors
#include "Everything.h"
VOID ReportError (LPCTSTR userMessage, DWORD exitCode, BOOL printErrorMessage)
{
DWORD eMsgLen, errNum = GetLastError ();
LPTSTR lpvSysMsg;
_ftprintf (stderr, _T("%s\n"), userMessage);
if (printErrorMessage) {
eMsgLen = FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL, errNum, MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpvSysMsg, 0, NULL);
if (eMsgLen > 0)
{
_ftprintf (stderr, _T("%s\n"), lpvSysMsg);
}
else
{
_ftprintf (stderr, _T("Last Error Number; %d.\n"), errNum);
}

if (lpvSysMsg != NULL) LocalFree (lpvSysMsg); /* Explained in Chapter 5. */


}

if (exitCode > 0)
ExitProcess (exitCode);

return;
System Programming

Module #21
System Programming

Standard IO
Devices
Standard IO Devices
• There are three
standard IO devices in
windows
• Input
• Output
• Error
• All the devices are
accessed via handles.
Standard IO Devices

• Certain APIs are used to acquire handle to standard IO devices

HANDLE GetStdHandle(DWORD nStdHandle );

• It returns a valid handle if the function succeeds


• Returns the code INALID_HANDLE_VALUE if function fails
• Successive calls to the function will still run the same handle
• If the handle is closed it makes it subsequently unusable for the process in
future
Standard IO Devices
• The Value of nStdHandle can
be
• STD_INPUT_HANDLE
• STD_OUTPUT_HANDLE
• STD_ERROR_HANDLE
• Usually STD_INPUT_HANDLE
returns console input buffer
(CONIN$)
• While STD_OUTPUT_HANDLE
returns console output buffer
CONOUT$
Standard IO Devices

• The Standard IO can be redirected using following API

BOOL SetStdHandle(DWORD nStdHandle, HANDLE hHandle);

• Returns TRUE or FALSE indicating Success or failure.


System Programming

Module #24
System Programming

File and Directory


Management
File and Directory Management
• Windows provides lots of
function for file and directory
management
• These function are pretty
straightforward and easy to
use.
• Such functions performs
operations like
• Delete
• Copy
• Rename
File and Directory Management
• Windows provides lots of
function for file and directory
management
• These function are pretty
straightforward and easy to
use.
• Such functions performs
operations like
• Delete
• Copy
• Rename
File and Directory Management
• For deleting file the following API is used
BOOL DeleteFile(LPCTSTR lpFileName) ;

• Returns TRUE if the file at the given valid file path is


deleted
File and Directory Management
• For copying file the following API is used
BOOL CopyFile( LPCTSTR lpExistingFileName,
LPCTSTR lpNewFileName, BOOL bFailIfExists );
• Copies an existing file from lpExistingFileName path to
lpNewFileName
• If new filename is same as existing then the file is
overwritten only if bFailIfExists is false
• Returns TRUE if the file at the given file is copied
successfully
File and Directory Management
LPSECURITY_ATTRIBUTES

• Windows also provides hardlinks. Following API is used for


creating hardlinks
BOOL CopyHardLink(LPCTSTR lpFileName,
LPCTSTR lpExistingFileName,
LPSECURITY_ATTRIBUTES
lpSecurityAttributes );
• Creates a hard link for existing file
• Both the files must be on same system volume
• Security attributes will apply on new file name
File and Directory Management
• Use the following APIs to movefiles
BOOL MoveFile(
LPCTSTR lpExistingFileName,
LPCTSTR lpNewFileName
);
BOOL MoveFileEx(
LPCWSTR lpExistingFileName,
LPCWSTR lpNewFileName,
DWORD dwFlags
);
File and Directory Management
• MoveFile() fails if new file
already exists
• Use MoveFileEx() to
overwrite existing file
• MoveFileEx() is the
extended version of
MoveFile()
• It can be used for both
files and directories
File and Directory Management
• For directories both need to be on
same drive
• Wildcards cannot be used
• dwFlags can have different setting
like
• MOVEFILE_REPLACE_EXISTING
• MOVEFILE_WRITE_THROUGH
• MOVEFILE_COPY_ALLOWED
• Refer to MSDN for complete details
File and Directory Management
• Following APIs are used to Create and Delete Directories
BOOL CreateDirectory(LPCTSTR lpPathName,
LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
BOOL RemoveDirectory(
LPCSTR lpPathName
);
• lpPathName specifies the path of the directory to be
created or deleted.
File and Directory Management
• Each Process has a current working directory which can be
changed/retrieved using the following API
BOOL SetCurrentDirectory(
LPCTSTR lpPathName
);
DWORD GetCurrentDirectory(
DWORD nBufferLength,
LPTSTR lpBuffer
);
• lpPathName is the
File and Directory Management
• For directories both need to be on
same drive
• Wildcards cannot be used
• dwFlags can have different setting
like
• MOVEFILE_REPLACE_EXISTING
• MOVEFILE_WRITE_THROUGH
• MOVEFILE_COPY_ALLOWED
• Refer to MSDN for complete details
File and Directory Management
• For directories both need to be on
same drive
• Wildcards cannot be used
• dwFlags can have different setting
like
• MOVEFILE_REPLACE_EXISTING
• MOVEFILE_WRITE_THROUGH
• MOVEFILE_COPY_ALLOWED
• Refer to MSDN for complete details

You might also like