Subversion Repositories musikbox

Compare Revisions

No changes between revisions

Regard whitespace Rev 5 → Rev 6

/trunk/Info.dfm
4,8 → 4,8
BorderIcons = [biSystemMenu]
BorderStyle = bsSingle
Caption = #220'ber...'
ClientHeight = 161
ClientWidth = 383
ClientHeight = 160
ClientWidth = 379
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
12,9 → 12,7
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,23 → 31,27
 
{$R *.dfm}
 
// http://www.delphipraxis.net/post43515.html
Function GetHTML(AUrl: string): string;
const
ProgrammVersion = '1.5';
 
// https://www.delphipraxis.net/post43515.html , fixed , works for Delphi 12 Athens
function GetHTML(AUrl: string): RawByteString;
var
databuffer : array[0..4095] of char;
ResStr : string;
databuffer : array[0..4095] of ansichar; // SIC! ansichar!
ResStr : ansistring; // SIC! ansistring
hSession, hfile: hInternet;
dwindex,dwcodelen,dwread,dwNumber: cardinal;
dwcode : array[1..20] of char;
res : pchar;
Str : pchar;
Str : pansichar; // SIC! pansichar
begin
ResStr:='';
if pos('http://',lowercase(AUrl))=0 then
if (system.pos('http://',lowercase(AUrl))=0) and
(system.pos('https://',lowercase(AUrl))=0) then
AUrl:='http://'+AUrl;
 
// Hinzugefügt
application.ProcessMessages;
if Assigned(Application) then Application.ProcessMessages;
 
hSession:=InternetOpen('InetURL:/1.0',
INTERNET_OPEN_TYPE_PRECONFIG,
57,7 → 61,7
if assigned(hsession) then
begin
// Hinzugefügt
application.ProcessMessages;
if Assigned(Application) then application.ProcessMessages;
 
hfile:=InternetOpenUrl(
hsession,
70,7 → 74,7
dwCodeLen := 10;
 
// Hinzugefügt
application.ProcessMessages;
if Assigned(Application) then application.ProcessMessages;
 
HttpQueryInfo(hfile,
HTTP_QUERY_STATUS_CODE,
88,23 → 92,23
begin
 
// Hinzugefügt
application.ProcessMessages;
if Assigned(Application) then application.ProcessMessages;
 
if dwRead =0 then
break;
databuffer[dwread]:=#0;
Str := pchar(@databuffer);
Str := pansichar(@databuffer);
resStr := resStr + Str;
end;
end
else
ResStr := 'Status:'+res;
ResStr := 'Status:'+AnsiString(res);
if assigned(hfile) then
InternetCloseHandle(hfile);
end;
 
// Hinzugefügt
application.ProcessMessages;
if Assigned(Application) then application.ProcessMessages;
 
InternetCloseHandle(hsession);
Result := resStr;
112,7 → 116,7
 
procedure TInfoForm.Button1Click(Sender: TObject);
var
temp: string;
temp: RawByteString;
begin
temp := GetHTML('http://www.viathinksoft.de/update/?id=musikbox');
if copy(temp, 0, 7) = 'Status:' then
121,7 → 125,7
end
else
begin
if GetHTML('http://www.viathinksoft.de/update/?id=musikbox') <> '1.5' then
if GetHTML('http://www.viathinksoft.de/update/?id=musikbox') <> ProgrammVersion 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 = poDesktopCenter
Position = poScreenCenter
OnCanResize = FormCanResize
OnCreate = FormCreate
OnDestroy = FormDestroy
/trunk/Main.pas
86,8 → 86,6
 
{$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