Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor II
2 Views

API interface error GetUserName in ADVAPI32.f90/compiler 18.0

Jump to solution

In ADVAPI32.f90 in compiler 18.0 we have:

INTERFACE 
FUNCTION GetUserName( &
        lpBuffer, &
        nSize)
use ifwinty
  integer(BOOL) :: GetUserName ! BOOL
    !DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE, ALIAS:'GetUserNameA' :: GetUserName
!DEC$ ATTRIBUTES REFERENCE, ALLOW_NULL :: lpBuffer
  character*(*) lpBuffer ! LPSTR lpBuffer
  integer(LPDWORD) nSize ! LPDWORD nSize
 END FUNCTION
END INTERFACE

Using this causes a crash as nSize is in/out and should be passed by reference. I have applied a local fix but it needs updating....

0 Kudos

Accepted Solutions
Highlighted
Valued Contributor II
2 Views
0 Kudos
4 Replies
Highlighted
Black Belt
2 Views

Best to report this through

Jump to solution

Best to report this through the Intel Service Center.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Valued Contributor II
3 Views
0 Kudos
Highlighted
New Contributor II
2 Views

Andrew,

the problem is not in the function itself. I have added a small example.

Robert

 

0 Kudos
Highlighted
Valued Contributor II
2 Views

Indeed Robert, the interface

Jump to solution

Indeed Robert, the interface is wrong for nsize.

0 Kudos