There is some difference between using USE MSWIN and INCLUDE'ing the 3 files than make up the module MSWIN.
In the MAIN below, I use the MSWIN reference, while in the subroutine, I specifically INCLUDE the .INS files. The link step shows an unknown symbol (GetUserNameA) but only for the subroutine, not the main.
The INCLUDE'ed files win32api.ins does contain the STDCALL for GETUSERNAME that maps to the API function GetUserNameA.
MAIN
! PROGRAM SIMPLE
winapp
PROGRAM MAIN
use mswin
character*(256) user
integer:: i,j,k
i=len(user)-1
if(getusername(user,i))continue
end
SUBROUTINE
subroutine abcd(user)
include <clearwin.ins>
include <win32api.ins>
include <win32prm.ins>
character*(*) user
integer:: i,j,k
i=len(user)-1
if(getusername(user,i))continue
return
end