SymSrvStoreFile function

Stores a file in the specified symbol store.

Syntax


PCTSTR WINAPI SymSrvStoreFile(
  _In_     HANDLE hProcess,
  _In_opt_ PCTSTR SrvPath,
  _In_     PCTSTR File,
  _In_     DWORD  Flags
);

Parameters

hProcess [in]

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

SrvPath [in, optional]

The symbol store.

File [in]

The name of the file.

Flags [in]

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

ValueMeaning
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

Redistributable

DbgHelp.dll 6.3 or later

Header

DbgHelp.h

Library

Dbghelp.lib

DLL

Dbghelp.dll

Unicode and ANSI names

SymSrvStoreFileW (Unicode) and SymSrvStoreFile (ANSI)

See also

DbgHelp Functions

 

 

Show: