Copyright: CreateHelp! {Unregisterd} ® Nic Barnes 1993


Stage Research Custom
Stage Research Custom DLL library

Visual C++, Visual Basic Compatible.

Version 2.0

4/15/94

Stage Research, the company.

Custom libraries

        SR_ABOUT

        SR_API

        SR_DIB

        SR_FILE

        SR_LIST

        SR_MODEM

        SR_PANEL

        SR_REGS

        SR_SOUND

        SR_VBHLP

Please Register


Stage Research, the company.
Stage Research the company.

Stage Research is a development company dedicated in creating

quality products.  This products range from low level system

program to development of Windows applications.  The libraries

included in the development tool kit are just a small example

of the modularity of code that SR develops.

Stage Research is a custom development house that will create

programs for any purpose.  If you have any questions or ideas

that you want developed, please contact us at:

Stage Research

6315 Pearl Rd #301

Parma Hts, OH 44130

USA

76447,3532 on CompuServe

(216) 888-8295


Please Register

This is a SHAREWARE product and is avaible free for evaluation

for the first 30 days.  After the 30 days is over you can either

register this product OR DELETE IT FROM YOUR DRIVE!  Also note

that this is NOT a CRIPPLEWARE version of our libraries, they

are FULLY FUNCTIONING!  Stage Research is taking a chance that

you will not register, but if at a later time we notice that

your making money off our toolkit, you will be charge!  Also if

you intend on using this toolkit, I'm sure you'll want to know

about the updates and additional functions that will be added.

So in a nut shell, PLEASE register if you are using our tools.

Print out the REGISTER.TXT file for information.


SR_ABOUT

 About box for programs.  Will display a dialog box

 on the screen, and will display a fancy BMP in it

 if one is found.

 Author: Carlton Guc

   Date:  2/18/94

 History:

  2/18/94    Initial revision.

               StageAboutBox

  2/20/94    Added function

               StageFancyAboutBox

  4/01/94    Added function

               StageMessageBox


StageAboutBox

Routine that will load and display the about box that

 is located in the DLL.

 Input:

     HINSTANCE           Instance of MAIN program running

     HWND                Window handle calling this proc

 Return:

     int                 NULL

int WINAPI _loadds StageAboutBox (HINSTANCE hMainInstance, HWND hWnd)


StageFancyAboutBox

Routine that will load and display the about box that

 is located in the DLL.

 Input:

     HINSTANCE           Instance of MAIN program running

     HWND                Window handle calling this proc

 Return:

     int                 NULL

int WINAPI _loadds StageFancyAboutBox (HINSTANCE hMainInstance, HWND hWnd)


StageMessageBox

 A direct replacement for Microsoft MessageBox routine.

 Input:

     Same as MessageBox

 Return:

     Same as MessageBox

int WINAPI _loadds StageMessageBox (HWND hParent, LPSTR lpszText, LPSTR lpszTitle, UINT uStyle)


SR_REGS

 Registration DLL to display a register NAG box.  Will display

 information in a dialog box that can be read from files.  Or

 can be located in the parent program.

 Author: Carlton Guc

   Date: 2/24/94

 History:

  2/24/94    Initial revision.

             StageRegister

             StageAnnoy

  4/15/94    Modified functions so they will read data from files

             first if they exist, *.THK, *.DIZ, *.REG


StageRegister

Routine that will load and display the register box that

 is located in the DLL.

 This routine will also determine if these files exits:

     program.THK

     program.DIZ

     program.REG

 and display that text in the three windows in the registration

 box.

 Input:

     HINSTANCE       Instance of program.

     HWND            Window calling this function.

 Return:

     int             NULL

int WINAPI _loadds StageRegister (HINSTANCE hMainInstance, HWND hWnd)


StageAnnoy

Routine that will "annoy" user so they will register.

 The INT passed in will determine how many days need to be left

 with the evaluation before they get annoyed.

 Example:

     StageAnnoy (hInst, hWnd, 20);

     If product has 20 days left then Annoy user.

     StageAnnoy (hInst, hWnd, 0);

     If product is out of eval period, Annoy user.

     This can be placed on every menu item so when

     the user attempts to do something we'll get nasty!

 Input:

     HINSTANCE       Instance of program.

     HWND            Window calling this function.

     WORD            Level of annoy

 Return:

     BOOL            TRUE - user was annoyed.

                     FALSE - user wasn't annoyed.

BOOL WINAPI _loadds StageAnnoy (HINSTANCE hMainInstance, HWND hWnd, WORD wLevel)


SR_API

 Stage Research static library API for common functions.

 Author: Carlton Guc

   Date:  2/18/94

 History:

  2/18/94    Initial revision.

               StageCenterWindow

               StageCreateNameOfINI

               StageRegisterClass

               StageCreateWindow

  3/4/94     Added routine

               DeleteArrayItem


StageCenterWindow

Routine to center the window on the screen.

 Input:

     HWND        Handle of window to center

 Return:

     None

void WINAPI StageCenterWindow (HWND hWnd)


StageCreateNameOfINI

 Routine to create name of INI file to match name of EXE with the

 same directory, just with INI at the end of the file.

     Example:  C:\WINDOWS\TEST.EXE -> C:\WINDOWS\TEST.INI

 Input:

     HINSTANCE       Instance of main program.

     LPSTR           Where to store name

     int             Size of buffer

 Return:

     BOOL            TRUE - Success

                     FALSE - Fail (Name defaults to "STAGE.INI")

BOOL WINAPI StageCreateNameOfINI (HINSTANCE hInstance, LPSTR lpszStore, int iSize)


StageRegisterClass

 Register the Stage Research Standard class for a main window.

 This routine assumes that the APPLICATION ICON = 2001 and the

 menu to display = "MENU_1"

 Input:

     HINSTANCE       Instance of program.

     WNDPROC         Window proc for main window.

 Return:

     None

void WINAPI StageRegisterClass (HINSTANCE hInstance, WNDPROC WndProc)


StageCreateWindow

Create Stage Research standard window.

 Input:

     HINSTANCE       Instance of main window

 Return:

     HWND            Handle of window created.

HWND WINAPI StageCreateWindow (HINSTANCE hInstance)


DeleteArrayItem

 From an array of items, this routine will remove an item, and shift

 the other items making a delete option.

Input:

     LPSTR   Pointer to an array of items.

     WORD    Item number to delete

     WORD    Max number of items in array.

     WORD    Size of each item in array.

Return:

     NONE

 Example:

         CAR

         CAT

         DOG

 DeleteArrayItem (*Array, 1, 3, 3) will delete item #1 (CAT) and shift (DOG)

 down.

         CAR

         DOG

void WINAPI DeleteArrayItem (LPSTR lpArray, WORD wItem, WORD wCount, WORD wSize)


SR_SOUND

 WAVE Play routines to load, play, pause, stop, effect wav files.

 Author: Carlton Guc

   Date:  2/22/94

 History:

 2/22/94     Initial revision.

                 StageWaveDone       **

                 StageWaveStop       **

                 StageWavePause      **

                 StageWavePlay       **

                 StageWaveUnload     **

                 StageWaveLoadEffect **

 3/30/94     Added function

                 StageWavDeviceCaps

 3/31/94     Added function

                 StageWavCaps

 4/02/94     Added functions

                 StageWavLoad        **

                 StageWavPlay        **

                 StageWavDone        **

                 StageWavPause       **

                 StageWavStop        **

                 StageWavUnload      **

 4/10/94     Added functions

                 StageLoadWAVE

                 StageCueWAVE

                 StagePlayWAVE

                 StageStopWAVE

                 StagePauseWAVE

                 StageShowMCIError

             NOTE:  ** These functions only here to support

                       previous verions of SR products.

                       DO NOT USE.


StageWaveDone

This routine needs to be called from the Window that is handling

 the message WOM_WAVE_DONE, or the user needs to call

 StageWaveUnload to free the memory.

 Input:

     WPARAM      wParam

     LPARAM      lParam

 Return:

     None

VOID WINAPI _loadds StageWaveDone (WPARAM wParam, LPARAM lParam)


StageWavePause

Pause the currently playing WAVE file.

 The WAVE file will be stopped but left at the current position

 so the sound can be started up again with StagePlayWave.

 Input:

     None

 Return:

     BOOL        TRUE

BOOL WINAPI _loadds StageWavePause (void)


StageWaveStop

Stop the currently playing WAVE file.

 The WAVE file will be stopped and returned to the beginning of

 the sound.  When StagePlayWave is called again, the wave will

 be at the beginning.

 Input:

     None

 Return:

     BOOL        TRUE

BOOL WINAPI _loadds StageWaveStop (void)


StageWaveUnload

Remove any remaining wave files that are in memory that haven't

 been played.

 Input:

     None

 Return:

     BOOL        TRUE - Wave was removed from memory.

                 FALSE - No Wave to remove.

BOOL WINAPI _loadds StageWaveUnload (void)


StageWavLoad

Load a WAV file into memory and assign a handle to it.

 Input:

     LPSTR       Name of WAV file to load.

     WORD FAR*   Return value.

 Return:

     HANDLE      Handle to loaded WAV file, NULL if none loaded.

     WORD FAR*   Status about loading of WAV

HANDLE WINAPI _loadds StageWavLoad (LPSTR lpWavfile, WORD FAR *wReturn)


StageWavPlay

 Play a WAV effect that was loaded in memory.

 Input:

     HWND    Handle of Window to receive MM_MESSAGES.

     HANDLE  Handle to WAV effect in memory

     UINT    Device to play on (or WAVE_MAPPER for auto selection)

 Return:

     WORD    NULL - Played successful

             Error Return.

WORD WINAPI _loadds StageWavPlay (HWND hWnd, HANDLE hStageWav, UINT uDevice)


StageWavPause

Pause the currently playing WAVE file.

 The WAVE file will be stopped but left at the current position

 so the sound can be started up again with StagePlayWave.

 Input:

     HANDLE      Handle to loaded wav file

 Return:

     BOOL        TRUE - Success

                 FALSE - Failed

BOOL WINAPI _loadds StageWavPause (HANDLE hStageWav)


StageWavStop

Stop the currently playing WAVE file.

 The WAVE file will be stopped and returned to the beginning of

 the sound.  When StagePlayWave is called again, the wave will

 be at the beginning.

 Input:

     HANDLE      Handle of loaded wav file

 Return:

     BOOL        TRUE - Success

                 FALSE - Failed

BOOL WINAPI _loadds StageWavStop (HANDLE hStageWav)


StageWavUnload

 Unload this wav file from memory.

 Input:

     HANDLE      Handle to wav file loaded in memory, do NOT use after this call.

 Return:

     BOOL        TRUE - Wave was removed from memory.

                 FALSE - No Wave to remove.

BOOL WINAPI _loadds StageWavUnload (HANDLE FAR *hStageWav)


StageWavDone

 Called when the WAV file has stopped playing.  This function

 will release the wav device driver for other wavs to be played.

 This routine needs to be called from the Window that is handling

 the message WOM_WAVE_DONE, or the user needs to call

 StageWaveUnload to free the memory.

 Input:

     WPARAM      wParam (HWAVEOUT)

     LPARAM      lParam (LPWAVEHDR)

 Return:

     BOOL        TRUE - Normal stopped.

                 FALSE - Stopped/paused premature

BOOL WINAPI _loadds StageWavDone (WPARAM wParam, LPARAM lParam)


StageWaveLoadEffect

Load a WAVE file and prepare it to be played.  This routine will NOT

 play the WAVE file, just get it ready.  Effects can be added to the

 effect by the flags passed in as wEffect.

 Input:

     HWND    hwndApp - Handle of Window to receive messages from wave player.

               (WOM_OPEN, WOM_CLOSE, WOM_DONE)

     LPSTR   lpszFilename - name of WAVE file to play.

     WORD    wEffect - Effects to add to Wave file

               WAVE_EFFECT_REVERSE

 Return:

     UINT    NULL - Loaded fine.

             Error - ERROR_WAVE_NO_FILE

                     ERROR_WAVE_NOT_WAVE

                     ERROR_WAVE_CORRUPTED

                     ERROR_WAVE_MEMORY

                     ERROR_WAVE_READING

                     ERROR_WAVE_NOT_PCM

                     ERROR_WAVE_NOT_SUPPORTED

                     ERROR_WAVE_NO_DATA

                     ERROR_WAVE_NO_OUTPUT

                     ERROR_WAVE_PREPARE_HEADER

UINT WINAPI _loadds StageWaveLoadEffect(HWND hwndApp, LPSTR lpszFilename, WORD wEffect)


StageWavePlay

Play a WAVE file that was previously loaded from StageWaveLoadEffect

 Input:

     None

 Return:

     UINT    NULL - Successful

             ERROR - MMSYSERR_INVALHANDLE

                     WAVERR_UNPREPARED

UINT WINAPI _loadds StageWavePlay (void)


StageWavCaps

 Display the caps of this WAVE file in a dialog box.

Input:

     HWND    Parent window.

     LPSTR   File name of WAVE file (Full path)

Return:

     BOOL

BOOL WINAPI _loadds StageWavCaps (HWND hWnd, LPSTR lpWaveFile)


StageWavDeviceCaps

 Display caps of the device player on this computer in a dialog box.

 Input:

     HWND        Handle of parent

 Return:

     BOOL

BOOL WINAPI _loadds StageWavDeviceCaps (HWND hWnd)


StageLoadWAVE

 Load a WAVE file into the MCI player.

Input:

     HWND        Handle of parent window to notify.

     LPSTR       Name of file (Full path)

Return:

     NULL        Loaded ok.

                 MCI Error.

DWORD WINAPI _loadds StageLoadWAVE (HWND hWndNotify, LPSTR lpszWAVEFileName)


StageCueWAVE

 Cue a previously loaded WAVE file so it will play ASAP.

 Input:

     VOID

 Return:

     DWORD       NULL - Ok.

                 MCI Error.

DWORD WINAPI _loadds StageCueWAVE (void)


StagePlayWAVE

     Play a previously loaded WAVE file using MCI.

 Input:

     VOID

 Return:

     DWORD   NULL - Ok.

             MCI Error.

DWORD WINAPI _loadds StagePlayWAVE (void)


StageStopWAVE

 Stops a currently playing WAVE file using MCI, seeks back to beginning.

 Input:

     VOID

 Return:

     DWORD       NULL - Ok.

                 MCI Error

DWORD WINAPI _loadds StageStopWAVE (void)


StagePauseWAVE

 Pauses a currently playing WAVE file using MCI.

 Input:

     VOID

 Return:

     DWORD       NULL - Ok.

                 MCI Error.

DWORD WINAPI _loadds StagePauseWAVE (void)


StageShowMCIError

     Displays an MCI error (returned from an MCI call) in an

     error box.

 Input:

     DWORD       MCI Error.

 Return:

     VOID

void WINAPI _loadds StageShowMCIError (DWORD dwError)


SR_FILE

This module contains varies routines for opening, reading, and writing to

files.

 Author: Brad Rembielak

   Date: 11/11/93

 Author: Carlton Guc

   Date:  2/18/94

 History:

 11/11/93    Initial revision.

  2/18/94    Converted to a DLL.

  2/18/94    Added functions

                 StageFileWriteEdit

                 StageFileInitialize

                 StageFileOpenDlg

                 StageFileSaveDlg

                 StageFileLength

                 StageFileReadEdit

                 StageFileSetAlteredState

                 StageFileCommandLine

                 StageFileWriteRecord

                 StageFileReadRecord

                 StageFileClose

                 StageFileOpenWrite

                 StageFileOpenRead

 02/18/94    Added functions

                 StageMakeTitleAltered

                 StageMakeTitleNotAltered

                 StageFileSetDateTime

                 StageSetDiskLabel

                 StageGetDiskLabel

                 StageCopyFile

                 StageCalculateDirectorySize

                 StageFileGetDateTime

 04/06/94    Added functions to allow for multiple open dlg's

                 StageStartFileOpen

                 StageEndFileOpen

                 StageGetOpenFileName

                 StageGetSaveFileName


StageAskAboutSave

Routine to call when we are about to leave a edit window

 Input:

     HWND        Handle of edit window.

     LPSTR       Pointer to filename

 Return:

     int         0 - No change made to file, no need to save.

                 1 - Change made to file and user saved it.

                 2 - Change made to file and ERROR during save.

                 3 - Change made to file and file NOT saved.

                 4 - Change made to file and user said NO to save.

                 5 - Change made to file and user said CANCEL to save.

int WINAPI _loadds StageAskAboutSave (HWND hwnd, LPSTR lpFilename)


StageFileCommandLine

If the command line contains a filename it will be stored in

 the filename memory location.

 Input:

     LPSTR           Pointer to where to place filename

     LPSTR           Pointer to commandline.

 Output:

     BOOL            TRUE - Filename found.

                     FALSE - No filename found.

BOOL WINAPI _loadds StageFileCommandLine(LPSTR lpFilename, LPSTR lpCommandLine)


StageFileInitialize

Initialize the structure for file open.

 Input:

     HWND            Handle of parent window.

     LPSTR           Where to place filename (minimum 128 characters)

     LPSTR           Filter for filter box.

     LPSTR           Default extension.

 Return:

     None

Format for Filter and Default:

 static LPSTR lpFilter = "Text Files (*.TXT)\0*.txt\0All Files (*.*)\0*.*\0\0";

 static LPSTR lpDefault = "txt";

void WINAPI _loadds StageFileInitialize (HWND hwnd, LPSTR lpFilename, LPSTR lpFilter, LPSTR lpDefault)


StageStartFileOpen

Start the Stage File open routines.

 Input:

     HWND        Handle of parent window.

     LPSTR       Where to place filename (minimum 128 characters)

     LPSTR       Filter for filter box.

     LPSTR       Default extension.

 Return:

     HANDLE      Handle of an OPENFILENAME structure

                 NULL if error

Format for Filter and Default:

 static LPSTR lpFilter = "Text Files (*.TXT)\0*.txt\0All Files (*.*)\0*.*\0\0";

 static LPSTR lpDefault = "txt";

HANDLE WINAPI _loadds StageStartFileOpen (HWND hwnd, LPSTR lpFilename, LPSTR lpFilter, LPSTR lpDefault)


StageEndFileOpen

 End the file open routines.

 Input:

     HANDLE      Handle of started FileOpen routine.

 Return:

     BOOL        TRUE - Success.

                 FALSE - Failed.

BOOL WINAPI _loadds StageEndFileOpen (HANDLE hOpenFileName)


StageGetOpenFileName

Display the default open dialog box (Windows)

 Input:

     HANDLE      Handle of started OpenFile

     HWND        Handle to parent window.

     LPSTR       Where to place filename (Minimum size 128 bytes)

     WORD        Type of additional buttons (if any)

                     SHOW_PLAY (To play WAVE files)

 Return:

     BOOL        TRUE - Success

                 FALSE - Fail

BOOL WINAPI _loadds StageGetOpenFileName (HANDLE hOpenFileName, HWND hWnd, LPSTR lpstrFileName, WORD wType)


StageGetSaveFileName

Display the default save dialog box (Windows)

 Input:

     HANDLE      Handle of started OpenFile

     HWND        Handle to parent window.

     LPSTR       Where to place filename (Minimum size 128 bytes)

 Return:

     BOOL        TRUE - Success

                 FALSE - Fail

BOOL WINAPI _loadds StageGetSaveFileName (HANDLE hOpenFileName, HWND hWnd, LPSTR lpstrFileName)


StageFileOpenDlg

Display the default open dialog box (Windows)

 Input:

     HWND        Handle to parent window.

     LPSTR       Where to place filename (Minimum size 128 bytes)

 Return:

     BOOL        TRUE - Success

                 FALSE - Fail

BOOL WINAPI _loadds StageFileOpenDlg (HWND hwnd, LPSTR lpstrFileName)


StageFileSaveDlg

Display the default save dialog box (Windows)

 Input:

     HWND        Handle to parent window.

     LPSTR       Where to place filename (Minimum size 128 bytes)

 Return:

     BOOL        TRUE - Success

                 FALSE - Fail

BOOL WINAPI _loadds StageFileSaveDlg (HWND hwnd, LPSTR lpstrFileName)


StageFileLength
StageFileLengthReturn length of a file.

 Input:

     int         File handle - from _lopen.

 Return:

     LONG        Length of file.

long WINAPI _loadds StageFileLength (int hFile)


StageFileOpenRead

Open a existing file for reading from.

 Input:

     LPSTR       Pointer to filename

 Return:

     int         -1 - Error in opening file.

                 Handle of file that was opened.

int WINAPI _loadds StageFileOpenRead (LPSTR lpFilename)


StageFileOpenWrite

Open a file for write or create a new one.

 Input:

     LPSTR       Pointer to filename

 Return:

     int         -1 - Error in opening file.

                 Handle of file that was opened.

int WINAPI _loadds StageFileOpenWrite (LPSTR lpFilename)


StageFileClose

Close a handle that was opened

 Input:

     int         Handle to close

 Return:

     None

void WINAPI _loadds StageFileClose (int hFile)


StageFileReadRecord

Read a record from the file.

 Input:

     int         Handle of opened file.

     WORD        Record number to read. (0 based)

     WORD        Size of each record.

     LPSTR       Where to store read record.

 Return:

     BOOL        TRUE - Record read.

                 FALSE - Record not found.

BOOL WINAPI _loadds StageFileReadRecord (int hFile, WORD wRecord, WORD wSize, LPSTR lpStore)


StageFileWriteRecord

Write a record to a file.

 Input:

     int         Handle of opened file.

     WORD        Record number to write. (0 based)

     WORD        Size of each record.

     LPSTR       Pointer to record to store

 Return:

     BOOL        TRUE - Record wrote.

                 FALSE - Record not written.

BOOL WINAPI _loadds StageFileWriteRecord (int hFile, WORD wRecord, WORD wSize, LPSTR lpStore)


StageFileReadEdit

Read a file and place into an edit window.

 Input:

     HWND        Handle of edit window to receive file.

     HWND        Handle of edit window to receive filename. (NULL if none.)

     LPSTR       Pointer to filename to read.

 Return:

     BOOL        TRUE - Success.

                 FALSE - Fail.

BOOL WINAPI _loadds StageFileReadEdit (HWND hwndEdit, HWND hDisplay, LPSTR lpstrFileName)


StageFileWriteEdit

 From an edit window, write the entire file.

 Input:

     HWND        Handle of edit window.

     LPSTR       Filename to write to (or overwrite).

 Output:

     BOOL        TRUE - Success

                 FALSE - Fail

BOOL WINAPI _loadds StageFileWriteEdit (HWND hwndEdit, LPSTR lpstrFileName)


StageFileSetAlteredState

 If the text for an edit window gets altered, set the title to include

 a '*' at then end of it.  This function is best used in the WM_PAINT

 message or possible a timer.  Or can be called when it is known that

 the file is altered.  Since the edit window can determine if it is

 altered or not, this function is automatic.

 Input:

     HWND        Handle of edit window.

 Output:

     BOOL        TRUE - Has changed.

                 FALSE - Not changed.

BOOL WINAPI _loadds StageFileSetAlteredState (HWND hWnd)


StageFileGetDateTime

Get date and time of a file.

 Input:

     LPSTR   Name of file to get

     LPSTR   Where to store date in format MM/DD/YY

     LPSTR   Where to store time in format HH:MM:SS

 Return:

     BOOL    TRUE - Date/Time gotten

             FALSE - Error

BOOL WINAPI _loadds StageFileGetDateTime (LPSTR lpFilename, LPSTR lpDate, LPSTR lpTime)


StageFileSetDateTime

 Set date and time of a file.

 Input:

     LPSTR   Name of file to set

     LPSTR   Date in format MM/DD/YY

     LPSTR   Time in format HH:MM:SS

 Return:

     BOOL    TRUE - Date/Time set.

             FALSE - Date/Time not set.

BOOL WINAPI _loadds StageFileSetDateTime (LPSTR lpFilename, LPSTR lpDate, LPSTR lpTime)


StageSetDiskLabel

 Set the label on a disk.

Input:

     LPSTR   Pointer to path that is in the format:

             A:\\PATH\FILE.TXT

             The drive letter will be extracted and used

             as the drive to create the label on.

     LPSTR   Pointer to new disk label.

             Label must be no more than 11 characters long

             and in the form LABEL000000 WITHOUT A DOT.

             The name will be altered to have a dot and

             created automatically.

             ** NOTE:  If the pointer is NULL then the label

                       will be removed from the drive.

Return:

     BOOL    TRUE - Successful.

             FALSE - Failed.

BOOL WINAPI _loadds StageSetDiskLabel (LPSTR lpDrive, LPSTR lpLabel)


StageGetDiskLabel

 Return the label of a drive in lpDrive.

 Input:

     LPSTR   Pointer to a path that has the form:

             A:\\PATH\\FILENAME.  The drive will

             be extracted and used.

     LPSTR   Pointer to where to store path, must be

             12 characters in length (or more).

             The label will be returned as 11 characters

             in a row, WITHOUT the dot.

 Return:

     BOOL    TRUE - Success.

             FALSE - Failed.

BOOL WINAPI _loadds StageGetDiskLabel (LPSTR lpDrive, LPSTR lpStorage)


StageMakeTitleAltered

 Place an * at the end of the windows title to mark it as altered.

 This will place the * there even if the Window has not edit box.

 This function is different thatn StageMakeTextAltered

Input:

     HWND    Handle of window to alter title on.

Return:

     BOOL    TRUE - Success.

             FALSE - Failed.

BOOL WINAPI _loadds StageMakeTitleAltered (HWND hWnd)


StageMakeTitleNotAltered

 Removes the * from the end of the windows title to mark it as not altered.

 This will remove the * there even if the Window has not edit box.

 This function is different thatn StageMakeTextAltered

Input:

     HWND    Handle of window to alter title on.

Return:

     BOOL    TRUE - Success.

             FALSE - Failed.

BOOL WINAPI _loadds StageMakeTitleNotAltered (HWND hWnd)


StageCopyFile

 Copy a file from a source name to a destination name.

 Directories must exit.

Input:

     LPSTR   Input name

     LPSTR   Output name

Return:

     BOOL    TRUE - Success.

             FALSE - Failed.

BOOL WINAPI _loadds StageCopyFile (LPSTR lpFrom, LPSTR lpTo)


StageCopyExpand

 Copy and expand a file from a source to a destination.

 If the file is in compressed form it will be expanded.

 Directory of destination must exist.

 Input:

     LPSTR   Pointer to source.

     LPSTR   Pointer to destination.

 Return:

     BOOL    TRUE - Success.

             FALSE - Failed.

BOOL WINAPI _loadds StageCopyExpand (LPSTR lpFrom, LPSTR lpTo)


StageCalculateDirectorySize

 Return the size of all the files in a specific directory.

 This routine only looks as _A_NORMAL files.

Input:

     LPSTR   Pointer to directory to get files in, with

             file names (*.*), etc.

Return:

     DWORD   Size of all files in this directory in bytes.

DWORD WINAPI _loadds StageCalculateDirectorySize (LPSTR lpszDirectory)


SR_DIB

 StageFancyIntro, a function that will display a fancy intro.

 Will either load a BMP (DIB) from disk and display in a startup

 box, or play a FLI file in the same startup box using

 the AutoDesk animator DLL.  (Must be on system already.)

 Author: Carlton Guc

   Date:  2/23/94

 History:

  2/23/94    Initial revision.

               StageFancyIntro


StageFancyIntro

Play a FLC file or display a BMP in a startup window.

 Input:

     HINSTANCE   Instance of main program.

     WORD        Type of image to display.

                 1 = BMP file.

                 2 = FLC file.

     WORD        Number of seconds to delay

 Output:

     BOOL        TRUE

BOOL WINAPI _loadds StageFancyIntro (HINSTANCE hInstance, WORD wFlag, WORD wSeconds)


SR_MODEM

 Modem control for Stage products.

 Author: Carlton Guc

   Date: 2/20/94

 History:

 2/20/94     Initial revision.

                 StageCheckvMail

                 StageSendPage

                 StageSendPagePin

 3/13/94     Shareware version created.

 4/15/94     Shareware version removed.

             Fixed bug with Hayes Modems.

             Made changes to make code more compact

 Future:

             Add code to allow for changes to internal variables.

             Add code to create a "window" so this can happen in the background.


StageCheckvMail

 Test the dial tone for a stutter.  If we find a stutter (or no dial tone) we

 assume that there is voice mail.

 Input:

         LPSTR       Phone number of voice mail, used only to have

                     a number to dial.

         int         Comm port that modem is on (1,2)

         WORD FAR *  Where to store return value

 Return:

         FALSE       Error value.

                     1, Can't open com port

                     2, Can't build DCB for communication.

                     3, Can't set DCB

                     4, Timed out on modem

         TRUE        Success.

                     0, No voice mail found.

                     1, Voice mail found.

BOOL WINAPI _export StageCheckvMail (LPSTR lpszPhoneNumber, int wComPort, WORD FAR *wReturn)


StageSendPage

 Dial a pager server and send a pager message.  Message is numeric only.

 Input:

         LPSTR       Phone number of pager service

         LPSTR       Pager message

         int         Comm port that modem is on (1,2)

         WORD FAR *  Where to store return value

 Return:

         FALSE       Error value.

                     1, Can't open com port

                     2, Can't build DCB for communication.

                     3, Can't set DCB

                     4, Timed out on modem

         TRUE        Success.

                     0, Page not sent, busy or no answer.

                     1, Page sent.

BOOL WINAPI _export StageSendPage (LPSTR lpszPhoneNumber, LPSTR lpszPageMessage, int wComPort, WORD FAR *wReturn)


StageSendPagePin

 Dial a pager server and send a pager message.  Message is numeric only.

 This will use a PIN number to attach to the correct pager.

 Input:

         LPSTR       Phone number of pager service

         LPSTR       Pager PIN number

         LPSTR       Pager message

         int         Comm port that modem is on (1,2)

         WORD FAR *  Where to store return value

 Return:

         FALSE       Error value.

                     1, Can't open com port

                     2, Can't build DCB for communication.

                     3, Can't set DCB

                     4, Timed out on modem

         TRUE        Success.

                     0, Page not sent, busy or no answer.

                     1, Page sent.

BOOL WINAPI _export StageSendPagePin (LPSTR lpszPhoneNumber, LPSTR lpszPIN, LPSTR lpszPageMessage, int wComPort, WORD FAR *wReturn)


SR_VBHLP

 Helper routines for Visual Basic

 Author: Carlton Guc

   Date: 3/11/94

 History:

 3/11/94    Initial revision.

             HelpVB_ReturnFarPointer

             HelpVB_ReturnNearPointer

             HelpVB_CreateFarPointer

             HelpVB_GetSystemBitmapBarDC


HelpVB_ReturnFarPointer

 Return a far pointer that is pointed to by the input pointer.

 Input:

     VOID FAR *  Where we want to go to get the far pointer to return.

 Return:

     LONG        The value (DWORD) at the address passed in.

LONG WINAPI _loadds HelpVB_ReturnFarPointer (LPLONG lpPoint)


HelpVB_ReturnNearPointer

 Return a near pointer that is pointed to by the input pointer.

 Input:

     VOID FAR *  Where we want to go to get the near pointer to return.

 Return:

     WORD        The value (WORD) at the address passed in.

WORD WINAPI _loadds HelpVB_ReturnNearPointer (LPWORD lpPoint)


HelpVB_CreateFarPointer

 Given the segment and offset, create a far pointer.

 Input:

     WORD    Segment

     WORD    Offset

 Return:

     VOID FAR *  Far Pointer

void FAR * WINAPI _loadds HelpVB_CreateFarPointer (WORD wSegment, WORD wOffset)


HelpVB_GetSystemBitmapBarDC

 Return the DC of the system bitmap bar.

 Input:

     None

 Return:

     HDC     hDC to bitmap bar in USER segment

HDC WINAPI _loadds HelpVB_GetSystemBitmapBarDC(void)


SR_PANEL

 Stage Research Control Panel DLL.

 Author: Carlton Guc

   Date: 3/4/94

 History:

 3/4/94      Initial revision.

             Routines:

                 StagePanel

 4/5/94      Added routines

                 StageLoadPanelArray

             Added function to StagePanel to allow for security levels.

             Added load function and changed StagePanel to take a handle.

Future:

     - Modify StagePanel to create an allocated block of memory so

       when StagePanel is called from two different programs, they

       won't get their data confused.

     - Add StageLoadPanelDLL to load a panel that is located in

       another DLL.

     - Add StageLoadPanels to load a series of panels from many DLLs

     - Modify StageLoadPanelArray to accept a handle to an array

       so we can append the Panel

     - Maybe add functions to shift the control panel around.


StageLoadPanelArray

Load an array into the panel manager

 Input:

     LPPANEL     An array of panels

 Return:

     HANDLE      Handle where they were loaded.

                 NULL - Error loading panel

Example for input array:  (Notice nulls for last element)

 PANEL   ArrayPanels[] = {

       Dialog box       Icon            String          Procedure

       {TRUE, IDD_NAME,          IDI_NAME,       IDS_NAME,       0,(FARPROC)NameProc, 0},

       {TRUE, IDD_PHONE,         IDI_PHONE,      IDS_PHONE,      0,(FARPROC)PhoneProc, 0},

       {0,0,0} };

HANDLE WINAPI _loadds StageLoadPanelArray (LPPANEL lpArrayPanel)


StagePanel

Process a array of dialog boxes and place them in a "PANEL"

 Input:

     HWND        Parent of panel

     HANDLE      Handle to ArrayPanels

     UINT        Security level to display

 Return:

     int         Return from the dialog box (EndDialog)

int WINAPI _loadds StagePanel (HWND hWnd, HANDLE hArrayPanels, UINT uSecurity)


SR_LIST

 Linked list manager for databases.

 Author:  Carlton Guc

   Date:  4/5/94

History:

 4/5/94      Functions created.

                 StageStartLinkedList

                 StageStopLinkedList

                 StageAddLinkedListElement

                 StageInsertLinkedListElement

                 StageDeleteLinkedListElement

                 StageReplaceLinkedListElement

                 StageGetLinkedListElement

                 StageReleaseLinkedListElement

                 StageWriteLinkedListToFile

                 StageReadLinkedListFromFile


StageStartLinkedList

 Start the linked list manager for this database.

 Input:

     WORD        Size of element.

     LPSTR       Name of this database

     WORD        Version of database

 Return:

     HANDLE      Handle to started database

                 NULL if error

HANDLE WINAPI _loadds StageStartLinkedList (WORD wSize, LPSTR lpszTitle, WORD wVersion)


StageStopLinkedList

 Stop the linked list manager for this database.

 Input:

     HANDLE      Handle of Started Database

 Return:

     BOOL        TRUE - Success.

                 FALSE - Failure.

BOOL WINAPI _loadds StageStopLinkedList (HANDLE hHandle)


StageRestartLinkedList

 Clears the current database from memory and returns a new handle

Input:

     HANDLE      Handle of database

Return:

     BOOL        TRUE - Success.

                 FALSE - Failed.

BOOL WINAPI _loadds StageRestartLinkedList (HANDLE hHandle)


StageGetLinkedListCount

 Return the current number of elements in this database

 Input:

     HANDLE      Handle of database

 Return:

     WORD        Number of elements in database

                 -1 = Error

WORD WINAPI _loadds StageGetLinkedListCount (HANDLE hHandle)


StageAddLinkedListElement

 Add an element to the linked list manager.

 Input:

     HANDLE      Handle of started database.

     LPVOID      Pointer to element to add.

 Return:

     WORD        Item number where added.

                 NULL if error.

WORD WINAPI _loadds StageAddLinkedListElement (HANDLE hHandle, void FAR *lpVoid)


StageInsertLinkedListElement

 Insert a linked list item before this numbered element.

 Input:

     HANDLE      Handle of started database. (BASE 1)

     LPVOID      Element to add.

     WORD        Number of element to add before.

 Return:

     WORD        Item number where inserted.

                 NULL if error

WORD WINAPI _loadds StageInsertLinkedListElement (HANDLE hHandle, void FAR *lpVoid, WORD wElement)


StageDeleteLinkedListElement

 Delete an linked list item from the database.

 Input:

     HANDLE      Handle of started database.

     WORD        Number of element to delete.

 Return:

     BOOL        TRUE - Success.

                 FALSE - Failed

BOOL WINAPI _loadds StageDeleteLinkedListElement (HANDLE hHandle, WORD wElement)


StageReplaceLinkedListElement

 Replace an existing linked list element in database

 Input:

     HANDLE      Handle of started database.

     LPVOID      Pointer to element that will replace the wElement

     WORD        Element number to replace.

 Return:

     BOOL        TRUE - Success.

                 FALSE - Failed.

BOOL WINAPI _loadds StageReplaceLinkedListElement (HANDLE hHandle, void FAR *lpVoid, WORD wElement)


StageGetLinkedListElement

 Retrieve a pointer to an element in the linked list database.

 Input:

     HANDLE      Handle of started database.

     WORD        Element number to retrieve. (BASE 1)

 Return:

     LPVOID      Pointer to element in database.

                 NULL element not found.

void FAR * WINAPI _loadds StageGetLinkedListElement (HANDLE hHandle, WORD wElement)


StageReleaseLinkedListElement

 Free a previously gotten linked list element.

 Input:

     HANDLE      Handle of started database.

     WORD        Element number to release.

 Return:

     BOOL        TRUE - Success.

                 FALSE - Failed.

BOOL WINAPI _loadds StageReleaseLinkedListElement (HANDLE hHandle, WORD wElement)


StageWriteLinkedListToFile

 Write the current linked list that is in memory to a datafile.

 Input:

     HANDLE      Handle of started database

     LPSTR       Filename to write to.

 Return:

     BOOL        TRUE - Success.

                 FALSE - Failed.

BOOL WINAPI _loadds StageWriteLinkedListToFile (HANDLE hHandle, LPSTR lpFilename)


StageReadLinkedListFromFile

 Read a linked list from a file and fill in the started database

 Input:

     HANDLE      Handle of started database.

     LPSTR       Filename to read from.

 Return:

     BOOL        TRUE - Success.

                 FALSE - Failed.

BOOL WINAPI _loadds StageReadLinkedListFromFile (HANDLE hHandle, LPSTR lpFilename)