Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

GetOpenFileName under X64

cean
New Contributor II
1,453 Views

Hi Steve,

 

I read not long ago you have a post about upgrading your example code from win32 to x64. I searched your name and after some pages still can't find it. Could you point me where it is.

 

Thank you very much.

 

Cheers,

 

Cean 

0 Kudos
7 Replies
Steve_Lionel
Honored Contributor III
1,435 Views

What problem are you having? The example of GetOpenFileName in the 2019 Samples Bundle works for x64. 

0 Kudos
cean
New Contributor II
1,357 Views

k.jpg

k2.jpg

I can't remember what's the error under X64 a while ago.  I just stick to Win32.

But now under Win32, every time I want to open a file, there maybe an Exception thrown: wkernelbase.pdb not loaded. 

If I hit the green right arrow, the Open window can pops up, but some icons shown in black and after picking a file, my program is not work as I expected. 

If I recompile the project once or twice and run,  the Open window can show up without error. And when I modify my program here and there, this problem may not show up.

From here visual studio 2013 - Error message: wkernelbase.pdb not loaded - Stack Overflow

the suggestion is:

 

 

 

 

You probably trying to display image but image is actually not loaded in memory.
You are missing any header file of opencv and calling their functions in your code.

 

 

 

Indeed the image is missing. Where to find it?

 

So I want to try X64 now. But after I switched to X64, there are a lot of new compiling errors. I have to sort them out before to see if the Open still a problem.

0 Kudos
cean
New Contributor II
1,354 Views

This is the image when it is right.

k3.jpg

0 Kudos
Steve_Lionel
Honored Contributor III
1,339 Views

Can you build and run this sample? It runs fine for me in X64. Maybe something else is wrong in your code.

The message about wkernelbase.pdb can be ignored - that's just the debugger saying that it has no debug info for the point that got the error, which is probably an access violation due to wrong-type arguments being passed.

0 Kudos
cean
New Contributor II
1,287 Views

Yes, It works. But I can't convert the returned file name with this line:

character(512) :: fname
integer ret

...

ret = convertFtoCstring(fname,ofn%lpstrFile)

The error is: 

Access violation reading location 0xFFFFFFFFEAF20000.

Thanks. 

0 Kudos
Steve_Lionel
Honored Contributor III
1,283 Views

Well, that's your own routine. If you'll provide a small but complete test case, I'll look at it. Do you understand that the lpstrFile component is a pointer, and you must provide allocation for it?

0 Kudos
cean
New Contributor II
1,242 Views

I just added my line at the end of the demo.

 

There is:

 

 

character(512) :: file_spec = ""C
ofn%lpstrFile = loc(file_spec)

 

I realized I do not need this conversion. This file_spec is the returned file name I needed.   It seems work. Also for my Win32 program.

 

 

0 Kudos
Reply