Programmer Guide > Creating an OPI Option > wvh_dataptr
  

wvh_dataptr
Returns a pointer to the data area of a PV‑WAVE variable.
C Usage
char *wvh_dataptr(wvh)
WVH wvh;
FORTRAN Usage
INTEGER*4 LF_WVH_DATAPTR(l_wvh)
INTEGER*4 l_wvh
64-bit UNIX FORTRAN Usage
INTEGER*8 LF_WVH_DATAPTR(l_wvh)
INTEGER*8 l_wvh
Input Parameters
wvh—The Wave variable handle of the variable
Returned value
Returns a pointer to the data area of the variable. You need to cast this pointer to the proper C data type according to the type of the PV-WAVE variable. For more information about type size issues, see the section Integer Data Type Size Issues on 64-Bit Platforms under the wave_assign_num routine.
NULL is returned on failure. Will return NULL if WVH is a Wave variable handle for a PV‑WAVE structure.
In FORTRAN, LF_WVH_DATAPTR returns –1 on failure.
Discussion
In FORTRAN, you should pass the data pointer using %VAL() to a function or subroutine, which can then declare it to be the proper data type.
Examples
For examples of how to use the data pointer in FORTRAN, see the examples in the directory:
(UNIX) $RW_DIR/wave/demo/interapp⁄opi
Specifically, look at the WLNLF_* functions (and how they are called) in one of the opifor*.f example programs.

Version 2017.1
Copyright © 2019, Rogue Wave Software, Inc. All Rights Reserved.