microsoft/Windows-classic-samples

CommonFileDialog - sample code gives error "Ordinal number 344 not found"

uzername opened this issue · 1 comments

I am trying to integrate a code from CommonFileDialog example to my project. I have copied code from CPP file of this project:
https://github.com/microsoft/Windows-classic-samples/blob/main/Samples/Win7Samples/winui/shell/appplatform/commonfiledialog/CommonFileDialogApp.cpp .
I am linking to those lib files:
propsys.lib
shlwapi.lib
comctl32.lib
I have _WINDOWS and _WIN32 symbols specified in settings.

At the same time when I use a code for file open dialog box from here: https://learn.microsoft.com/en-us/windows/win32/dlgbox/using-common-dialog-boxes#opening-a-file , it works OK.

I have downloaded and installed MS redistributable. I am using Windows 10 and Visual Studio 2022.

When I try to use that code, it compiles and program starts, but it gives me a dialog box with error "Ordinal number 344 not found"

This isn't a question about the sample, but rather a question about incorporation the sample into another program. You can follow the instructions on Windows developer support for support options. (Click "Microsoft Q&A".)

You might also find this answer on StackOverflow relevant. It calls out a line from the sample that you probably failed to copy to your project.