Subversion Repositories musikbox

Compare Revisions

No changes between revisions

Regard whitespace Rev 6 → Rev 5

/trunk/Info.dfm
4,8 → 4,8
BorderIcons = [biSystemMenu]
BorderStyle = bsSingle
Caption = #220'ber...'
ClientHeight = 160
ClientWidth = 379
ClientHeight = 161
ClientWidth = 383
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
12,7 → 12,9
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
PixelsPerInch = 96
TextHeight = 13
object lblInfo1: TLabel
Left = 48
/trunk/Info.pas
31,27 → 31,23
 
{$R *.dfm}
 
const
ProgrammVersion = '1.5';
 
// https://www.delphipraxis.net/post43515.html , fixed , works for Delphi 12 Athens
function GetHTML(AUrl: string): RawByteString;
// http://www.delphipraxis.net/post43515.html
Function GetHTML(AUrl: string): string;
var
databuffer : array[0..4095] of ansichar; // SIC! ansichar!
ResStr : ansistring; // SIC! ansistring
databuffer : array[0..4095] of char;
ResStr : string;
hSession, hfile: hInternet;
dwindex,dwcodelen,dwread,dwNumber: cardinal;
dwcode : array[1..20] of char;
res : pchar;
Str : pansichar; // SIC! pansichar
Str : pchar;
begin
ResStr:='';
if (system.pos('http://',lowercase(AUrl))=0) and
(system.pos('https://',lowercase(AUrl))=0) then
if pos('http://',lowercase(AUrl))=0 then
AUrl:='http://'+AUrl;
 
// Hinzugefügt
if Assigned(Application) then Application.ProcessMessages;
application.ProcessMessages;
 
hSession:=InternetOpen('InetURL:/1.0',
INTERNET_OPEN_TYPE_PRECONFIG,
61,7 → 57,7
if assigned(hsession) then
begin
// Hinzugefügt
if Assigned(Application) then application.ProcessMessages;
application.ProcessMessages;
 
hfile:=InternetOpenUrl(
hsession,
74,7 → 70,7
dwCodeLen := 10;
 
// Hinzugefügt
if Assigned(Application) then application.ProcessMessages;
application.ProcessMessages;
 
HttpQueryInfo(hfile,
HTTP_QUERY_STATUS_CODE,
92,23 → 88,23
begin
 
// Hinzugefügt
if Assigned(Application) then application.ProcessMessages;
application.ProcessMessages;
 
if dwRead =0 then
break;
databuffer[dwread]:=#0;
Str := pansichar(@databuffer);
Str := pchar(@databuffer);
resStr := resStr + Str;
end;
end
else
ResStr := 'Status:'+AnsiString(res);
ResStr := 'Status:'+res;
if assigned(hfile) then
InternetCloseHandle(hfile);
end;
 
// Hinzugefügt
if Assigned(Application) then application.ProcessMessages;
application.ProcessMessages;
 
InternetCloseHandle(hsession);
Result := resStr;
116,7 → 112,7
 
procedure TInfoForm.Button1Click(Sender: TObject);
var
temp: RawByteString;
temp: string;
begin
temp := GetHTML('http://www.viathinksoft.de/update/?id=musikbox');
if copy(temp, 0, 7) = 'Status:' then
125,7 → 121,7
end
else
begin
if GetHTML('http://www.viathinksoft.de/update/?id=musikbox') <> ProgrammVersion then
if GetHTML('http://www.viathinksoft.de/update/?id=musikbox') <> '1.5' then
begin
if Application.MessageBox('Eine neue Programmversion ist vorhanden. Möchten Sie diese jetzt herunterladen?', 'Information', MB_YESNO + MB_ICONASTERISK) = ID_YES then
shellexecute(application.handle, 'open', pchar('http://www.viathinksoft.de/update/?id=@musikbox'), '', '', sw_normal);
/trunk/Main.dfm
11,7 → 11,7
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Position = poScreenCenter
Position = poDesktopCenter
OnCanResize = FormCanResize
OnCreate = FormCreate
OnDestroy = FormDestroy
/trunk/Main.pas
86,6 → 86,8
 
{$R *.dfm}
 
{$R windowsxp.res}
 
// http://www.delphipraxis.net/post592358.html
function IsFileDRMProtected(AFileName: String): Boolean;
var lCheckProc: function(const AFileName: PWideChar; var AIsProtected: Bool): HRESULT; stdcall;
/trunk/Musikbox.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream