Problems with file creation, what means L"\\??\\C:\\" vs. L"C:\\"
Hello, I try to create a file with Origin 6.0 and saving (only) in Origin's internal format fails. Writing other file types (in Origin) to that directory works flawlessly. (Below the output using +file,+ntdll) First, kernel/file.c's CreateFileW is called ------------- trace:file:CreateFileW L"C:\\Program Files\\origin6.0\\UNTITLED.OPJ" GENERIC_READ GENERIC_WRITE FILE_SHARE_READ FILE_SHARE_WRITE creation 5 attributes 0x80 ------------- (creation 5 = TRUNCATE_EXISTING; attributes 0x80 = FILE_ATTRIBUTE_NORMAL) which then calls NtCreateFile: ------------- trace:ntdll:NtCreateFile handle=0x406de164 access=c0000000 name=L"\\??\\C:\\Program Files\\origin6.0\\UNTITLED.OPJ" objattr=00000040 root=(nil) sec=(nil) io=0x406de168 alloc_size=(nil)attr=00000080 sharing=00000001 disp=1 options=00000050 ea=(nil).0x00000000 ------------- (access=c0000000 = GENERIC_READ|GENERIC_WRITE = 0x80000000|0x40000000 objattr=00000040 = OBJ_CASE_INSENSITIVE) Which fails then with: ------------- warn:file:wine_nt_to_unix_file_name L"UNTITLED.OPJ" not found in /home/wine/.wine/dosdevices/c:/Program Files/origin6.0 warn:ntdll:NtCreateFile L"\\??\\C:\\Program Files\\origin6.0\\UNTITLED.OPJ" not found (c0000034) warn:file:CreateFileW Unable to create file L"C:\\Program Files\\origin6.0\\UNTITLED.OPJ" (status c0000034) trace:file:CreateFileW returning 0xffffffff ----------- Except for the L"\\??\\" whick looks odd to me, I frankly have no idea what's going wrong. Any tips welcome. (Details can be found from line 675 on in http://bugs.winehq.org/attachment.cgi?id=958 of Bug http://bugs.winehq.org/show_bug.cgi?id=3115 ) Tobias
Tobias Burnus <tobias.burnus(a)physik.fu-berlin.de> writes:
Hello,
I try to create a file with Origin 6.0 and saving (only) in Origin's internal format fails. Writing other file types (in Origin) to that directory works flawlessly. (Below the output using +file,+ntdll)
First, kernel/file.c's CreateFileW is called ------------- trace:file:CreateFileW L"C:\\Program Files\\origin6.0\\UNTITLED.OPJ" GENERIC_READ GENERIC_WRITE FILE_SHARE_READ FILE_SHARE_WRITE creation 5 attributes 0x80 ------------- (creation 5 = TRUNCATE_EXISTING; attributes 0x80 = FILE_ATTRIBUTE_NORMAL)
which then calls NtCreateFile:
------------- trace:ntdll:NtCreateFile handle=0x406de164 access=c0000000 name=L"\\??\\C:\\Program Files\\origin6.0\\UNTITLED.OPJ" objattr=00000040 root=(nil) sec=(nil) io=0x406de168 alloc_size=(nil)attr=00000080 sharing=00000001 disp=1 options=00000050 ea=(nil).0x00000000 ------------- (access=c0000000 = GENERIC_READ|GENERIC_WRITE = 0x80000000|0x40000000 objattr=00000040 = OBJ_CASE_INSENSITIVE)
Which fails then with: ------------- warn:file:wine_nt_to_unix_file_name L"UNTITLED.OPJ" not found in /home/wine/.wine/dosdevices/c:/Program Files/origin6.0 warn:ntdll:NtCreateFile L"\\??\\C:\\Program Files\\origin6.0\\UNTITLED.OPJ" not found (c0000034) warn:file:CreateFileW Unable to create file L"C:\\Program Files\\origin6.0\\UNTITLED.OPJ" (status c0000034) trace:file:CreateFileW returning 0xffffffff -----------
Except for the L"\\??\\" whick looks odd to me, I frankly have no idea what's going wrong. Any tips welcome.
The \??\ is the NT prefix, that's normal. The problem is apparently that the app wants to create a new file using TRUNCATE_EXISTING, which fails if the file does not exist. So either the file should have been created earlier on, or the app is using the wrong creation argument for some reason. -- Alexandre Julliard julliard(a)winehq.org
participants (2)
-
Alexandre Julliard -
Tobias Burnus