TalAloni / SMBLibrary

Free, Open Source, User-Mode SMB 1.0/CIFS, SMB 2.0, SMB 2.1 and SMB 3.0 server and client library
GNU Lesser General Public License v3.0
712 stars 182 forks source link

Can't access most QueryDirectoryFileInformation attributes #218

Closed KerryXEX closed 1 year ago

KerryXEX commented 1 year ago

Hi, I'm trying the Connect to share and list files and directories - SMB2 example which runs correctly and in VisualStudio "Locals" explorer I can see all the values, but in the code, I'm not able to access most attributes (such as FileName, FileAttributes etc.) Only FileInformationClass and FileIndex are accessible.

What am I doing wrong?

Thanks Kerry.

TalAloni commented 1 year ago

Sorry, but the issue section was not meant to help with Visual Studio issues. This is probably the result of some compiler optimization though (I guess those values remained unused as as such optimized away and thus not accessible)

phillijw commented 1 year ago

You just need to cast the object to FileDirectoryInformation