[#wallet-CWallet-LoadExisting] = xref:wallet.adoc[wallet]::xref:wallet/CWallet.adoc[CWallet]::LoadExisting :relfileprefix: ../../ :mrdocs: Initializes, loads, and returns a CWallet from an existing wallet; returns a null pointer in case of an error == Synopsis Declared in `<wallet/wallet.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static std::shared_ptr<CWallet> LoadExisting( xref:wallet/WalletContext.adoc[WalletContext]& context, std::string const& name, std::unique_ptr<WalletDatabase> database, xref:bilingual_str.adoc[bilingual_str]& error, std::vector<bilingual_str>& warnings); ---- == Return Value The loaded wallet, or nullptr on failure. == Parameters [cols="1,4"] |=== | Name| Description | *context* | The wallet context to load into. | *name* | The name of the wallet to load. | *database* | The database backend of the existing wallet. | *error* | Set to an error message on failure. | *warnings* | Warnings produced while loading. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#