# ScaledWinBufAllocEx()

Allocates a Windows global memory buffer large enough to hold scaled data obtained from scan operations in which the ScaleData scan option is selected, and returns a memory handle for it.

The buffer is used by devices that support scanning of scaled data, for example devices that call AInScan() using the ScaleData option. See hardware-specific information to determine if the device supports scaled data.

Member of the MccService class.

## Function Prototype

VB .NET

Public Function ScaledWinBufAllocEx(ByVal numPoints As Integer) As IntPtr

C# .NET

public IntPtr ScaledWinBufAllocEx(int numPoints)

## Parameters

numPoints

The size of the buffer to allocate. Specifies the number of double precision values (8-byte or 64-bit) that the buffer will hold.

## Returns

- 0, if the buffer could not be allocated, or a non-zero integer handle to the buffer.

## Notes

- This method is used in conjunction with the ScaleData scan option and ScaledWinBufToArray() or ScaledWinArrayToBuf().
- Unlike most other methods in the library, this method does not return an ErrorInfo object. It returns a Windows global memory handle, which can then be passed to the scan methods in the library. If an error occurs, the handle will come back as 0 to indicate that the buffer was not allocated.
- This method is preferred over the deprecated method ScaledWinBufAlloc(). Only use ScaledWinBufAlloc() in 32-bit legacy applications that call deprecated methods.