version 2003
PA_GetDateParameter (params; index; day; month; year)
Parameter | Type | Description | |
params | PA_PluginParameters | Parameters received in PluginMain | |
index | short | Index of the parameter in params | |
day | short * | Day of the parameter nb index | |
month | short * | Month of the parameter nb index | |
year | short * | Year of the parameter nb index |
Description
The routine PA_GetDateParameter returns in day, month and year the corresponding values of the index parameter in params (of type PA_Date)
See Create a new plugin for a description of parameter accessors.
NOTE:
The first parameter starts at index 1.
Example
Get a date stamp.
void PluginMain( long selector, PA_PluginParameters params ) { switch ( selector ) { . . .kInitPlugin, kDeinitPlugin ... case kMyRoutine : DoSomethingWithADate(params); break; } } void DoSomethingWithADate (PA_PluginParameters params) { short day, month, year; long stamp; // Get the values. In this sample, first parameter is a date PA_GetDateParameter(params, 1, &day, &month, &year); // return the stamp stamp = (year << 16) | ((month & 0x00FF) << 8) | (day & 0x00FF); /* . . . */ }
See Also
Error Handling
PA_GetLastError keeps the last error that occurred before calling the routine.