MFS, how get the handle of a file?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MFS, how get the handle of a file?

911件の閲覧回数
emanueletrapani
Contributor III

Hi,

i work on a k64f, MQX 4.2.

There is a way to recover the handle of a opened file if i miss the fopen() return handle?

I have the pathname and the filename.

thank you

Emanuele Trapani

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

746件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi Emanuele:

File handle is a memory allocated for the given FILE_PTR from system memory pool.  Theoretically, it is possible to get it by walking through kernel data. Unfortunately MFS does not provide this API to do that.   You can save the fopen returned file handle into a global variable. I don't think it will be missed .:)

Have a great day,
Daniel