谁会在VB中调用mpglib.dll
用C++调用的代码是,求高人写出用vb调用的代码
typedef struct {
char c[40000];
} mpstr;
typedef BOOL (*INITMP3) (mpstr *mp);
typedef void (*EXITMP3) (mpstr *mp);
typedef int (*DECODEMP3) (mpstr *mp, char *inmemory, int inmemsize,
char *outmemory, int outmemsize, int *done);
INITMP3 InitMP3;
EXITMP3 ExitMP3;
DECODEMP3 decodeMP3;
#define TEXT_INITMP3 "_InitMP3"
#define TEXT_EXITMP3 "_ExitMP3"
#define TEXT_DECODEMP3 "_decodeMP3"
BOOL WMp3::InitLibrary()
{
// get mpglib.dll interface
_hmpglibdll = LoadLibrary("mpglib.dll");
if (!_hmpglibdll) {
Error("Can't load mpglib.dll");
return FALSE;
}
InitMP3 = (INITMP3) GetProcAddress(_hmpglibdll, TEXT_INITMP3);
ExitMP3 = (EXITMP3) GetProcAddress(_hmpglibdll, TEXT_EXITMP3);
decodeMP3 = (DECODEMP3) GetProcAddress(_hmpglibdll, TEXT_DECODEMP3);
return TRUE;
}
然后使用其中一个函数
InitMP3(&_mp);