# scaled_win_buf_alloc()

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 a_out_scan() using the SCALEDATA option. See hardware-specific information to determine if the device supports scaled data.

## Prototype

scaled_win_buf_alloc(num_points)

## Parameters

num_points

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 (int).

## Notes

- This function is used in conjunction with the SCALEDATA scan option and scaled_win_buf_to_array() or scaled_win_array_to_buf()
- Unlike most other functions in the library, this function does not return an error code. It returns a Windows global memory handle which can then be passed to the scan functions in the library. If an error occurs, the handle will come back as 0 to indicate that the buffer was not allocated.