SlideShare a Scribd company logo
File I/O API - C++ Sample Program

Overview
Dictls32.exe (dictls16.exe in its 16 bit incarnation) is a C++ sample program which
utilizes the File I/O API. It is a multiple document interface (MDI) application which displays
the dictionary information from SPSS data files in one or more child windows. The user simply
selects “Open” from the “File” menu to get a standard Open File dialog. If the selected file is an
SPSS data file, its dictionary information is displayed in an edit control in a child window. The
application is terminated by selecting “Exit” from the “File” menu.

Building
The sample program has been built with versions 1.5 (16 bit) and 4.0 (32 bit) of Microsoft
Visual C++. Other compilers may work, but they have not been tested. In order to build the
sample program, perform the following steps:

1. Copy all the files from the spssdkio_dllsmpl_cpp directory on the distribution disk
      to a directory on your hard disk.

2. Make sure spssdio.h is on the compiler’s search path - either by copying it to the
     directory containing the sample program or by modifying the INCLUDE environment
     variable.

3. Made sure spssio32.lib (spssio16.lib for a 16 bit build) is on the linker’s search
     path - either by copying the file to the directory containing the sample program or by
     modifying the LIB environment variable.

4. Use the nmake utility to build the application:
    nmake -f dictls32.mak DEBUG=1
   For a 16 bit build, substitute dictls16.mak for dictls32.mak .

Each of the makefiles recognizes two options which can either be set as environment variables
or defined on the command line. The first option is “DEBUG”. If this symbol is defined
(regardless of its value), the resulting executable will contain debug symbols. The default is not
to include debug symbols. The second option is “STATICMFC ”. If this symbol is defined
(regardless of its value), the resulting executable will contain statically-linked Microsoft
Foundation Classes (MFC) and C Run-Time. The default is to use DLL-resident versions of
MFC and the C Run-Time.

The 32 bit makefile writes its intermediate and target files to a subdirectory named “32” while
the 16 bit makefile writes the corresponding files to a subdirectory named “16”. In order to
execute the resulting application, spssio32.dll (spssio16.dll for 16 bit builds) must be
accessible at execution time.

Integrated Development Environment
Most users will opt to use Microsoft’s Integrated Development Environment (IDE) to build and
debug an application. The sample application is amenable to being built in this fashion. Simply
File I/O API - C++ Sample Program


open dictls32.mak by selecting “Open Workspace” from the “File” menu. You will have to
select “Settings” on the “Build” menu to specify the name of the target file, the name of the
required DLL, and the debug build command line.

If you are using the 16 bit IDE, open dictls16.mak via the “Open” item on the “Project”
menu. Here, the name of the target file and the debug build command line are specified via the
“Project” item on the “Options” menu, and the name of the required DLL is specified via the
“Debug” item on the “Options” menu.

Constituent Files
The following files are included as part of the sample program:

    dictafx.cpp              for building precompiled headers
    dictafx.h                includes the headers to be precompiled
    dictdoc.cpp              CDocument class CDictListDoc - does all the work
    dictdoc.h                Interface to class CDictListDoc
    dictdoc.ico              Icon for class CDictListDoc
    dictlist.cpp             CEditView class CDictListEditView and a CWinApp class
    dictlist.h               Interface to classes CDictListEditView and CDictListApp
    dictls16.def             Module definition for 16 bit application
    dictls16.exe             16 bit application built with STATICMFC defined
    dictls16.mak             External makefile for 16 bit application
    dictls16.rc              Resources for 16 bit application
    dictls32.exe             32 bit application built with STATICMFC defined
    dictls32.mak             External makefile for 32 bit application
    dictls32.rc              Resources for 32 bit application
    dictmain.ico             Icon for the application’s MDI frame window
    dict-res.h               Interface to the resources




                                              -2-

More Related Content

PPT
CAiSE 2014 An adapter-based approach for M2T transformations
PDF
Determination about which classes need recompilation Experience Tradition/tut...
DOCX
PDF
Security coding c and c++ ch8(2)
DOCX
c++ report file for theatre management project
DOCX
C++ file
PPT
Getting started with c++
PDF
Data structure and algorithms in c++
CAiSE 2014 An adapter-based approach for M2T transformations
Determination about which classes need recompilation Experience Tradition/tut...
Security coding c and c++ ch8(2)
c++ report file for theatre management project
C++ file
Getting started with c++
Data structure and algorithms in c++

Similar to File i o api c++ sample program (20)

DOC
Smpl cpp
PDF
Visual programming lab
PPTX
Windows programming
PPT
VC++ Fundamentals
PDF
Getting started with_graphics
PPTX
Revers engineering
PDF
Crash dump analysis - experience sharing
PPT
05-LibraryProcedures.pptLibrary Procedures
PPT
Assem -lect-6
PDF
Dmitriy D1g1 Evdokimov - DBI Intro
PDF
CNIT 127 Ch 6: The Wild World of Windows
DOC
Filelist
DOC
Filelist
DOC
Java notes
DOC
Filelist
PDF
Ch 6: The Wild World of Windows
PDF
Qe Reference
PPT
Presentation1
PPT
From gcc to the autotools
Smpl cpp
Visual programming lab
Windows programming
VC++ Fundamentals
Getting started with_graphics
Revers engineering
Crash dump analysis - experience sharing
05-LibraryProcedures.pptLibrary Procedures
Assem -lect-6
Dmitriy D1g1 Evdokimov - DBI Intro
CNIT 127 Ch 6: The Wild World of Windows
Filelist
Filelist
Java notes
Filelist
Ch 6: The Wild World of Windows
Qe Reference
Presentation1
From gcc to the autotools
Ad

More from Prafulla Tekriwal (20)

PDF
E97d402 professionalism
PDF
Brochure admissions 2012
PPT
6d5a24 risks and benefits
PDF
783cf08 buying behaviour
PDF
Parx catalogue aw11
PDF
Agri presentation 7th_sept2009
PDF
8e537 case questions sb
PDF
Cross countries analysis
PPSX
Campus pre-placement talk management trainee - 2012
PPT
864f0culture+and+society
PDF
300 puzzles-%5 bwww.placementpapers.net%5d
PDF
91f7804 sales mgt skills competencies
PPTX
Public relations in indian context
PPT
Parcel management system 1
DOC
Market research case indian paints limited
PPT
Associaion of mutual fund of india
PPT
Ambush marketing
DOCX
E97d402 professionalism
Brochure admissions 2012
6d5a24 risks and benefits
783cf08 buying behaviour
Parx catalogue aw11
Agri presentation 7th_sept2009
8e537 case questions sb
Cross countries analysis
Campus pre-placement talk management trainee - 2012
864f0culture+and+society
300 puzzles-%5 bwww.placementpapers.net%5d
91f7804 sales mgt skills competencies
Public relations in indian context
Parcel management system 1
Market research case indian paints limited
Associaion of mutual fund of india
Ambush marketing
Ad

Recently uploaded (20)

PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Electronic commerce courselecture one. Pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation theory and applications.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Big Data Technologies - Introduction.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
Spectral efficient network and resource selection model in 5G networks
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Electronic commerce courselecture one. Pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
sap open course for s4hana steps from ECC to s4
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation theory and applications.pdf
MYSQL Presentation for SQL database connectivity
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Big Data Technologies - Introduction.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Chapter 3 Spatial Domain Image Processing.pdf
Programs and apps: productivity, graphics, security and other tools
Reach Out and Touch Someone: Haptics and Empathic Computing
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
The AUB Centre for AI in Media Proposal.docx

File i o api c++ sample program

  • 1. File I/O API - C++ Sample Program Overview Dictls32.exe (dictls16.exe in its 16 bit incarnation) is a C++ sample program which utilizes the File I/O API. It is a multiple document interface (MDI) application which displays the dictionary information from SPSS data files in one or more child windows. The user simply selects “Open” from the “File” menu to get a standard Open File dialog. If the selected file is an SPSS data file, its dictionary information is displayed in an edit control in a child window. The application is terminated by selecting “Exit” from the “File” menu. Building The sample program has been built with versions 1.5 (16 bit) and 4.0 (32 bit) of Microsoft Visual C++. Other compilers may work, but they have not been tested. In order to build the sample program, perform the following steps: 1. Copy all the files from the spssdkio_dllsmpl_cpp directory on the distribution disk to a directory on your hard disk. 2. Make sure spssdio.h is on the compiler’s search path - either by copying it to the directory containing the sample program or by modifying the INCLUDE environment variable. 3. Made sure spssio32.lib (spssio16.lib for a 16 bit build) is on the linker’s search path - either by copying the file to the directory containing the sample program or by modifying the LIB environment variable. 4. Use the nmake utility to build the application: nmake -f dictls32.mak DEBUG=1 For a 16 bit build, substitute dictls16.mak for dictls32.mak . Each of the makefiles recognizes two options which can either be set as environment variables or defined on the command line. The first option is “DEBUG”. If this symbol is defined (regardless of its value), the resulting executable will contain debug symbols. The default is not to include debug symbols. The second option is “STATICMFC ”. If this symbol is defined (regardless of its value), the resulting executable will contain statically-linked Microsoft Foundation Classes (MFC) and C Run-Time. The default is to use DLL-resident versions of MFC and the C Run-Time. The 32 bit makefile writes its intermediate and target files to a subdirectory named “32” while the 16 bit makefile writes the corresponding files to a subdirectory named “16”. In order to execute the resulting application, spssio32.dll (spssio16.dll for 16 bit builds) must be accessible at execution time. Integrated Development Environment Most users will opt to use Microsoft’s Integrated Development Environment (IDE) to build and debug an application. The sample application is amenable to being built in this fashion. Simply
  • 2. File I/O API - C++ Sample Program open dictls32.mak by selecting “Open Workspace” from the “File” menu. You will have to select “Settings” on the “Build” menu to specify the name of the target file, the name of the required DLL, and the debug build command line. If you are using the 16 bit IDE, open dictls16.mak via the “Open” item on the “Project” menu. Here, the name of the target file and the debug build command line are specified via the “Project” item on the “Options” menu, and the name of the required DLL is specified via the “Debug” item on the “Options” menu. Constituent Files The following files are included as part of the sample program: dictafx.cpp for building precompiled headers dictafx.h includes the headers to be precompiled dictdoc.cpp CDocument class CDictListDoc - does all the work dictdoc.h Interface to class CDictListDoc dictdoc.ico Icon for class CDictListDoc dictlist.cpp CEditView class CDictListEditView and a CWinApp class dictlist.h Interface to classes CDictListEditView and CDictListApp dictls16.def Module definition for 16 bit application dictls16.exe 16 bit application built with STATICMFC defined dictls16.mak External makefile for 16 bit application dictls16.rc Resources for 16 bit application dictls32.exe 32 bit application built with STATICMFC defined dictls32.mak External makefile for 32 bit application dictls32.rc Resources for 32 bit application dictmain.ico Icon for the application’s MDI frame window dict-res.h Interface to the resources -2-