CHMlib Logo Leading Translation Management System for Translation Agencies, Top Translation Management Software for Freelance Translators, Time Tracking Software, Word Count, Character Count and Line Count Software, Computer Assisted Translation Tool for Easy Word Count, Clipboard Character Count Software, User-Friendly Translation Memory Software, Terminology Management Software, Terminology Management Server, Microsoft Glossary Software, Dictionary of Acronyms, Social Network for Translators and Translation Agencies, Acronyms and Abbreviations Search Engine, Russian Translation Lab, Ukrainian Translation Lab.
You are reading help file online using chmlib.com
CrisisHelper - First Aid in Tough Times of World Economic Crisis


The Microsoft.com Speech website Microsoft Speech SDK

SAPI 5.1

ISpObjectToken::RemoveStorageFileName

ISpObjectToken::RemoveStorageFileName removes the object token file name.


HRESULT RemoveStorageFileName(
   REFCLSID       clsidCaller,
   const WCHAR   *pszKeyName,
   BOOL           fDeleteFile
);

Parameters

clsidCaller
[in] Globally unique identifier (GUID) of the calling object.
pszKeyName
[in] Address of a null-terminated string containing the registry key name.
fDeleteFile
[in] Value specifying if the file should be deleted. TRUE deletes the file afterward; FALSE does not.

Return values

Value Description
S_OK Function completed successfully.
E_INVALIDARG pszKeyName is invalid or bad.
SPERR_UNINITIALIZED Either the data key or token delegate interface is not initialized.
SPERR_TOKEN_DELETED Key has been deleted.
FAILED(hr) Appropriate error message.

Example

The following code snippet creates a test file, removes it and manually deletes it. It may also have been deleted automatically by setting fDeleteFile to TRUE.

HRESULT hr;
GUID guid0;

CComPtr<ISpObjectToken> cpSpObjectToken;
CComPtr<ISpObjectWithToken> cpSpObjectWithToken;
CSpCoTaskMemPtr<WCHAR> cpFileName;

hr = SpGetDefaultTokenFromCategoryId(SPCAT_VOICES, &cpSpObjectToken);
//Check return value

ZeroStruct(guid0);
// Create subkeys and value item to be deleted
hr = cpSpObjectToken->GetStorageFileName(guid0, L"test file", NULL, CSIDL_FLAG_CREATE|CSIDL_APPDATA, &cpFileName);

if (SUCCEEDED(hr))
{
   hr = cpSpObjectToken->RemoveStorageFileName(guid0, L"test file", false);
   //Check return value
		
   cpFileName.Clear();
}


You are reading help file online using chmlib.com

If you want your help file to be removed or added please send e-mail to chmlibcom@gmail.com
Partner sites: Logo Design, Simple Anti-Crisis Accounting Software, Voice Search for Web