- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Folks, I need to access Korean folders and file names using a dialog box. IFORT 2024.2 with VS2022 does not recognize GetOpenFileNameW Win32 API. How do I do it?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
None of the W functions are declared because Intel Fortran doesn't support wide characters. You can declare the function yourself, but you'll also have to declare the OPENFILENAMEW structure. Look at the declarations of the A versions in commdlg32.f90 and ifwinty.f90 as a basis.
A word of caution - the function documentation I linked to above incorrectly gives OPENFILENAME as the structure type, but as suggested in "Syntax", it is actually OPENFILENAMEW.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Steve:
Success to far:
OPENFILENAMEW structure - is already defined, Good.
GetOpenFileNameW interface constructed, modeled on comdlg32.f90 - good!
Source code now compiles OK with GetOpenFileNameW
Problem: Linker reports "unresolved external symbol GETOPENFILENAMEW"
GetOpenFileNameW is a name in ComDlg32.lib, but perhaps I am not looking at the same one as IFORT uses. Where does IFORT look for ComDlg32.lib?
Any other suggestions anyone?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you'll look at the source for comdlg32.f90, you'll see that each routine uses an ATTRIBUTES DECORATE,STDCALL,ALIAS directive to give the mixed-case name of the function. You haven't done that so you get the default upcasing. You should be able to adapt the GetOpenFIleNameA declaration and make the minor edits for the W version.
![](/skins/images/06022F5BB6D2F28C8F102671A0F06E85/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page