SymSrvStoreFile function (dbghelp.h)

Stores a file in the specified symbol store.

Syntax

PCSTR IMAGEAPI SymSrvStoreFile(
  [in]           HANDLE hProcess,
  [in, optional] PCSTR  SrvPath,
  [in]           PCSTR  File,
  [in]           DWORD  Flags
);

Parameters

[in] hProcess

A handle to a process. This handle must have been previously passed to the SymInitialize function.

[in, optional] SrvPath

The symbol store.

[in] File

The name of the file.

[in] Flags

The flags that control the function. This parameter can be one of the following values.

Value Meaning
SYMSTOREOPT_COMPRESS
0x01
Compress the file.
SYMSTOREOPT_OVERWRITE
0x02
Overwrite the file if it exists.
SYMSTOREOPT_PASS_IF_EXISTS
0x40
Do not report an error if the file already exists in the symbol store.
SYMSTOREOPT_POINTER
0x08
Store in File.ptr.
SYMSTOREOPT_RETURNINDEX
0x04
Return the index only.

Return value

If the function succeeds, the return value is a pointer to a null-terminated string that specifies the full-qualified path to the stored file.

If the function fails, the return value is NULL. To retrieve extended error information, call GetLastError.

Remarks

All DbgHelp functions, such as this one, are single threaded. Therefore, calls from more than one thread to this function will likely result in unexpected behavior or memory corruption. To avoid this, you must synchronize all concurrent calls from more than one thread to this function.

This function returns a pointer to a buffer that may be reused by another function. Therefore, be sure to copy the data returned to another buffer immediately.

To call the Unicode version of this function, define DBGHELP_TRANSLATE_TCHAR.

Requirements

Requirement Value
Target Platform Windows
Header dbghelp.h
Library Dbghelp.lib
DLL Dbghelp.dll
Redistributable DbgHelp.dll 6.3 or later

See also

DbgHelp Functions