Sure. You can generate a sample blueprint function library c++ class from the unreal editor. Once you’ve done that, it will create the header (.h) and the .cpp file. My .cpp file looks like this. My header file has this as the function declaration. Then you’ll need to create another header file (FileDialog.h) in the same folder as your library’s header file and paste this into it. Then (you guessed it) its FileDialog.cpp file in the same folder as your library’s .cpp file and paste this into it.
If you follow the links in the discussion in the comments, you’ll see where all this came from. Good luck!