pchenge.dll Delphiソース(Delphi1.0)


library Pchenge;

uses
  Pchengu in 'PCHENGU.PAS' {Form1};

{$R *.RES}

exports
  pch0 name 'pchenge0command';
exports
  pch1 name 'pchenge1command';
exports
  pch2 name 'pchenge2command';
exports
  pch3 name 'pchenge3command';
exports
  pch4 name 'pchenge4command';
exports
  pch5 name 'pchenge5command';
exports
  pch6 name 'pchenge6command';
exports
  pch7 name 'pchenge7command';
exports
  pch8 name 'pchenge8command';
exports
  pch9 name 'pchenge9command';
exports
  pch10 name 'pchenge10command';
exports
  pch11 name 'pchenge11command';
exports
  pch12 name 'pchenge12command';
exports
  pch13 name 'pchenge13command';
exports
  pch14 name 'pchenge14command';
exports
  pch15 name 'pchenge15command';
begin
end.

unit Pchengu;

interface

uses
  SysUtils, WinTypes, WinProcs, Messages,
  Classes, Graphics, Controls, IniFiles,
  Forms, Dialogs, ExtCtrls;

type
  TForm1 = class(TForm)
  private
    { Private 宣言 }
  public
    { Public 宣言 }
  end;

{エクスポート関数の宣言}
procedure pch0;export;
procedure pch1;export;
procedure pch2;export;
procedure pch3;export;
procedure pch4;export;
procedure pch5;export;
procedure pch6;export;
procedure pch7;export;
procedure pch8;export;
procedure pch9;export;
procedure pch10;export;
procedure pch11;export;
procedure pch12;export;
procedure pch13;export;
procedure pch14;export;
procedure pch15;export;

var
  winini: Tinifile;
  Form1: TForm1;
  Stlist:Tstringlist;
  str: String;
  line: String;
  prn: String;
  N: Integer;

implementation

{$R *.DFM}

procedure pch0;
begin
  try
    form1 := Tform1.create(nil);
     Stlist :=TStringlist.Create;
     WinIni := Tinifile.create('win.ini');
     WinIni.ReadSection('devices', Stlist);
    if Stlist.count <= 0 then
     winini.free
    else
     begin
     line:=stlist[0];
     str:=WinIni.ReadString('devices',line,'');
     prn:=line + ',' + str;
     WinIni.WriteString('Windows','device',prn);
     WinIni.Free;
     end;
    form1.free;
  except
    on E: Exception do
    messagedlg('An '+E.ClassName+' occured. in PCHENGE.DLL', mtWarning,
               [mbok], 0);
  end;
end;

procedure pch1;
begin
  try
    form1 := Tform1.create(nil);
     Stlist :=TStringlist.Create;
     WinIni := Tinifile.create('win.ini');
     WinIni.ReadSection('devices', Stlist);
    if Stlist.count <= 1 then
     winini.free
    else
     begin
     line:=stlist[1];
     str:=WinIni.ReadString('devices',line,'');
     prn:=line + ',' + str;
     WinIni.WriteString('Windows','device',prn);
     WinIni.Free;
     end;
    form1.free;
  except
    on E: Exception do
    messagedlg('An '+E.ClassName+' occured. in PCHENGE.DLL', mtWarning,
               [mbok], 0);
  end;
end;

procedure pch2;
begin
  try
    form1 := Tform1.create(nil);
     Stlist :=TStringlist.Create;
     WinIni := Tinifile.create('win.ini');
     WinIni.ReadSection('devices', Stlist);
    if Stlist.count <= 2 then
     winini.free
    else
     begin
     line:=stlist[2];
     str:=WinIni.ReadString('devices',line,'');
     prn:=line + ',' + str;
     WinIni.WriteString('Windows','device',prn);
     WinIni.Free;
     end;
    form1.free;
  except
    on E: Exception do
    messagedlg('An '+E.ClassName+' occured. in PCHENGE.DLL', mtWarning,
               [mbok], 0);
  end;
end;

procedure pch3;
begin
  try
    form1 := Tform1.create(nil);
     Stlist :=TStringlist.Create;
     WinIni := Tinifile.create('win.ini');
     WinIni.ReadSection('devices', Stlist);
    if Stlist.count <= 3 then
     winini.free
    else
     begin
     line:=stlist[3];
     str:=WinIni.ReadString('devices',line,'');
     prn:=line + ',' + str;
     WinIni.WriteString('Windows','device',prn);
     WinIni.Free;
     end;
    form1.free;
  except
    on E: Exception do
    messagedlg('An '+E.ClassName+' occured. in PCHENGE.DLL', mtWarning,
               [mbok], 0);
  end;
end;

procedure pch4;
begin
  try
    form1 := Tform1.create(nil);
     Stlist :=TStringlist.Create;
     WinIni := Tinifile.create('win.ini');
     WinIni.ReadSection('devices', Stlist);
    if Stlist.count <= 4 then
     winini.free
    else
     begin
     line:=stlist[4];
     str:=WinIni.ReadString('devices',line,'');
     prn:=line + ',' + str;
     WinIni.WriteString('Windows','device',prn);
     WinIni.Free;
     end;
    form1.free;
  except
    on E: Exception do
    messagedlg('An '+E.ClassName+' occured. in PCHENGE.DLL', mtWarning,
               [mbok], 0);
  end;
end;

procedure pch5;
begin
  try
    form1 := Tform1.create(nil);
     Stlist :=TStringlist.Create;
     WinIni := Tinifile.create('win.ini');
     WinIni.ReadSection('devices', Stlist);
    if Stlist.count <= 5 then
     winini.free
    else
     begin
     line:=stlist[5];
     str:=WinIni.ReadString('devices',line,'');
     prn:=line + ',' + str;
     WinIni.WriteString('Windows','device',prn);
     WinIni.Free;
     end;
    form1.free;
  except
    on E: Exception do
    messagedlg('An '+E.ClassName+' occured. in PCHENGE.DLL', mtWarning,
               [mbok], 0);
  end;
end;

procedure pch6;
begin
  try
    form1 := Tform1.create(nil);
     Stlist :=TStringlist.Create;
     WinIni := Tinifile.create('win.ini');
     WinIni.ReadSection('devices', Stlist);
    if Stlist.count <= 6 then
     winini.free
    else
     begin
     line:=stlist[6];
     str:=WinIni.ReadString('devices',line,'');
     prn:=line + ',' + str;
     WinIni.WriteString('Windows','device',prn);
     WinIni.Free;
     end;
    form1.free;
  except
    on E: Exception do
    messagedlg('An '+E.ClassName+' occured. in PCHENGE.DLL', mtWarning,
               [mbok], 0);
  end;
end;

procedure pch7;
begin
  try
    form1 := Tform1.create(nil);
     Stlist :=TStringlist.Create;
     WinIni := Tinifile.create('win.ini');
     WinIni.ReadSection('devices', Stlist);
    if Stlist.count <= 7 then
     winini.free
    else
     begin
     line:=stlist[7];
     str:=WinIni.ReadString('devices',line,'');
     prn:=line + ',' + str;
     WinIni.WriteString('Windows','device',prn);
     WinIni.Free;
     end;
    form1.free;
  except
    on E: Exception do
    messagedlg('An '+E.ClassName+' occured. in PCHENGE.DLL', mtWarning,
               [mbok], 0);
  end;
end;

procedure pch8;
begin
  try
    form1 := Tform1.create(nil);
     Stlist :=TStringlist.Create;
     WinIni := Tinifile.create('win.ini');
     WinIni.ReadSection('devices', Stlist);
    if Stlist.count <= 8 then
     winini.free
    else
     begin
     line:=stlist[8];
     str:=WinIni.ReadString('devices',line,'');
     prn:=line + ',' + str;
     WinIni.WriteString('Windows','device',prn);
     WinIni.Free;
     end;
    form1.free;
  except
    on E: Exception do
    messagedlg('An '+E.ClassName+' occured. in PCHENGE.DLL', mtWarning,
               [mbok], 0);
  end;
end;

procedure pch9;
begin
  try
    form1 := Tform1.create(nil);
     Stlist :=TStringlist.Create;
     WinIni := Tinifile.create('win.ini');
     WinIni.ReadSection('devices', Stlist);
    if Stlist.count <= 9 then
     winini.free
    else
     begin
     line:=stlist[9];
     str:=WinIni.ReadString('devices',line,'');
     prn:=line + ',' + str;
     WinIni.WriteString('Windows','device',prn);
     WinIni.Free;
     end;
    form1.free;
  except
    on E: Exception do
    messagedlg('An '+E.ClassName+' occured. in PCHENGE.DLL', mtWarning,
               [mbok], 0);
  end;
end;

procedure pch10;
begin
  try
    form1 := Tform1.create(nil);
     Stlist :=TStringlist.Create;
     WinIni := Tinifile.create('win.ini');
     WinIni.ReadSection('devices', Stlist);
    if Stlist.count <= 10 then
     winini.free
    else
     begin
     line:=stlist[10];
     str:=WinIni.ReadString('devices',line,'');
     prn:=line + ',' + str;
     WinIni.WriteString('Windows','device',prn);
     WinIni.Free;
     end;
    form1.free;
  except
    on E: Exception do
    messagedlg('An '+E.ClassName+' occured. in PCHENGE.DLL', mtWarning,
               [mbok], 0);
  end;
end;

procedure pch11;
begin
  try
    form1 := Tform1.create(nil);
     Stlist :=TStringlist.Create;
     WinIni := Tinifile.create('win.ini');
     WinIni.ReadSection('devices', Stlist);
    if Stlist.count <= 11 then
     winini.free
    else
     begin
     line:=stlist[11];
     str:=WinIni.ReadString('devices',line,'');
     prn:=line + ',' + str;
     WinIni.WriteString('Windows','device',prn);
     WinIni.Free;
     end;
    form1.free;
  except
    on E: Exception do
    messagedlg('An '+E.ClassName+' occured. in PCHENGE.DLL', mtWarning,
               [mbok], 0);
  end;
end;

procedure pch12;
begin
  try
    form1 := Tform1.create(nil);
     Stlist :=TStringlist.Create;
     WinIni := Tinifile.create('win.ini');
     WinIni.ReadSection('devices', Stlist);
    if Stlist.count <= 12 then
     winini.free
    else
     begin
     line:=stlist[12];
     str:=WinIni.ReadString('devices',line,'');
     prn:=line + ',' + str;
     WinIni.WriteString('Windows','device',prn);
     WinIni.Free;
     end;
    form1.free;
  except
    on E: Exception do
    messagedlg('An '+E.ClassName+' occured. in PCHENGE.DLL', mtWarning,
               [mbok], 0);
  end;
end;

procedure pch13;
begin
  try
    form1 := Tform1.create(nil);
     Stlist :=TStringlist.Create;
     WinIni := Tinifile.create('win.ini');
     WinIni.ReadSection('devices', Stlist);
    if Stlist.count <= 13 then
     winini.free
    else
     begin
     line:=stlist[13];
     str:=WinIni.ReadString('devices',line,'');
     prn:=line + ',' + str;
     WinIni.WriteString('Windows','device',prn);
     WinIni.Free;
     end;
    form1.free;
  except
    on E: Exception do
    messagedlg('An '+E.ClassName+' occured. in PCHENGE.DLL', mtWarning,
               [mbok], 0);
  end;
end;

procedure pch14;
begin
  try
    form1 := Tform1.create(nil);
     Stlist :=TStringlist.Create;
     WinIni := Tinifile.create('win.ini');
     WinIni.ReadSection('devices', Stlist);
    if Stlist.count <= 14 then
     winini.free
    else
     begin
     line:=stlist[14];
     str:=WinIni.ReadString('devices',line,'');
     prn:=line + ',' + str;
     WinIni.WriteString('Windows','device',prn);
     WinIni.Free;
     end;
    form1.free;
  except
    on E: Exception do
    messagedlg('An '+E.ClassName+' occured. in PCHENGE.DLL', mtWarning,
               [mbok], 0);
  end;
end;

procedure pch15;
begin
  try
    form1 := Tform1.create(nil);
     Stlist :=TStringlist.Create;
     WinIni := Tinifile.create('win.ini');
     WinIni.ReadSection('devices', Stlist);
    if Stlist.count <= 15 then
     winini.free
    else
     begin
     line:=stlist[15];
     str:=WinIni.ReadString('devices',line,'');
     prn:=line + ',' + str;
     WinIni.WriteString('Windows','device',prn);
     WinIni.Free;
     end;
    form1.free;
  except
    on E: Exception do
    messagedlg('An '+E.ClassName+' occured. in PCHENGE.DLL', mtWarning,
               [mbok], 0);
  end;
end;

end.

戻る