0

Background

I am taking a look at walking a buffer of change journal records so I can work with the change journal in my application. After running into some issues I used this stackoverflow question to figure out some build issues and get things building for windows 10.

Now that I have things running, I noticed I was getting blank filenames as output in my vscode debug console. Everything else is printing out with a value except the filename. Additionally, there are many change records showing up, It's not reporting bad information from what I can tell.

I have seen the blank filename issue before when working with FILE_DIRECTORY_INFORMATION structures, so I figured it was something as simple as a wide string not showing up properly. I have gone through it and it seems like everything is being used properly.

I tried constructing a wstring using the filename buffer and taking a substring from 0 to filenameLength, but that resulted in the same blank strings.

When I look at it with a debugger, I see a '\0' in the first wchar position of the Filename variable, but cannot see anything after that. And the FilenameOffset is 0, so it should be showing up right at the beginning of the buffer I would think.

Any ideas on why I am getting blank filenames? All code I am using is contained in the "Walking a Buffer of Change Journal Records" example above. I am running on windows 10.

More Information

Here is a sample screenshot of my output after stepping through and getting things building. The min and max major version is set to 16x which seems right I would think.

enter image description here

Dean Knight
  • 660
  • 6
  • 17
  • I test the code via visual studio on win10. And I couldn't get the blank filenames. Could you please provide some screenshots to elaborate on your issue. – Jeaninez - MSFT Jul 27 '23 at 02:57
  • @Jeaninez-MSFT I added a screenshot of my output so you can see what is going on. This is a debug build on VSCode and everything was built with the latest Microsoft compiler from Visual Studio 2022 using the C++17 standard. I dont believe there are any "gotchas" here from a build standpoint but maybe I am missing something. – Dean Knight Jul 27 '23 at 13:30

0 Answers0