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
0
votes
2 answers

WinAPI CreateFileA error code 0xdf

I have a mapped Webdav Drive and i can't open file for reading using CreateFileA(file_path, FILE_READ_DATA, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); i am still getting error code 0xdf ERROR_FILE_TOO_LARGE 223 (0xDF)…
FrUh
  • 545
  • 1
  • 4
  • 7
0
votes
1 answer

How to create a new folder in Phone memory Nokia Qt

I am using the following code to create a new folder in the existing "Games" folder, but it just isnt making the folder. QDir dir("C:/Games/MyGame"); if(!dir.exists()) { dir.mkdir("C:/Games/MyGame"); } else { qDebug()<
SoH
  • 2,180
  • 2
  • 24
  • 53
0
votes
3 answers

NSFileManager works fine on simulator but not on device

I have problem creating directories and files with NSFileManager on the iPhone device. My code, shown below, works fine on the simulator, but not on the device, could you please help me? Gimme some directions where the problem may be, thanks for…
Jenicek
0
votes
3 answers

Deleting a file with just a handle

Lets say I have a file handle as a result of WinAPI CreateFile. It was not opened with FILE_FLAG_DELETE_ON_CLOSE. Is there a way to delete the file having just the handle, without having the file name? Thanks
Neil Weicher
  • 2,370
  • 6
  • 34
  • 56
0
votes
2 answers

How can I check if a directory can be renamed in VB.NET?

My thought is to use CreateFile from kernel32 and check for sharing violations. I believe this will work because I watched the file system activity with Process Monitor while issuing a rename command from CMD that I knew would fail and the last…
Instance Hunter
  • 7,837
  • 5
  • 44
  • 56
0
votes
1 answer

C++ createFile (Compact Flash Card Writer)

I am pretty new to C++. I am working a Java application that makes a Jni Call to C++ to write raw file (.img) to an attached Compact Flash card writer. Below is my c++ code, it is suppose to locate a connected usb drive, create a Handle using…
stdapsy
  • 154
  • 1
  • 1
  • 8
0
votes
1 answer

'Locale' configuration and its relationship with Windows API

Can the locale configuration of a system OR the keyboard type configuration of that system in anyway affect which API is called at the Kernel level? To be specific, if a program is invoking 'CreateFile()' API then the windows API documentation says…
The Kaykay
  • 27
  • 5
-1
votes
1 answer

how to print string array onto file?

I have a string input file and I put the strings into arrays. I only want to print the last element of each string array onto my console and onto a output array. When I run my code, I get the last element of each string array onto my console, but…
MajorMike
  • 11
  • 3
-1
votes
1 answer

Create file on Linux-Server Connected through network share From Windows

My PHP code runs on windows and have the following function to create file on Linux-server connected through Windows-Exchange by IP Address (172.12.20.10). I almost done, permission and all other important things, but still the file is not…
MR.Internet
  • 547
  • 4
  • 19
-1
votes
1 answer

c# file creation access denied

Im trying to make file named hello.txt and code show error that I dont have access to the path. So how can I make file? Code: static void create_file(string path) { FileStream fs = File.Create(path); } …
-1
votes
1 answer

Split fasta file into specific new fasta files

So I'm writing this code that will read a fasta file. In the fasta file, there will be 10 sequences. The start of the sequence will be ">" I want to split 50:50 of those sequences and create two new fasta files with it. 5 sequences in one new file;…
Juleszio
  • 3
  • 2
-1
votes
1 answer

ReOpenFile Windows API fails with "error invalid name" when reopening a file in C:\windows\system32

I would like to know whether anyone can explain a reason for ReOpenFile failing with "error-invalid-name", when CreateFile has successfully opened the file. Here are the details: I open a file C:\Windows\system32\unit_test.txt using CreateFile, and…
Coder_Dan
  • 1,815
  • 3
  • 23
  • 31
-1
votes
1 answer

How to open device driver for IOCTL

I am trying to open a device driver in order to send it an ioctl. There are many examples on SO and elsewhere but virtually all address opening "\\.\PhysicalDrive0" or the like. But I am trying to open a non-disk driver, compiled from Microsoft…
DontPanic
  • 2,164
  • 5
  • 29
  • 56
-1
votes
1 answer

How do I pass XML data to php upload to server

Please assist, I have the below code. I am creating a an XML file and then attempting to post this data to my PHP file on the server so that it can save the file to the "uploads/" Directory where my 3rd party program will pick it up and extract the…
-1
votes
1 answer

Write file with fopen is not working

So, i'm just practicing on my C programing skills and i wrote a program that gets a password and check it, if the password is correct so it call a MessageBox and show a message to user then it checks for existing file if the files is not existing it…
Xozu
  • 81
  • 1
  • 2
  • 10