I'm trying Azure in C++ (VS 2019) and got the vcpkg packages (32 and 64 bit) as recommended here
https://azure.github.io/azure-storage-cpp/
Then tried the examples here
https://docs.microsoft.com/en-us/azu...w-to-use-blobs
I started a new C++ console app and got this far
Executing the download_text() call throws an exception.
In 64 bit it is just an "Exception at at xxx" message followed by a dialog saying the assert for IsCompleted() failed.
In 32 bit it shows more detail in a second message before the dialog as "The value of ESP was not properly saved across a function call"
I tried the download_to_stream() example as well with the same result.
The account is fine, the container and blob exist, the blob client and container steps are fine and the data looks ok, it's just when trying to actually pull something down it fails.
- any clues?
https://azure.github.io/azure-storage-cpp/
Then tried the examples here
https://docs.microsoft.com/en-us/azu...w-to-use-blobs
I started a new C++ console app and got this far
Code:
#include <iostream>
#include <was\blob.h>
#include <was\storage_account.h>
int main()
{
std::cout << "Hello World!\n";
utility::string_t name = L"--------"; // my stuff blotted out
utility::string_t key = L"---------"; // my stuff blotted out
utility::string_t con = L"DefaultEndpointsProtocol=https;AccountName=" + name + L";AccountKey=" + key;
// Define the connection-string with your values.
const utility::string_t storage_connection_string(con);
// Retrieve storage account from connection string.
azure::storage::cloud_storage_account storage_account = azure::storage::cloud_storage_account::parse(storage_connection_string);
// Create the blob client.
azure::storage::cloud_blob_client blob_client = storage_account.create_cloud_blob_client();
// Retrieve a reference to a previously created container.
azure::storage::cloud_blob_container container = blob_client.get_container_reference(U("demo"));
// Retrieve reference to a blob named "my-blob-2".
azure::storage::cloud_block_blob text_blob = container.get_block_blob_reference(U("Job.ini"));
// Download the contents of a blog as a text string.
utility::string_t text = text_blob.download_text();In 64 bit it is just an "Exception at at xxx" message followed by a dialog saying the assert for IsCompleted() failed.
In 32 bit it shows more detail in a second message before the dialog as "The value of ESP was not properly saved across a function call"
I tried the download_to_stream() example as well with the same result.
The account is fine, the container and blob exist, the blob client and container steps are fine and the data looks ok, it's just when trying to actually pull something down it fails.
- any clues?