次の方法で共有


SymbolServerStoreFile function

An entry point to the symbol server DLL. It is used to store a file in the specified symbol store.

The PSYMBOLSERVERSTOREFILE and PSYMBOLSERVERSTOREFILEW types define a pointer to this callback function. SymbolServerStoreFile is a placeholder for the library-defined function name.

Syntax

BOOL CALLBACK SymbolServerStoreFile(
  _In_  PCTSTR SrvPath,
  _In_  PCTSTR FileName,
  _In_  GUID   id,
  _In_  DWORD  val2,
  _In_  DWORD  val3,
  _Out_ PSTR   StoredPath,
  _In_  size_t cStoredPath,
  _In_  DWORD  Flags
);

Parameters

  • SrvPath [in]
    The symbol store.

  • FileName [in]
    The name of the file.

  • id [in]
    The first of three identifying parameters returned by the SymSrvGetFileIndexes function.

  • val2 [in]
    The second of three identifying parameters returned by the SymSrvGetFileIndexes function.

  • val3 [in]
    The third of three identifying parameters returned by the SymSrvGetFileIndexes function.

  • StoredPath [out]
    A pointer to a null-terminated string that receives the fully qualified path to the stored file.

  • cStoredPath [in]
    The length, in characters, of the StoredPath string.

  • Flags [in]
    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

The server can return TRUE to indicate success, or return FALSE and call the SetLastError function to indicate an error condition.

Remarks

To call this function, you must use the LoadLibrary function to load the DLL and the GetProcAddress function to get the address of the function. The default implementation is in Symsrv.dll.

Requirements

Redistributable

DbgHelp.dll 5.1 or later

Header

DbgHelp.h

DLL

SymSrv.dll

Unicode and ANSI names

SymbolServerStoreFileW (Unicode) and SymbolServerStoreFile (ANSI)