Installation Inno安装程序Bass.dll错误

Installation Inno安装程序Bass.dll错误,installation,bass.dll,Installation,Bass.dll,我使用一个代码进行安装,它与我所做的其他设置一起工作,但现在我的一个设置给我一个运行时错误: adresse 000000处的Acces违规。。。。地址:000000 如果我删除代码中的bass.dll部分,安装程序将正常工作,但它会使另一个代码正常工作。。。为什么这次不起作用 代码如下: [CustomMessages] SoundCtrlButtonCaptionSoundOn=Play SoundCtrlButtonCaptionSoundOff=Stop [Code] procedur

我使用一个代码进行安装,它与我所做的其他设置一起工作,但现在我的一个设置给我一个运行时错误:

adresse 000000处的Acces违规。。。。地址:000000

如果我删除代码中的bass.dll部分,安装程序将正常工作,但它会使另一个代码正常工作。。。为什么这次不起作用

代码如下:

[CustomMessages]
SoundCtrlButtonCaptionSoundOn=Play
SoundCtrlButtonCaptionSoundOff=Stop

[Code]
procedure LoadVCLStyle(VClStyleFile: String); external 'LoadVCLStyleW@files:VclStylesInno.dll stdcall setuponly';
procedure LoadVCLStyle_UnInstall(VClStyleFile: String); external 'LoadVCLStyleW@{#VCLStylesSkinPath}\VclStylesInno.dll stdcall uninstallonly';
procedure UnLoadVCLStyles; external 'UnLoadVCLStyles@files:VclStylesInno.dll stdcall setuponly';
procedure UnLoadVCLStyles_UnInstall; external 'UnLoadVCLStyles@{#VCLStylesSkinPath}\VclStylesInno.dll stdcall uninstallonly';
function InitializeSetup(): Boolean;
begin
  ExtractTemporaryFile('Skin.vsf');
  LoadVCLStyle(ExpandConstant('{tmp}\Skin.vsf'));
  Result := True;
end;
procedure DeinitializeSetup;
begin
  UnLoadVCLStyles;
end;

const  
  BASS_SAMPLE_LOOP = 4;
  BASS_ACTIVE_STOPPED = 0;
  BASS_ACTIVE_PLAYING = 1;
  BASS_ACTIVE_STALLED = 2;
  BASS_ACTIVE_PAUSED  = 3;
  BASS_UNICODE = $80000000;
  BASS_CONFIG_GVOL_STREAM = 5;
const
  #ifndef UNICODE
    EncodingFlag = 0;
  #else
    EncodingFlag = BASS_UNICODE;
  #endif
type
  HSTREAM = DWORD;

function BASS_Init(device: LongInt; freq, flags: DWORD; 
  win: HWND; clsid: Cardinal): BOOL;
  external 'BASS_Init@files:bass.dll stdcall';
function BASS_StreamCreateFile(mem: BOOL; f: string; offset1: DWORD; 
  offset2: DWORD; length1: DWORD; length2: DWORD; flags: DWORD): HSTREAM;
  external 'BASS_StreamCreateFile@files:bass.dll stdcall';
function BASS_Start: BOOL;
  external 'BASS_Start@files:bass.dll stdcall';
function BASS_Pause: BOOL;
  external 'BASS_Pause@files:bass.dll stdcall';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL; 
  external 'BASS_ChannelPlay@files:bass.dll stdcall';
function BASS_SetConfig(option: DWORD; value: DWORD ): BOOL;
  external 'BASS_SetConfig@files:bass.dll stdcall';
function BASS_ChannelIsActive(handle: DWORD): DWORD;
  external 'BASS_ChannelIsActive@files:bass.dll stdcall';
function BASS_Free: BOOL;
  external 'BASS_Free@files:bass.dll stdcall';

var
  SoundStream: HSTREAM;
  SoundCtrlButton: TNewButton;

procedure SoundCtrlButtonClick(Sender: TObject);
begin
  case BASS_ChannelIsActive(SoundStream) of
    BASS_ACTIVE_PLAYING: 
    begin
      if BASS_Pause then
        SoundCtrlButton.Caption := 
          ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOn}');
    end;
    BASS_ACTIVE_PAUSED: 
    begin
      if BASS_Start then
        SoundCtrlButton.Caption :=
          ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOff}');
    end;
  end;
end;
procedure InitializeWizard;
begin
  ExtractTemporaryFile('Music.mp3');
  if BASS_Init(-1, 44100, 0, 0, 0) then
  begin
    SoundStream := BASS_StreamCreateFile(False, 
      ExpandConstant('{tmp}\Music.mp3'), 0, 0, 0, 0, 
      EncodingFlag or BASS_SAMPLE_LOOP);
    BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, 8500);
    BASS_ChannelPlay(SoundStream, False);

    SoundCtrlButton := TNewButton.Create(WizardForm);
    SoundCtrlButton.Parent := WizardForm;
    SoundCtrlButton.Left := 8;
    SoundCtrlButton.Top := WizardForm.ClientHeight - 
      SoundCtrlButton.Height - 12;
    SoundCtrlButton.Width := 148;
    SoundCtrlButton.Caption :=
      ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOff}');
    SoundCtrlButton.OnClick := @SoundCtrlButtonClick;
 end;
end; 

function InitializeUninstall: Boolean;
begin
  Result := True;
  LoadVCLStyle_UnInstall(ExpandConstant('{#VCLStylesSkinPath}\Skin.vsf'));
end;

procedure DeinitializeUninstall();
begin
  UnLoadVCLStyles_UnInstall;
end;