Advertisement
Gov_777

Из ресурса wav (файл hit.wav имя ресурса ''HIT"))

Dec 18th, 2016
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.31 KB | None | 0 0
  1. procedure ***;
  2. var hRes: THandle;
  3.    pRes: Pointer;
  4. begin
  5. try
  6.  hRes := LoadResource(HInstance, FindResource(HInstance, 'HIT', RT_RCDATA));
  7.  if hRes=0 then exit;
  8.   pRes:= LockResource(hRes);
  9.   if pRes=nil then Exit;
  10.   PlaySound(pRes, 0, SND_MEMORY or SND_ASYNC);
  11.  finally
  12.  FreeResource(hRes);
  13.  end;
  14. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement