Skip to main content

Problem:

Returning a short filename from a long file name under COBOL using the Win32 APIs

Resolution:

SOURCE FILES:

=========

Program Files      Description

-----------------     -----------------------------------------------------------

Longname.cbl      The program makes a winapi call to create a short filename

Resource files:

----------------     ----------------------------------------------------------

Makes a call cob32api before winapi calls.

REQUIREMENTS:

==========

OPERATION:

========

Before using the demo... Create a "Long filename" on disk called "My filename" - use:   

echo "Hello" >"My filename"

The program makes a winapi call to get a short pathname  Program then checks status code for success or error.

     

NOTE:

====

Set the case compiler directive for the winapi calls (case sensitive)

==========================================================

Keywords: demonstration, sample, example, demo, win32 api, longname.zip

demo.ex

demo.ne

Attachments:

longname.zip

Old KB# 4181