Platforms to show: All Mac Windows Linux Cross-Platform
MemoryBlock class
| Type | Topic |
| class | MemoryBlock |
- property OSTypeMBS(offset as Integer) as String
- 89 methods
- method AddressMBS(offset as Int64 = 0) as UInt64
- method AddressPtrMBS(offset as Int64 = 0) as Ptr
- method AndBitsMBS(Second as memoryblock, Dest as memoryblock=nil) as memoryblock
- method AndBitsMBS(Second as memoryblock, Mask as Integer, Dest as memoryblock=nil) as memoryblock
- method AppendMBS(other as memoryblock) as memoryblock
- method BitwiseAndMBS(Second as MemoryBlock, Dest as MemoryBlock = nil) as MemoryBlock
- method BitwiseOrMBS(Second as MemoryBlock, Dest as MemoryBlock = nil) as MemoryBlock
- method BitwiseXOrMBS(Second as MemoryBlock, Dest as MemoryBlock = nil) as MemoryBlock
- method BytesEqualMBS(srcOfs as Integer, numBytes as Integer, destBlk as memoryBlock, destOfs as Integer) as Boolean
- method BytesZeroMBS(srcOfs as Integer, numBytes as Integer) as Boolean
- method ClearBitMBS(Bit as UInt64)
- method ConvertRGB12BitTo8BitMBS(Width as Integer)
- method CopyBytesFromMacHandleMBS(srcHandle as Integer, numBytes as Integer, destOfs as Integer)
- method CopyBytesFromMacPtrMBS(srcPtr as Ptr, numBytes as Integer, destOfs as Integer)
- method CopyBytesMBS(srcOfs as Integer, numBytes as Integer, destBlk as memoryBlock, destOfs as Integer)
- method CopyBytesMBS(srcOfs as Integer, numBytes as Integer, destOfs as Integer)
- method CopyBytesToMacHandleMBS(srcOfs as Integer, numBytes as Integer, destHandle as Integer)
- method CopyBytesToMacPtrMBS(srcOfs as Integer, numBytes as Integer, destPtr as Ptr)
- method CopyByteToUShortMBS(dest as memoryblock, SourceOffset as Integer, DestinationOffset as Integer, ByteCount as Integer, divisor as Integer)
- method CopyNthBitsMBS(source as memoryblock, SourceOffsetBits as Integer, DestinationOffsetBits as Integer, BitCount as Integer, StepCount as Integer, NumberOfSteps as Integer) as boolean
- method CopyNthBytesMBS(source as memoryblock, SourceOffsetBytes as Integer, DestinationOffsetBytes as Integer, ByteCount as Integer, StepCount as Integer, NumberOfSteps as Integer) as boolean
- method CopyUShortToByteMBS(dest as memoryblock, SourceOffset as Integer, DestinationOffset as Integer, ByteCount as Integer, divisor as Integer)
- method CRC_32ContMBS(offset as Integer, numBytes as Integer, prevCRC as UInt32) as UInt32
- method CRC_32MBS(offset as Integer, numBytes as Integer) as UInt32
- method CRC_CCITTContMBS(offset as Integer, numBytes as Integer, prevCRC as UInt32) as UInt32
- method CRC_CCITTMBS(offset as Integer, numBytes as Integer) as UInt32
- method CRC_DillonMBS(bitWidth as Integer, offset as Integer, numBytes as Integer) as String
- method EndianS16_BtoLMBS(offset as Integer,count as Integer)
- method EndianS16_BtoNMBS(offset as Integer,count as Integer)
- method EndianS16_LtoBMBS(offset as Integer,count as Integer)
- method EndianS16_LtoNMBS(offset as Integer,count as Integer)
- method EndianS16_NtoBMBS(offset as Integer,count as Integer)
- method EndianS16_NtoLMBS(offset as Integer,count as Integer)
- method EndianS32_BtoLMBS(offset as Integer,count as Integer)
- method EndianS32_BtoNMBS(offset as Integer,count as Integer)
- method EndianS32_LtoBMBS(offset as Integer,count as Integer)
- method EndianS32_LtoNMBS(offset as Integer,count as Integer)
- method EndianS32_NtoBMBS(offset as Integer,count as Integer)
- method EndianS32_NtoLMBS(offset as Integer,count as Integer)
- method EndianSwap16MBS(offset as Integer,count as Integer)
- method EndianSwap32MBS(offset as Integer,count as Integer)
- method EndianU16_BtoLMBS(offset as Integer,count as Integer)
- method EndianU16_BtoNMBS(offset as Integer,count as Integer)
- method EndianU16_LtoBMBS(offset as Integer,count as Integer)
- method EndianU16_LtoNMBS(offset as Integer,count as Integer)
- method EndianU16_NtoBMBS(offset as Integer,count as Integer)
- method EndianU16_NtoLMBS(offset as Integer,count as Integer)
- method EndianU32_BtoLMBS(offset as Integer,count as Integer)
- method EndianU32_BtoNMBS(offset as Integer,count as Integer)
- method EndianU32_LtoBMBS(offset as Integer,count as Integer)
- method EndianU32_LtoNMBS(offset as Integer,count as Integer)
- method EndianU32_NtoBMBS(offset as Integer,count as Integer)
- method EndianU32_NtoLMBS(offset as Integer,count as Integer)
- method ExpandBitsMBS(dest as memoryblock, SourceByteCount as Integer, LowValue as Integer = 0, HighValue as Integer = 255) as boolean
- method ExtractBitsMBS(Mask as Integer, Dest as memoryblock=nil) as memoryblock
- method FillBytesMBS(offset as Integer, count as Integer, value as Integer)
- method FindByteMBS(srcOfs as Integer, numBytes as Integer, byteValue as Integer) as Integer
- method FindByteMBS(values() as UInt8, StartByteOffset as Integer = 0) as Integer
- method FindBytesMBS(srcOfs as Integer, maxBytes as Integer, target as memoryBlock, targOfs as Integer, targLen as Integer) as Integer
- method FindNotByteMBS(srcOfs as Integer, numBytes as Integer, byteValue as Integer) as Integer
- method FindStringMBS(srcOfs as Integer, maxBytes as Integer, target as String) as Integer
- method Float16ToFloat32MBS(Source as Ptr, Count as Integer, SourceOffset as Integer = 0, DestinationOffset as Integer = 0) New in 26.5
- method Float16ValueMBS(offset as integer) as Single New in 26.5
- method Float16ValueMBS(offset as integer, assigns value as Single) New in 26.5
- method Float32ToFloat16MBS(Source as Ptr, Count as Integer, SourceOffset as Integer = 0, DestinationOffset as Integer = 0) New in 26.5
- method Float32ToFloat64MBS(Source as Ptr, Count as Integer, SourceOffset as Integer = 0, DestinationOffset as Integer = 0) New in 26.5
- method Float64ToFloat32MBS(Source as Ptr, Count as Integer, SourceOffset as Integer = 0, DestinationOffset as Integer = 0) New in 26.5
- method GetBitMBS(Bit as UInt64) as Integer
- method GetStringMBS(offset as Integer, numBytes as Integer) as String
- method InvertBytesMBS(offset as Integer, count as Integer)
- method IsBitSetMBS(Bit as UInt64) as Boolean
- method LeftMBS(length as Integer) as memoryblock
- method MaxMBS(firstMem as Ptr, secondMem as Ptr, BitSize as Integer = 8, Signed as Boolean = false, offsetByte as Integer = 0, lengthBytes as Integer = 0) as boolean
- method MidMBS(offset as Integer) as memoryblock
- method MidMBS(offset as Integer, length as Integer) as memoryblock
- method MinMBS(firstMem as Ptr, secondMem as Ptr, BitSize as Integer = 8, Signed as Boolean = false, offsetByte as Integer = 0, lengthBytes as Integer = 0) as boolean
- method MirrorBitsInBytesMBS(offsetByte as Integer, lengthByte as Integer)
- method MirrorBitsMBS(offsetBit as Integer, lengthBit as Integer)
- method MirrorBytesMBS(offsetByte as Integer = 0, lengthByte as Integer = -1)
- method MultiplyUInt16MBS(Factor as Double, offsetByte as Integer = 0, lengthBytes as Integer = 0, MultiplyOnlyOver as Integer = -1)
- method MultiplyUInt8MBS(Factor as Double, offsetByte as Integer = 0, lengthBytes as Integer = 0, MultiplyOnlyOver as Integer = -1)
- method RightMBS(length as Integer) as memoryblock
- method SetBitMBS(Bit as UInt64)
- method SetBitMBS(Bit as UInt64, Value as Boolean)
- method SetBitMBS(Bit as UInt64, Value as Integer)
- method SetStringMBS(str as String, offset as Integer)
- method SwapBytes16MBS(offset as Integer, numBytes as Integer)
- method SwapBytes32MBS(offset as Integer, numBytes as Integer)
- method SwapBytesMBS(offset as Integer, numBytes as Integer)
This class has no subclasses.
See also in the Xojo Language Reference
Release notes
- Version 26.5
- Added Float16ValueMBS to MemoryBlock class.
- Added Float64ToFloat32MBS, Float32ToFloat64MBS, Float32ToFloat16MBS and Float16ToFloat32MBS methods to MemoryBlock class.
- Version 25.0
- Fixed an issue in MemoryBlock.AppendMBS copying wrong data if one of the MemoryBlock has no size set.
- Fixed memory leak with DynaPDFBitmapMBS class destructor leaking a memoryblock.
- Version 23.5
- Added Constructor to StringHandleMBS class taking MemoryBlock.
- Version 23.0
- Added BitwiseAndMBS, BitwiseOrMBS and BitwiseXOrMBS to MemoryBlock class.
- Version 22.5
- Added BitwiseAndMBS, BitwiseOrMBS and BitwiseXOrMBS to MemoryBlock class.
- Version 22.4
- Improved BytesZeroMBS function in MemoryBlock class to be faster.
- Version 21.4
- Added FindByteMBS function for MemoryBlock to take array of byte values.
- Added ReadFileMBS for reading file data into MemoryBlock.
- Version 21.0
- Added ClearBitMBS, SetBitMBS, IsBitSetMBS, and GetBitMBS to MemoryBlock class.
- Version 20.4
- If you pass picture as value for SQL parameter, we now convert to PNG MemoryBlock internally.
Some useful global functions for this class:
- CalculateCRC16MemoryMBS(data as MemoryBlock, Start as UInt16 = 65535, Polynomial as UInt16 = &h1021, FinalXOR as UInt16 = 0, ReflectInput as boolean = false, ReflectOutput as boolean = false) as UInt16
- CGCreateImageFromJPEGDataProviderMBS(dataprovider as Variant, decode as memoryblock, shouldInterpolate as boolean, intent as Integer) as CGImageMBS
- CRC_DillonUInt64MBS(extends mem as memoryblock, bitWidth as Integer, offset as Integer, numBytes as Integer) as UInt64
- MD5StringMBS(data as memoryblock) as string
- MemoryblockABGRtoPictureMBS(source as memoryblock, offset as Integer, width as Integer, height as Integer) as picture
- MemoryblockBGRtoPictureMBS(source as memoryblock, offset as Integer, width as Integer, height as Integer) as picture
- MemoryblockGrayToPictureMBS(source as memoryblock, offset as Integer, width as Integer, height as Integer, PixelByteSize as Integer) as picture
- MemoryblockRGBtoPictureMBS(dest as picture, source as memoryblock, offset as Integer, width as Integer, height as Integer) as picture
- MemoryblockRGBtoPictureMBS(source as memoryblock, offset as Integer, width as Integer, height as Integer) as picture
- NewCIImagewithBitmapDataMBS(data as memoryblock, BytesPerRow as Integer, Width as Integer, Height as Integer, Format as Integer, colorspace as CGColorSpaceMBS) as CIImageMBS
Some methods using this class:
- CoreAudioMBS.AudioObjectGetPropertyDataSize(inObjectID as Integer, AddressSelector as UInt32, AddressScope as UInt32, AddressElement as UInt32, QualifierData as memoryblock = nil) as UInt32
- IMImageInfoQ16MBS.HandleMemory as memoryblock
- IOBluetoothDeviceMBS.SendL2CAPEchoRequest(Data as MemoryBlock)
- LCMS2ProfileMBS.OpenProfileFromMemory(context as LCMS2ContextMBS, data as Memoryblock) as LCMS2ProfileMBS
- NSAttributedStringMBS.attributedStringWithHTML(data as memoryblock) as NSAttributedStringMBS
- NSCoderMBS.decodeBytes(key as string) as MemoryBlock
- NSInputStreamMBS.LookAHead as MemoryBlock
- PromptMBS.promptFromJSON(JSON as MemoryBlock) as PromptMBS
- WindowsBlueToothLEMBS.SetCharacteristicValue(Characteristic as WindowsBlueToothLECharacteristicMBS, data as MemoryBlock, ReliableWriteContextID as UInt64, Flags as Integer = 0) as Boolean
- WinUSBMBS.ControlTransfer(SetupPacket as WinUSBSetupPacketMBS, Buffer as MemoryBlock) as Integer
Some properties using this class:
- ArchiveEntryMBS.Stat as MemoryBlock
- CURLSMimePartMBS.DataMemory as Memoryblock
- FileMappingViewMBS.Memory as Memoryblock
- GM16ConvertMBS.InputMemory as MemoryBlock
- MidiPacketMBS.DataMemory as MemoryBlock
- MIDISysexSendRequestMBS.Data as Memoryblock
- NSAffineTransformMBS.Data as MemoryBlock
- PictureEditorMBS.AllData as Memoryblock
- PictureReaderMBS.DataCopy as Memoryblock
- PictureMBS.RowInFormat(index as Integer, ImageFormat as Integer) as memoryblock
Some events using this class:
- CFSocketMBS.Callback(reason as Integer, address as CFBinaryDataMBS, data as memoryblock)
- DRTrackMBS.producePreGapForTrack(buffer as memoryblock, Bufferlen as uint32, address as uint64, blocksize as uint32, byref flags as uint32) as uint32
- DRTrackMBS.verifyPreGapForTrack(buffer as memoryblock, Bufferlen as uint32, address as uint64, blocksize as uint32, byref flags as uint32) as boolean
- IKCameraDeviceViewControlMBS.DidDownloadFile(CameraFile as ICCameraFileMBS, URL as string, File as folderItem, data as MemoryBlock, error as NSErrorMBS)
- ImageCaptureEventsMBS.cameraDeviceDidReadData(data as Memoryblock, file as ICCameraFileMBS, error as NSErrorMBS, device as ICCameraDeviceMBS)
- ImageCaptureEventsMBS.cameraDeviceDidReceivePTPEvent(camera as ICCameraDeviceMBS, eventData as MemoryBlock)
- ImageCaptureEventsMBS.deviceDidReceiveCustomNotification(device as ICDeviceMBS, notification as Dictionary, data as Memoryblock)
- ImageCaptureEventsMBS.scannerDeviceDidScanToURL(scanner as ICScannerDeviceMBS, URL as string, file as folderitem, data as MemoryBlock)
- TKTokenSessionMBS.signData(dataToSign as MemoryBlock, keyObjectID as Variant, algorithm as TKTokenKeyAlgorithmMBS, byref error as NSErrorMBS) as MemoryBlock
- WKWebViewIOSControlMBS.downloadDidFailWithError(download as WKDownloadMBS, error as NSErrorMBS, resumeData as MemoryBlock)
Some related classes:
- class ArchiveEntryMBS
- class CFSocketMBS
- class CGColorSpaceMBS
- class CGImageMBS
- class CIImageMBS
- class DRTrackMBS
- class GM16ConvertMBS
- class ICCameraFileMBS
- class NSAttributedStringMBS
- class WinUSBSetupPacketMBS
The items on this page are in the following plugins: MBS Util Plugin.