rikyoz / bit7z

A C++ static library offering a clean and simple interface to the 7-zip shared libraries.
https://rikyoz.github.io/bit7z
Mozilla Public License 2.0
633 stars 116 forks source link

[Bug]: CreateObject 函数调用异常 #205

Closed XiaoYou0426 closed 5 months ago

XiaoYou0426 commented 5 months ago

bit7z version

4.0.x

Compilation options

BIT7Z_AUTO_FORMAT

7-zip version

v23.01

7-zip shared library used

7z.dll / 7z.so

Compilers

MSVC

Compiler versions

MSVC 2019

Architecture

x86_64

Operating system

Windows

Operating system versions

Windows 11

Bug description

template< typename T > BIT7Z_NODISCARD auto create_archive_object( FARPROC creatorFunction, const BitInFormat& format, T object ) -> HRESULT { // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast) auto createObject = reinterpret_cast< CreateObjectFunc >( creatorFunction ); const auto formatID = format_guid( format ); // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast) return createObject( &formatID, &interface_id< T >(), reinterpret_cast< void >( object ) ); }

createObject 函数报错

0x0000024658F9B5D0 处(位于 ZaiXinJian.exe 中)引发的异常: 0xC0000005: 执行位置 0x0000024658F9B5D0 时发生访问冲突。

Steps to reproduce

No response

Expected behavior

No response

Relevant compilation output

No response

Code of Conduct