SAMPLE: Binary.exe Transfers Binary Data Using OLE Automation

ID: Q131046


The information in this article applies to:
  • Microsoft OLE Libraries for Windows and Win32s, version 2.03
  • Microsoft OLE Libraries, used with:
    • Microsoft Windows NT 3.5
    • Microsoft Windows 95


SUMMARY

BINARY is an OLE Automation server that you can obtain from the Microsoft Software Library. It demonstrates how to transfer binary data using a SAFEARRAY of unsigned char. The CTRL directory in this sample contains an automation controller that will obtain the binary data from the server.


MORE INFORMATION

The following file is available for download from the Microsoft Software Library:

Binary.exe
For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online Services
Binary data can be transferred with OLE Automation by using a SAFEARRAY of unsigned char (VT_ARRAY|VT_UI1). Binary data can also be transferred by passing the IUnknown of a data transfer object that supports IDataObject. This sample uses the first approach, not the second.

Standard controllers like Visual Basic may be able to pass binary data to an automation server using the approach discussed in Don Box's column in the June 1996 issue of the Microsoft Systems Journal.

See the README.TXT in the sample for details on how to compile and run the sample. After you download BINARY.EXE, use the following command to run it:
BINARY.EXE -d
This builds the directory structure for you.

Additional query words:

Keywords : kbcode kbfile kbsample kbNTOS350 kbWinOS95 kbGrpCom kbDSupport kbOLE202
Version : WINDOWS:2.03,95; :
Platform : WINDOWS
Issue type :


Last Reviewed: October 26, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.