RPR ValidatePtr

From CockosWiki

(Difference between revisions)
Jump to: navigation, search
(Parameters)
(Undo revision 13370 by Ucokane (Talk))
 
(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 normally needed, but ReaScript uses it internally to make scripts less likely to blow up.
+
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:
-
   MediaTrack*
+
   IReaperControlSurface*
 +
  IReaperPitchShift*
 +
  KbdSectionInfo*
 +
  LICE_IBitmap*
 +
  MIDIEditor*
 +
  MIDI_event_t*
 +
  MIDI_eventlist*
   MediaItem*
   MediaItem*
-
  ReaProject*
 
   MediaItem_Take*
   MediaItem_Take*
 +
  MediaTrack*
 +
  PCM_sink*
   PCM_source*
   PCM_source*
-
  PCM_source_transfer_t*
 
   PCM_source_peaktransfer_t*
   PCM_source_peaktransfer_t*
-
  midi_Input*
 
-
  midi_Output*
 
-
  IReaperControlSurface*
 
   PCM_source_peaktransfer_t*
   PCM_source_peaktransfer_t*
-
   GUID*
+
   PCM_source_transfer_t*
-
  MIDI_event_t*
+
-
  MIDI_eventlist*
+
-
  LICE_IBitmap*
+
-
  MIDIEditor*
+
-
  RECT*
+
-
  PCM_sink*
+
   REAPER_PeakBuild_Interface*
   REAPER_PeakBuild_Interface*
   REAPER_PeakGet_Interface*
   REAPER_PeakGet_Interface*
-
  preview_register_t*
 
-
  IReaperPitchShift*
 
   REAPER_Resample_Interface*
   REAPER_Resample_Interface*
-
   KbdSectionInfo*
+
   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===
-
<pre>
+
<source lang=perl>
-
</pre>
+
</source>
 +
 
 +
 
===Python===
===Python===
-
<pre>
+
<source lang=python>
-
</pre>
+
</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

Personal tools