Questions tagged [createfile]

The Windows CreateFile API function

The Windows CreateFile API function.

Use this tag only in conjunction with the windows-specific API. Do not use this tag if you intend to refer to the generic concept of referring to a file.

474 questions
-2
votes
1 answer

Joining different text file to 1 text file c#

im try to combine text file to filename. For example my path C:\Users\o.k\Desktop\Record\ record file has many .txt file. they names is …
ferfeit
  • 59
  • 2
  • 10
-2
votes
1 answer

Java, read a line of text and write in seperate file

This is very stupid to ask but I want to know. I have to read a line of text and write in seperate file. I know how to read a line and work on that text but I don't know putting both together. I have a text file with data in it, has header on the…
Pawriwes
  • 283
  • 1
  • 6
  • 21
-2
votes
2 answers

create a new file if doesn't exist

This is my main.cpp: int main () { FILE* file_name; file_name= fopen("email1.clear","wb"); return 0; } I run it with the ssh (Linux): g++ main.cpp -o main but no file has been created. (I must to use: FILE*). please help.
Maor Cohen
  • 936
  • 2
  • 18
  • 33
-2
votes
1 answer

Create a text file with the logged in user as its filename

I have this script that is creating and updating a text file called Machine.txt and populates it with a list of lines which have this format (username, time and date when the script ran). I’m running this at logon. What I want to do is to create a…
SD1
  • 1
  • 1
  • 2
-2
votes
2 answers

WinAPI createFile function 2

i wrote some code to createfile in c++ it compiles without errors, but it doesn't create any file.. Can anyone tell me what is wrong ? thanks #include #include #include using namespace std; int main() { …
asdf
  • 55
  • 1
  • 1
  • 2
-3
votes
1 answer

WinAPI ReadFile returns corrupted data

I'm writing a function in my Visual C++ project that reads contents of a file via WinAPI in 2000 byte increments and returns it as a std::string. A problem occurs when the file is much larger than the buffer (for example 100 KB), I get garbage added…
Liz
  • 3
  • 1
-3
votes
1 answer

Assigning Variable to CreateFileA file name

I'm creating a .bmp file using this CreateFileA method HANDLE hFile = CreateFileA("Screenshot01.bmp", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); At the moment is static and just keeps re-writing the old file. I want to call…
Ezrar
  • 23
  • 2
-4
votes
1 answer

WIndow CreateFile ReadFile WriteFile

I am a student so I apologize up front for not using the correct forum protocols. I am new to C, and really new to Win32 API. My assignment is to write a small C program that copies the contents of an existing file to a new file, using only Win32…
dana_muise
  • 41
  • 1
  • 4
  • 9
-7
votes
1 answer

How can I provide credentials for CreateFile (share file)?

My attempt to open a file on a remote machine looks like this: #include #include void main() { HANDLE h = CreateFileW ( L"\\\\10.10.10.10\\c$\\windows\\system32\\calc.exe", GENERIC_READ, …
Bogudan
  • 71
  • 1
  • 2
  • 9
1 2 3
31
32