View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000090 | JEDI VCL | 00 JVCL Components | public | 2002-05-26 03:31 | 2002-06-05 09:22 |
Reporter | kay | Assigned To | user81 | ||
Priority | normal | Severity | block | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0000090: Default value for TTimeStamp in unit JvWinampApi wrong | ||||
Description | If one use the component JvWinampApi in a form, one will get an error message 'not valid TimeStamp' (sorry I got a german message). This happens twice, once for 'SongLength' and once for 'SongPosition'. The message will repeated several times (on redraw). One can not delete the component. The reason is, that the default value for 'Date' in TTimeStamp should be one not zerro. | ||||
Additional Information | The following code should be changed as follows (I have tested it, see also upload): function TJvWinampApi.GetLength: TTime; var h: THandle; i: Integer; tstamp: TTimeStamp; begin h := FindWindow(PChar(RC_WinampWindow), nil); tstamp.Time := 0; // tstamp.Date := 0; //wrong format has to start with one tstamp.Date := 1; if h <> 0 then begin i := SendMessage(h, WM_WA_IPC, 1, IPC_GETOUTPUTTime); if i <> -1 then tstamp.Time := i * 1000; end; Result := TimeStampToDateTime(tstamp); end; {**************************************************} function TJvWinampApi.GetTime: TTime; var h: THandle; i: Integer; tstamp: TTimeStamp; begin h := FindWindow(PChar(RC_WinampWindow), nil); tstamp.Time := 0; // tstamp.Date := 0; / has to start with one tstamp.Date := 1; if h <> 0 then begin i := SendMessage(h, WM_WA_IPC, 0, IPC_GETOUTPUTTime); if i <> -1 then tstamp.Time := i; end; Result := TimeStampToDateTime(tstamp); end; | ||||
Tags | No tags attached. | ||||