 |
NOTE : This project is not currently in development and is totally unsupported. These pages are here for information only.
deletePicture
Declaration
extern "C" status_t deletePicture();
Description
This function is entirely optional. The function returns a status_t error code to indicate the success of the
operation. Any of the status_t error codes can be used, but it is suggested that
you stick to using B_NO_ERROR for success and B_ERROR for failure.
The function should delete the currently selected image from the camera.
Example Implementation - Kodak DC210 Plugin
status_t deletePicture()
{
haveigotfilenames = false;
unsigned char *buffer = new unsigned char[1];
char* temp2;
//Send the command to delete the current image on the camera
ComPort->Write("\x7B\x00", 2);
temp2 = (char*)(currentpicturenumber >> 8);
ComPort->Write(&temp2,1);
temp2 = (char*)(currentpicturenumber >> 0);
ComPort->Write(&temp2,1);
ComPort->Write("\x00",1);
ComPort->Write("\x00\x00\x1A",3);
ComPort->Read(buffer,1);
while (buffer[0] == 0xf0)
ComPort->Read(buffer,1);
if (buffer[0] == 0xe2)
return(B_ERROR);
else if (buffer[0] == 0xd1)
{
ComPort->Read(buffer,1);
while (buffer[0] == 0xf0)
ComPort->Read(buffer,1);
if (buffer[0] == 0x00)
{
snooze(50000);
return(B_NO_ERROR);
}
else
return(B_ERROR);
}
else
return(B_ERROR);
}
BDCP Developers Home Page
|
|
 |
|