Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
CertGetNameString() はヒープ破損エラーをランダムにスローします。関数 CertGetNameStringW() を使用すると同じことが起こります
LPCWSTR pszName = (LPCWSTR)malloc(cbSize * sizeof(TCHAR)); if (CertGetNameString( pCurrentCertContext, dwType, dwFlags, nullptr, pszName, cbSize)) {}
CertGetNameString() cyrpt api の使用を含むコードでは、プリプロセッサ ディレクティブ UNICODE を有効にしてコードをビルドする必要があります。