You are on page 1of 2

File I/O API - C++ Sample Program

04 Feb 03
Overview
Dictls32.exe is a C++ sample program which utilizes the File I/O API. It is a multiple
document interface (MI! application which displa"s the dictionar" information from #P## data
files in one or more child windows. $he user simpl" selects %Open& from the %File& menu to get a
standard Open File dialog. If the selected file is an #P## data file' its dictionar" information is
displa"ed in an edit control in a child window. $he application is terminated (" selecting %)*it&
from the %File& menu.
Building
$he sample program has (een (uilt with +ersion ,.- of Microsoft .isual C++. Other compilers
ma" wor/' (ut the" ha+e not (een tested. In order to (uild the sample program' perform the
following steps0
1. Cop" all the files from the SPSS\Developer\io_dll\smpl_cpp director" on the
distri(ution dis/ to a director" on "our hard dis/.
2. Ma/e sure spssdio.h is on the compiler3s search path 4 either (" cop"ing it to the director"
containing the sample program or (" modif"ing the INCLUDE en+ironment +aria(le.
5. Made sure spssio32.lib is on the lin/er3s search path 4 either (" cop"ing the file to the
director" containing the sample program or (" modif"ing the LIB en+ironment +aria(le.
6. 7se the nm!e utilit" to (uild the application0
nm!e #$ dictls32.m! DEBU%&'
)ach of the ma/efiles recognizes two options which can either (e set as en+ironment +aria(les or
defined on the command line. $he first option is %DEBU%&. If this s"m(ol is defined (regardless
of its +alue!' the resulting e*ecuta(le will contain de(ug s"m(ols. $he default is not to include
de(ug s"m(ols. $he second option is %S()(IC*+C&. If this s"m(ol is defined (regardless of its
+alue!' the resulting e*ecuta(le will contain staticall"4lin/ed Microsoft Foundation Classes (MFC!
and C 8un4$ime. $he default is to use 994resident +ersions of MFC and the C 8un4$ime.
$he ma/efile writes its intermediate and target files to a su(director" named %52&. In order to
e*ecute the resulting application' spssio32.dll must (e accessi(le at e*ecution time.
Integrated Development Environment
Most users will opt to use Microsoft3s Integrated e+elopment )n+ironment (I)! to (uild and
de(ug an application. $he sample application is amena(le to (eing (uilt in this fashion. #impl"
open dictls32.m! (" selecting %Open :or/space& from the %File& menu. ;ou will ha+e to
select %#ettings& on the %<uild& menu to specif" the name of the target file' the name of the
re=uired 99' and the de(ug (uild command line.
Constituent Files
$he following files are included as part of the sample program0
File I/O API 4 C++ #ample Program -6 Fe( -5
dict$x.cpp for (uilding precompiled headers
dict$x.h includes the headers to (e precompiled
dictdoc.cpp Cocument class Cict9istoc 4 does all the wor/
dictdoc.h Interface to class Cict9istoc
dictdoc.ico Icon for class Cict9istoc
dictlist.cpp C)dit.iew class Cict9ist)dit.iew and a C:inApp class
dictlist.h Interface to classes Cict9ist)dit.iew and Cict9istApp
dictls32.m! )*ternal ma/efile
dictls32.rc 8esources
dictmin.ico Icon for the application3s MI frame window
dict#res.h Interface to the resources
4 2 4

You might also like