it doesn't work that way. After you have taken the photo you need to catch the ObjectEvent and then download the file. It works something like this:
- Open session
 
- Set SaveTo_Both or Host
 
- Set Capacity
 
- Subscribe to the object event with EdsSetObjectEventHandler
 
- Take photo
 
- The object event should fire with "inEvent" being "kEdsObjectEvent_DirItemRequestTransfer"
 
- Download the data:
- Get info with EdsGetDirectoryItemInfo where "inDirItemRef" is "inRef" from the event
 
- Create file stream with EdsCreateFileStream
 
- Download the data with EdsDownload (inRef from the event, size from the DirectoryItemInfo)
 
- Mark as finished with EdsDownloadComplete (inRef from the event)
 
- Release the data with EdsRelease (inRef from the event)
 
- Release the stream with EdsRelease
 
 
I'm sorry that I can't provide you actual code, I'm not a C++ developer. If you want I can show you some C# code though. To get more details on how the functions work, you could also check the documentation of the SDK.
Kind regards
Edit:
Ok, some C++ code with help of the documentation:
Note that this is how it would work in it's barest form. You should always check if err != EDS_ERR_OK. And you should call Close only after the image has been downloaded.
void TakePhoto()
{
    EdsError err = EDS_ERR_OK;
    EdsCameraRef camera = NULL;
    EdsCameraListRef cameraList = NULL;
    EdsUInt32 count = 0;
    err = EdsInitializeSDK();
    err = EdsGetCameraList(&cameraList);
    err = EdsGetChildCount(cameraList, &count);
    if (count > 0)
    {
        err = EdsGetChildAtIndex(cameraList, 0, &camera);
        cameraList = NULL;
        err = EdsSetObjectEventHandler(camera, kEdsObjectEvent_All, handleObjectEvent, NULL);
        err = EdsOpenSession(camera);
        err = EdsSendCommand(camera, kEdsCameraCommand_TakePicture, 0);
    }
}
void Close(EdsCameraRef *camera)
{
    err = EdsCloseSession(camera);
    EdsRelease(camera);
    EdsTerminateSDK();
}
static EdsError EDSCALLBACK handleObjectEvent(EdsObjectEvent event, EdsBaseRef object, EdsVoid * context)
{
    if (event == kEdsObjectEvent_DirItemRequestTransfer)
    {
        EdsError err = EDS_ERR_OK;
        EdsStreamRef stream = NULL;
        EdsDirectoryItemInfo dirItemInfo;
        err = EdsGetDirectoryItemInfo(object, &dirItemInfo);
        err = EdsCreateFileStream(dirItemInfo.szFileName, kEdsFileCreateDisposition_CreateAlways, kEdsAccess_ReadWrite, &stream);
        err = EdsDownload(object, dirItemInfo.size, stream);
        err = EdsDownloadComplete(object);
        EdsRelease(stream);
        stream = NULL;
    }
    if (object) EdsRelease(object);
}