回答編集履歴
2
追記
test
CHANGED
@@ -11,3 +11,7 @@
|
|
11
11
|
とあります。(日本語訳があやしいので、原文で引用しました)
|
12
12
|
|
13
13
|
簡単に言うとfopen_fで開いたファイルは共有できないので、共有したい場合は_fsopenを使いましょうとのことです。
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
fprintfで書き込んでも即時にファイルに反映されないので、必要に応じてfflushするなりしてください。
|
1
追記
test
CHANGED
@@ -1 +1,13 @@
|
|
1
1
|
FileShare.ReadWriteを指定しても読み込めないのであれば、書き込む側を変更するしかないかと思います。
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
ログの出力側で`fopen_s`で開いているとのことですが、[こちら](https://docs.microsoft.com/ja-jp/cpp/c-runtime-library/reference/fopen-s-wfopen-s?view=vs-2019)に
|
6
|
+
|
7
|
+
> Files that are opened by fopen_s and _wfopen_s are not sharable. If you require that a file be sharable, use _fsopen, _wfsopen with the appropriate sharing mode constant—for example, _SH_DENYNO for read/write sharing.
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
とあります。(日本語訳があやしいので、原文で引用しました)
|
12
|
+
|
13
|
+
簡単に言うとfopen_fで開いたファイルは共有できないので、共有したい場合は_fsopenを使いましょうとのことです。
|