Canon Digital Camera
Software Development Kit
Software
Developer’s
Guide
Copyright 2003 CANON INC.
Ver 6.1
CD-SDK Software Developer's Guide i
The information contained in this document is subject to change without notice. Canon
Inc. makes no warranty of any kind with regard to this material, either express or
implied, except as provided herein, including without limitation thereof, warranties as
to marketability, for a particular purpose or use, or against infringement of any patent.
Canon Inc. shall not be liable for any direct, incidental, or consequential damages of
any nature, or losses or expenses resulting from the use of this material.
This document contains proprietary information, which is protected by copyright. All
rights are reserved. No part of this document may be photocopied, reproduced, or
translated into another language without prior written consent of Canon Inc.
Considerable effort has been made to ensure that this manual is free of inaccuracies and
omissions. However, as we are constantly improving our products, some of the data
contained herein may not exactly reflect the current model of the particular product
with which this manual has been included.
Copyright 2003 Canon Inc.
Canon, PowerShot, and EOS are registered trademarks of Canon Inc. in Japan and/or
other countries.
Windows is a registered trademark of Microsoft Corporation in the United States
and/or other countries.
Macintosh is a registered trademark of Apple Computer, Inc. in the United States
and/or other countries.
All other trademarks in this documentation are registered trademarks and trademarks of
their respective owners.
ii CD-SDK Software Developer's Guide
Revision History
Document
Version
Issued Updated Content
1.0 2002/03/29 First edition.
1.1 2002/05/08 Explanations of several functions have been added.
5.0 2002//11/29
• Supported camera models have been added.
• Supports Mac OS X (10.1).
• Each [WIN] function call convention has been
changed to stdcall. This allows CD-SDK to be used
even in Visual Basic 6.0.
• [Win] CDShowDeviceSelecting UI(),
CDShowDeviceSettingUI() have been removed.
• [Win] CDEnumDeviceReset() Kind parameter
specifications have been changed.
• CDGetPluggedDevice() has been removed.
• CDGetVolumeName() has been added.
• CDSetDevParam_PhotoEffect(),
CDSetDevParam_FalseResolutionFilter() have been
added.
• CDAFLock() has been added.
• The functions that enumerate the values that can be
set in each capture parameter within remote release
control mode have been added.
• Chapter 5 "Settings to operate CD-SDK" content has
been changed.
6.0 2003/05/30
• Supported camera models have been changed.
• CDGetPreviousDeviceInfo() has been removed.
• CDSetDevParam_ColorSpace() and
CDGetReleaseControlFaculty() have been added.
• The cdSourceInfo structure has been changed.
• Explanations of several functions have been added.
CD-SDK Software Developer's Guide iii
Revision History
Document
Version
Issued Updated Content
6.1 2003/11/14
• Addition of supported camera models.
• Addition of CDFreeImageItem().
• Addition of explanations of several functions.
iv CD-SDK Software Developer's Guide
Table of Contents
1 Getting Started....................................................................................... 1-1
1.1 Introduction ...............................................................................................1-2
Contents of the CD-SDK Package ........................................................................1-2
1.2 System Requirements...............................................................................1-2
Supported Cameras ..............................................................................................1-2
Development System Environment.......................................................................1-4
Target System Environment..................................................................................1-5
1.3 Installing the CD-SDK ............................................................................... 1-6
1.4 Setting Up a Project ..................................................................................1-6
CD-SDK Include Files ...........................................................................................1-7
Linking to Libraries ................................................................................................1-7
To connect to a camera:........................................................................................ 1-9
2 Overview of the Canon Digital Camera SDK ....................................... 2-1
2.1 Introduction ...............................................................................................2-2
2.2 Source Devices .........................................................................................2-3
Specifying the Source Device ...............................................................................2-3
Camera Properties ................................................................................................ 2-3
Camera Events......................................................................................................2-4
2.3 Image Items ..............................................................................................2-5
Collecting Image Items..........................................................................................2-5
Image Items...........................................................................................................2-5
Image Data ............................................................................................................ 2-6
Transferring Image Data .......................................................................................2-6
2.4 Remote Release Control...........................................................................2-7
2.5 CD-SDK Clients ........................................................................................2-7
3 Function Reference ............................................................................... 3-1
3.1 Basic Data Types ......................................................................................3-2
3.2 Errors ........................................................................................................3-3
3.3 Basic Functions.........................................................................................3-4
CDStartSDK..........................................................................................3-4
CDFinishSDK........................................................................................3-5
CDGetSDKVersion ...............................................................................3-5
CDGetFunctions ................................................................................... 3-6
CDIdle ...................................................................................................3-7
3.4 Source Control Functions..........................................................................3-7
Retrieving Device Information 1: Displaying the CD-SDK Dialog Box .................. 3-8
CDShowDeviceSelectingUI ..................................................................3-8
Retrieving Device Information 2: Enumerating Camera Types............................. 3-9
CDEnumDeviceReset...........................................................................3-9
CDEnumDeviceNext.............................................................................3-9
CDGetDeviceCount ............................................................................ 3-11
CDEnumDeviceRelease ..................................................................... 3-11
Opening and Closing the Device......................................................................... 3-12
CDOpenSource...................................................................................3-12
CDCloseSource ..................................................................................3-13
CD-SDK Software Developer's Guide v