RPR ValidatePtr
From CockosWiki
(→Parameters) |
|||
(7 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
{{API_Doc_Header}} | {{API_Doc_Header}} | ||
=ValidatePtr()= | =ValidatePtr()= | ||
- | bool ValidatePtr(void* pointer, const char* ctypename) | + | '''bool ValidatePtr(void* pointer, const char* ctypename)''' |
Returns true if the pointer is a valid object of the specified type | 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 | + | 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== | ==Parameters== | ||
Line 12: | Line 12: | ||
Valid values for ctypename are: | Valid values for ctypename are: | ||
- | + | IReaperControlSurface* | |
+ | IReaperPitchShift* | ||
+ | KbdSectionInfo* | ||
+ | LICE_IBitmap* | ||
+ | MIDIEditor* | ||
+ | MIDI_event_t* | ||
+ | MIDI_eventlist* | ||
MediaItem* | MediaItem* | ||
- | |||
MediaItem_Take* | MediaItem_Take* | ||
+ | MediaTrack* | ||
+ | PCM_sink* | ||
PCM_source* | PCM_source* | ||
- | |||
PCM_source_peaktransfer_t* | PCM_source_peaktransfer_t* | ||
- | |||
- | |||
- | |||
PCM_source_peaktransfer_t* | PCM_source_peaktransfer_t* | ||
- | + | PCM_source_transfer_t* | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
REAPER_PeakBuild_Interface* | REAPER_PeakBuild_Interface* | ||
REAPER_PeakGet_Interface* | REAPER_PeakGet_Interface* | ||
- | |||
- | |||
REAPER_Resample_Interface* | REAPER_Resample_Interface* | ||
- | + | RECT* | |
+ | ReaProject* | ||
WDL_VirtualWnd_BGCfg* | WDL_VirtualWnd_BGCfg* | ||
+ | midi_Input* | ||
+ | midi_Output* | ||
+ | preview_register_t* | ||
==Returns== | ==Returns== | ||
- | bool, True if the pointer is a valid object of the specified type. | + | An array, containing |
+ | bool, True if the pointer is a valid object of the specified type. | ||
+ | void* pointer, | ||
+ | const char* ctypename | ||
+ | |||
==Examples== | ==Examples== | ||
+ | ===C++=== | ||
+ | <source lang=cpp> | ||
+ | </source> | ||
+ | |||
+ | |||
===Perl=== | ===Perl=== | ||
- | < | + | <source lang=perl> |
- | </ | + | </source> |
+ | |||
+ | |||
===Python=== | ===Python=== | ||
- | < | + | <source lang=python> |
- | </ | + | </source> |
+ | |||
==See Also== | ==See Also== | ||
==Stuff== | ==Stuff== |
Latest revision as of 23:40, 24 November 2010
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