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

NULL_SECURITY_ATTRIBUTES undefined pointer array

pecan204
Beginner
898 Views
Hello, I have an undefined pointer array in a pipe subroutine. I have tried using USE IFMT, and USE IFWINTY, and declared the NULL_SECURITY_ATTRIBUTES and integer but nothing has corrected it.
The behavior of the program is the F90 dll is allowed to be called by a C exe but when a java pgm calls a c dll which calls a f90 dll the pipe works only one time.
Does anyone know what is wrong with the undefined pointer array error?
Where are the docs on what is contained in IFMT, IFWINTY, and other modules listed in converting cvf.pdf Table 1. I have reviewed lib_for.pdf but do not see all there?
Here is the code.
Code:
!**************************Initializing Pipe********************************
subroutine Init()
USE IFWIN
USE GLOBALS

!  ******************Initializaing pipe Datas...****************************
    logical PipeHandleIsClosed, WriteFileSuccess
    integer*4, parameter  :: DEFAULT = 0
    integer*4 err
    integer*4 inlen
    

    NULLIFY(NULL_SECURITY_ATTRIBUTES)
 
    pipe = CreateFile( "\\.\pipe\ssguipipe"C, IOR(GENERIC_WRITE , GENERIC_READ) ,	&
        IOR(FILE_SHARE_READ , FILE_SHARE_WRITE), &
        NULL_SECURITY_ATTRIBUTES, OPEN_EXISTING, 0, NULL )

    if (pipe.EQ.INVALID_HANDLE_VALUE) then
        err = GetLastError()
        ! write(*,*)'CreateFile Failed!!!'
        ! PipeHandleIsClosed = CloseHandle(pipe) this is not needed
        pipe = NULL
	endif
	return
end subroutine


Thanks for any help.
Ken
0 Kudos
5 Replies
Steven_L_Intel1
Employee
898 Views
What is the exact error message you are getting? I don't see an error when I compile this.

You can replace NULL_SECURITY_ATTRIBUTES with just NULL. We added a feature several years ago to allow that.

Steve
0 Kudos
Steven_L_Intel1
Employee
898 Views
IFWINTY is described in the Building Applications manual section on developing Win32 applications. It is a Fortran translation of Windows declarations that are documented in the Microsoft Platform SDK help.

IFMT is also described in that chapter, in the subsection on writing multithreaded applications.
0 Kudos
pecan204
Beginner
898 Views
Steve,
I was getting an undefined pointer array the NULL_S.. and a NULL_OVERLAPPED. Should I be able to view the contents with the debugger?
I did get it to compile.
I was beginning to check out those USE routines as a possible cause but it is now appearing that there is a multi threading issue with java--c--f90-pipe--Cpp using dllMain.
Thanks for the docslocation.
Ken
0 Kudos
Steven_L_Intel1
Employee
898 Views
Ah, now I understand. We have had issues with the debugger and pointer arrays. Many of them are fixed in the current version, 9.0.028. More will be fixed in the January update. However, since the module which defines such things as NULL_SECURITY_ATTRIBUTES is not compiled with debug information, you may have difficulty examining such objects.

If you still think there's a problem, please submit a small (if possible) but complete example to Intel Premier Support and we'll be glad to investigate.
0 Kudos
Jugoslav_Dujic
Valued Contributor II
898 Views
I don't see how/why could/should one possibly "see" contents of a NULL pointer in the debugger (which is what NULL_SECURITY_ATTRIBUTES is). A NULL pointer is, well, a pointer to "nothing". "Undefined pointer/array" is maybe a clumsy wording, but I don't think it's too unadequate.

Jugoslav
0 Kudos
Reply