云
云雾
Unregistered / Unconfirmed
GUEST, unregistred user!
Borland C++ Builder里面的函数是这样写的
extern "C" __declspec(dllexport) __stdcall bool PlaySongFile(String SongFile,int Volume,int TrackIndex,int FileType)
{
try
{
DllMyForm->MediaPlayer1->FileName=SongFile.c_str();
DllMyForm->TrackBarVol->Position=Volume;
DllMyForm->FileFormat=FileType;
DllMyForm->TeditTrack->Text=TrackIndex;
DllMyForm->BitPlayFile->Click();
return true;
}
__finally
{
return false;
}
}
在Borland C++ Builder 里面调用正常,DELPHI里面调用不正常
delphi里面的声明
function PlaySongFile(SongFile :String ;Volume,TrackIndex, FileType:smallint ):Boolean;
stdcall;
external 'mcidll.DLL' name 'PlaySongFile';
extern "C" __declspec(dllexport) __stdcall bool PlaySongFile(String SongFile,int Volume,int TrackIndex,int FileType)
{
try
{
DllMyForm->MediaPlayer1->FileName=SongFile.c_str();
DllMyForm->TrackBarVol->Position=Volume;
DllMyForm->FileFormat=FileType;
DllMyForm->TeditTrack->Text=TrackIndex;
DllMyForm->BitPlayFile->Click();
return true;
}
__finally
{
return false;
}
}
在Borland C++ Builder 里面调用正常,DELPHI里面调用不正常
delphi里面的声明
function PlaySongFile(SongFile :String ;Volume,TrackIndex, FileType:smallint ):Boolean;
stdcall;
external 'mcidll.DLL' name 'PlaySongFile';