RPR ValidatePtr

From CockosWiki

Jump to: navigation, search

Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR ValidatePtr
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR ValidatePtr

Contents

ValidatePtr()

bool ValidatePtr(void* pointer, const char* ctypename)

Returns true if the pointer is a valid object of the specified type

ValidatePtr can be used (from ReaScript only) for any of the pointer types listed in the API documentation that aren't native C types. The function is probably not often needed by ReaPerl or ReaPython programmers, but ReaScript uses it internally to make scripts less likely to blow up.

Parameters

void* pointer, 
const char* ctypename
Valid values for ctypename are:
 IReaperControlSurface*
 IReaperPitchShift*
 KbdSectionInfo*
 LICE_IBitmap*
 MIDIEditor*
 MIDI_event_t*
 MIDI_eventlist*
 MediaItem*
 MediaItem_Take*
 MediaTrack*
 PCM_sink*
 PCM_source*
 PCM_source_peaktransfer_t*
 PCM_source_peaktransfer_t*
 PCM_source_transfer_t*
 REAPER_PeakBuild_Interface*
 REAPER_PeakGet_Interface*
 REAPER_Resample_Interface*
 RECT*
 ReaProject*
 WDL_VirtualWnd_BGCfg*
 midi_Input*
 midi_Output*
 preview_register_t*

Returns

An array, containing
 bool, True if the pointer is a valid object of the specified type.
 void* pointer, 
 const char* ctypename

Examples

C++

 


Perl

 


Python

 

See Also

Stuff

Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR ValidatePtr
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR ValidatePtr

Personal tools