os-70-350

os-70-350 Commit Details


Date:2013-11-24 18:25:47 (11 years 9 months ago)
Author:Natalie Adams
Branch:master
Commit:a4f6de85241985b5e171b9e64383b3198a2f023b
Parents: 3e78b3a254b36ac6a601cf001cf72f8337109b9c
Message:Updating code

Changes:

File differences

cp/Debug/test.txt
1
this is a test
cp/cp/main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <Windows.h>
void WriteStr(const char * str)
{
HANDLE stdout2 = GetStdHandle(STD_OUTPUT_HANDLE);
DWORD byteswritten;
int length = 0;
const char * cpyptr = str;
while(*cpyptr != 0)
{
cpyptr++;
length += 1;
}
WriteFile(stdout2, str, sizeof(str), &byteswritten, NULL);
}
int main(int argc, char * args[])
{
WriteStr("abc");
if (argc != 2)
{
WriteStr("Please enter two parameters - cp src dst");
}
HANDLE hsrc = CreateFileA(args[1], GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (GetLastError() == ERROR_FILE_NOT_FOUND)
{
WriteStr("Could not find file!");
return 0;
}
}

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.10893s using 14 queries.