home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.alaska-software.com
/
2014.06.ftp.alaska-software.com.tar
/
ftp.alaska-software.com
/
acsn
/
History
/
BDVIDEO
/
BDVIDEO.ZIP
/
XPPMM.PRG
< prev
Wrap
Text File
|
2001-04-05
|
4KB
|
112 lines
///////////////////////////////////////////////////////////////////////////////
//
// A C S N
//
// +--------------- Alaska Certified Solutions Network -------------------+
// | |
// | This file is proved and certified by Alaska Software |
// | |
// | No: <Certification number> |
// | |
// | For more information about ACSN read the appropriate announcement |
// | or scan for ACSN in the Alaska Support-LIBs on CompuServe or |
// | at WWW.ALASKA-SOFTWARE.COM |
// | |
// +------------------------------------------------------------------------+
//
// FILE NAME
//
// XPPMM.PRG
//
// AUTHOR
//
// (c) Copyright 1997-2001, Gernot Trautmann
//
// ALL RIGHTS RESERVED
//
// This file is the property of AUTHOR. It participates in the
// Alaska Certified Solutions Network program. Permission to use,
// copy, modify, and distribute this software for any purpose and
// without fee is hereby granted, provided that the above copyright
// notice appear in all copies and that the name of the author or
// Alaska Software not be used in advertising or publicity pertaining
// to distribution of the software without specific, written prior
// permission.
//
// WARRANTY
//
// THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
// AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
// INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
// FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR
// OR ALASKA SOFTWARE BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
// SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
// INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT AND LOSS OF USE.
//
// DESCRIPTION
//
// MCI basic interface using DllCall()
//
// REMARKS
//
// The former XPPMM.DLL is not longer maintained.
//
// HISTORY
//
//
///////////////////////////////////////////////////////////////////////////////
#include "dll.ch"
/* This function sends a command string to a media device
*
* nReturnCode = mmSendString( cCommand, [@cReturnValue] ,
*/
FUNCTION MMSendstring(cCommand, cReturnValue)
LOCAL rc := 0
/* check parameters */
IF Valtype(cCommand) != "C"
RETURN -1
ENDIF
/* tolerate 2nd param type */
IF Valtype(cReturnValue) != "C"
cReturnValue := space(1024)
ENDIF
rc := DllCall("Winmm", DLL_STDCALL + DLL_CALLMODE_COPY, "mciSendStringA",;
cCommand, @cReturnValue, len(cReturnValue), 0)
cReturnValue := Rtrim(cReturnValue)
/* commands and return values are belonging to are all english,
* so no need to worry about code page here
*/
RETURN rc
/* This function fills the caller's buffer with the textual
* description of the given error code returned by the MM
* functions.
*
* cErrDescr <- mmGetErrString(nError)
*/
FUNCTION MMGeterrstring(nError)
LOCAL cErrDescr
LOCAL rc
/* setup a buffer to receive the
* error description
*/
cErrDescr := space(1024)
rc := DllCall("Winmm", DLL_STDCALL, "mciGetErrorStringA", nError,;
@cErrDescr, len(cErrDescr))
IF rc < 1
cErrDescr := "Unknown error code"
ELSE
IF Set(_SET_CHARSET) == CHARSET_OEM
/* error strings are localized and need
* extra transformation
*/
cErrDescr := ConvToAnsiCp(cErrDescr)
ENDIF
ENDIF
RETURN rtrim(cErrDescr)