I would like to write a program that can access a video device (e.g .a webcam). That means calling functions in vfw.h. Is there an interface module?
For example, the line:
hWndC=capCreateCaptureWindow('My Capture Window'C, IOR(WS_CHILD,WS_VISIBLE), 0, 0, 160, 120, ghwndClient, nID)
gives an unresolved external symbol error.
I have tried various USE statements to no avail e.g. USE IFWINTY and USE IFPORT
Here's an interface to this routine - you may need others. You'll want to USE this module, add to it as needed.
module Vfw32 use IFWINTY implicit none interface function capCreateCaptureWindow (lpszWindowName, dwStyle, x, y, nWidth, & & nHeight, hwndParent, nID) bind(C,name="capCreateCaptureWindowA") import !DIR$ ATTRIBUTES STDCALL :: capCreateCaptureWindow integer(HANDLE) :: capCreateCaptureWindow character, dimension(*), intent(IN) :: lpszWindowName integer(DWORD), value, intent(IN) :: dwStyle integer(DWORD), value, intent(IN) :: x, y, nWidth, nHeight integer(HANDLE), value, intent(IN) :: hwndParent integer(DWORD), value, intent(IN) :: nID end function capCreateCaptureWindow end interface end module Vfw32
Look up the documentation of the function on Microsoft's site. For example, capCreateCaptureWindowA function (vfw.h) - Win32 apps | Microsoft Docs
Towards the bottom of the page, look to see which Library it is defined in. For example:
Here we see it is in library Vfw32.lib. If Intel provides a module for this, it is the same as the library name, VFW32 in this case. But that module is not in the Intel set.
You can, of course, always search the compiler's Include folder for the name of the routine you want to see if there's a hit.
During my time at Intel, I did a LOT of work on the Windows API modules, updating some and creating some new ones when I saw requests. I don't recall ever seeing this library come up before. Creating and updating these modules is a lot of hard work, and Microsoft adds new APIs faster than I could add them to modules. Before I retired, I managed to get KERNEL32 mostly up to date, with changes in USER32 and some others.
Over the years I have come to appreciate the huge amount of work that must have gone into making so much of the Windows API accessible to Intel Fortran programmers. It has always been there when I needed it and it has enabled very many useful things (except until now - and I don't mind having to write a few interface routines having seen an example). Thanks so much - enjoy your retirement.