delphi中
function GetVolume(byte DN): Integer;
stdcall;
procedure SetVolume(byte DN,int Value);stdcall;
function bool GetVolumeMute(byte DN): boolean;stdcall;
procedure SetVolumeMute(byte DN,bool Value);stdcall;
//===============================
// c++builder中先将Dll编译成obj,再在bcb中输入obj,之后就如下
public: // User declarations
aTest *aT1;
AnsiString Directory;
__fastcall TRichView(TComponent* Owner);
void __fastcall ReadRegInfo(void);
void __fastcall WriteRegInfo(void);
};
//---------------------------------------------------------------------------
extern PACKAGE TRichView *RichView;
extern "C"
__declspec(dllimport) __stdcall int GetVolume(byte DN);
extern "C"
__declspec(dllimport) __stdcall void SetVolume(byte DN,int Value);
extern "C"
__declspec(dllimport) __stdcall bool GetVolumeMute(byte DN);
extern "C"
__declspec(dllimport) __stdcall void SetVolumeMute(byte DN,bool Value);
//---------------------------------------------------------------------------
#endif