From 0fb07c24d8321bdec2d5d5a254acbb9ceaee807a Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Fri, 3 Oct 2025 18:48:17 -0400 Subject: Add zero-copy data pointer access for BinaryData objects for API-side container transforms. --- binaryninjaapi.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'binaryninjaapi.h') diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 99ba7044..f7896a45 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -5829,6 +5829,18 @@ namespace BinaryNinja { */ DataBuffer ReadBuffer(uint64_t offset, size_t len); + /*! GetDataPointer returns a pointer to the underlying data for zero-copy access + + \return pointer to data if available for zero-copy access, nullptr otherwise + */ + const uint8_t* GetDataPointer() const; + + /*! GetDataLength returns the length of the underlying data + + \return length of data if available for zero-copy access, 0 otherwise + */ + size_t GetDataLength() const; + /*! Write writes `len` bytes data at address `dest` to virtual address `offset` \param offset virtual address to write to -- cgit v1.3.1