Windows/C++: How do I determine the share name associated with a shared drive?

后端 未结 3 1886
说谎
说谎 2021-01-25 10:45

Let\'s say I have a drive such as C:\\, and I want to find out if it\'s shared and what it\'s share name (e.g. C$) is.

To find out if i

3条回答
  •  旧时难觅i
    2021-01-25 11:37

    Use;

    SHGetFileInfo with SHGFI_ATTRIBUTES
    

    upon return check the dwAttributes flag for SFGAO_SHARE.

    I'm not sure how to find the actual path tho.

提交回复
热议问题