墙
墙头草
Unregistered / Unconfirmed
GUEST, unregistred user!
/****以下是AudioDll.def*************/
LIBRARY "AudioDll"
DESCRIPTION 'AudioDll Windows Dynamic Link Library'
EXPORTS
_OPEN @1 PRIVATE
/***以下是AudioDllApp.h*************/
#include "resource.h" // main symbols
class CAudioDllApp : public CWinApp
{
public:
CAudioDllApp();
DECLARE_MESSAGE_MAP()
};
/**以下是AudioDllApp.cpp*************/
#include "stdafx.h"
#include "AudioDll.h"
#include "mmsystem.h"
#include "digitalv.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
BEGIN_MESSAGE_MAP(CAudioDllApp, CWinApp)
END_MESSAGE_MAP()
CAudioDllApp::CAudioDllApp()
{
}
CAudioDllApp theApp;
MCI_OPEN_PARMS parms;
int _OPEN()
{
MCI_PLAY_PARMS play_parms;
MCI_SEEK_PARMS seek_parms;
parms.lpstrDeviceType="waveaudio";
parms.lpstrElementName="e://W.wav";
MCIDEVICEID deviceID;
mciSendCommand(NULL,MCI_OPEN,MCI_OPEN_TYPE|MCI_OPEN_ELEMENT,(DWORD)&parms);
deviceID=parms.wDeviceID;
play_parms.dwFrom=10;
play_parms.dwTo=15;
seek_parms.dwTo=0;
mciSendCommand(parms.wDeviceID,MCI_SEEK,MCI_TO,(DWORD)&seek_parms);
mciSendCommand(parms.wDeviceID,MCI_PLAY,MCI_DGV_PLAY_REPEAT,(DWORD)&play_parms);
return 1;
}
LIBRARY "AudioDll"
DESCRIPTION 'AudioDll Windows Dynamic Link Library'
EXPORTS
_OPEN @1 PRIVATE
/***以下是AudioDllApp.h*************/
#include "resource.h" // main symbols
class CAudioDllApp : public CWinApp
{
public:
CAudioDllApp();
DECLARE_MESSAGE_MAP()
};
/**以下是AudioDllApp.cpp*************/
#include "stdafx.h"
#include "AudioDll.h"
#include "mmsystem.h"
#include "digitalv.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
BEGIN_MESSAGE_MAP(CAudioDllApp, CWinApp)
END_MESSAGE_MAP()
CAudioDllApp::CAudioDllApp()
{
}
CAudioDllApp theApp;
MCI_OPEN_PARMS parms;
int _OPEN()
{
MCI_PLAY_PARMS play_parms;
MCI_SEEK_PARMS seek_parms;
parms.lpstrDeviceType="waveaudio";
parms.lpstrElementName="e://W.wav";
MCIDEVICEID deviceID;
mciSendCommand(NULL,MCI_OPEN,MCI_OPEN_TYPE|MCI_OPEN_ELEMENT,(DWORD)&parms);
deviceID=parms.wDeviceID;
play_parms.dwFrom=10;
play_parms.dwTo=15;
seek_parms.dwTo=0;
mciSendCommand(parms.wDeviceID,MCI_SEEK,MCI_TO,(DWORD)&seek_parms);
mciSendCommand(parms.wDeviceID,MCI_PLAY,MCI_DGV_PLAY_REPEAT,(DWORD)&play_parms);
return 1;
}