Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

Win32/x64 checking current executable??

$
0
0

I have a test program that I use to test all of the calls in my DLL app.

Currently, this is a Win32 program calling a Win32 DLL - all good.

I now want to use the same code, built as x64 to test the x64 version of my DLL, and so I need the program to be able to detect whether it was built as Win32 or x64.  I have been using GetBinaryType from Kernel32 - this correctly detects whether a program (exe or DLL) is 32 or 64 bit, but only when called from a Win32 build.

How can I call GetBinaryType properly from an x64 build?

I'm using

USE KERNEL32

USE, intrinsic :: iso_c_binding

Integer(LPDWORD) :: BinaryType

ret=GetBinaryType(TRIM(exename)//ACHAR(0), LOC(BinaryType))

Thanks,

David


Viewing all articles
Browse latest Browse all 3270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>