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
1
vote
3 answers

saving file to network

I have a file that's about 7 MB that saves to my local share in a matter of seconds. However, saving that file to a network location takes minutes. I'm wondering what I can do to speed this up. Here are my current options: Save the data to a…
Michael Kelley
  • 3,579
  • 4
  • 37
  • 41
1
vote
4 answers

How to create a folder in the root directory of my Java application?

Is there a way to create a folder (with a specific name) in the main directory of my Java app. I have a user system in my game, and whenever a new user is created, I want it to create a folder that will store all there progress in (and the folder…
Amundeep Singh
  • 194
  • 5
  • 16
1
vote
1 answer

CreateFile and memory management

I am creating/opening a file using CreateFile() Windows API. Let's assume that my drive has a bad sector and the file could not be open or an attempt to write to this file failed. If I will recreate the file using the same CreateFile() API, will it…
Polina
  • 75
  • 1
  • 1
  • 8
1
vote
1 answer

CreateFile in separate thread returns INVALID_HANDLE_VALUE in MFC app

I have an MFC App which fires up a separate thread for downloading some files via cURL. At the start it downloads a text file with file sizes and last write times. Then it checks the files on disk and queues it for downloading if it has different…
fgungor
  • 479
  • 4
  • 15
1
vote
1 answer

Running a file whose handle is opened(C++ winapi)

I included a exe file as a resource in my c++ application and i need to run it, but i need to restrict it's access alot so the user can't copy it. I need to keep it's handle opened so external programs can't access it, and because i used…
1
vote
2 answers

Is it relevant for CreateFile whether other handles to the same file have been opened by the same or a different process?

When working with filesystem files on Windows, and specifically with the CreateFile API: With regard to access sharing, that is having multiple, independent, CreateFile calls to open the same file, possibly with different flags and sharing modes,…
Martin Ba
  • 37,187
  • 33
  • 183
  • 337
1
vote
1 answer

Pass FILE_ATTRIBUTE constants to C runtime functions

I am trying to optimize a legacy application written in C which makes uses of regular stdio.h resp. fcntl.h functions. For special uses, I would like to inject a few extra hints…
1
vote
1 answer

Flutter: Unhandled exeption ':app:processDebugResources', problem with open file packages

I managed to add to services in my app (Create Excel file - Create PDF file) In both services I had a problem with open file packages.. Packages I used: open_document 1.0.5 open_filex: ^4.1.1 open_file: ^3.2.1 I used many packages for that…
1
vote
1 answer

Getting Select Action error while using Visual Studio

I am getting the below alert on a certain interval while using VS Code have attached the SS of the same. Using VS for quite sometime but never encountered this issue before. Please help me to resolve the issue.
1
vote
1 answer

Understanding ERROR_SHARING_VIOLATION in fasm x86

From my understanding if the share mode is set to 0, I will not be able to open the file again. By default I've set it to 3, but even setting it to 2 ( FILE_SHARE_WRITE ) outputs the same error. So that makes me think that the parameters are…
Germ
  • 117
  • 6
1
vote
1 answer

Why there is type: Cannot find path error

I would like to understand why I'm receiving below error when I'm trying to create new empty file in VS Code terminal. See below: type : Cannot find path '[FILE_PATH]\nul' because it does not exist. At line:1 char:1 + type nul > '[FILE_NAME]' +…
Xetoo
  • 26
  • 2
1
vote
2 answers

createNewFile() throws an error

In my android app I try to create a xml file on sdcard. I tried this : public class XmlFileCreator extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
Gabrielle
  • 4,933
  • 13
  • 62
  • 122
1
vote
0 answers

CreateFile() hangs on VMWare with a disk disconnected. How do I safely abort a CreateFile attempt in such a scenario?

I am calling CreateFile to open a file for reading and writing on an external Windows volume running over VMWare. However, if the disk is disconnected for any reason (after having been previously connected), CreateFile will hang indefinitely. How…
user2563087
  • 151
  • 1
  • 8
1
vote
2 answers

How to create folder at the root of SD card in android?

I am able to find the path of SD card and is mounted as well as, I can create a folder to cache directory (sdcard/Android/data/packagename) but I am not able to create a folder at the root of SD card My code is like : To get sd card …
Tejas
  • 23
  • 8
1
vote
0 answers

why when creating new java class, customization wizard doesn't display?

this is the dialog tab that display when creating a new java class it asks me to enter class name only and doesn't show this dialog. this is the dialog tab I want to display when creating new java class
eman essam
  • 11
  • 2