Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2006.04.16;
Скачать: CL | DM;

Вниз

Проблемы с dll   Найти похожие ветки 

 
Dyakon_Frost ©   (2006-04-02 11:03) [0]

Здравствуйте!
Есть вопрос на счет dll:
Вот сама dll, прописываю вызов процедур в программе - возникает ошибка прям в начале загрузки, все перепробовал и понял что проблема в подключаемых модулях, возможно есть какие-то ограничения в этом случае? Если есть возможность, то напишите пожалуйста ссылки где можно прочитать инфу по этому поводу:

library Profile;

uses
 ShareMem,
 SysUtils,
 Grids,
 QExtCtrls,
 QComCtrls,
 ExtCtrls,
 QMask,
 Dialogs,
 QStdCtrls,
 Classes;

{$R *.res}

type
 t_students = record
   Index: integer;
   Name: string;
   Ocenki: record
     One:   1..5;
     Two:   1..5;
     Three: 1..5;
     Four:  1..5;
     Five:  1..5;
   end;
   Rab: boolean;
 end;

var Students: array of t_students;
   kol,kst, id: integer;

Procedure PFormCreate(SG: TStringGrid; PPanel1, PPanel2: TPanel); stdcall;
 begin
   kst := 0;
   kol := -1;
   PPanel2.Visible := false;
   PPanel1.Visible := true;
   SG.Cells[0,0] := "Повышенная стипендия";
   SG.Cells[1,0] := "Доплата 25%";
   SG.Cells[2,0] := "Обычная стипендия";
   SG.Cells[3,0] := "Без стипендии";
 end;

Procedure PButton1Click(SB: TStatusBar; PLP1, PLP2: TLabeledEdit; PME1,PME2,PME3,PME4,PME5: TMaskEdit; PCB: TCheckBox; PLB: TListBox); stdcall;
 begin
   inc(kst);
   SetLength(Students,kst);
   SB.Panels[0].Text := "Количество студентов в списке = " + inttostr(kst);
   if (PLP1.Text = "") or (PLP2.Text = "") then
    MessageDlg("Вы не заполнили одно из полей",mtError,[mbOk],0)
    else
     begin
      inc(kol);
      Students[kol].Index := strtoint(PLP1.Text);
      Students[kol].Name := PLP2.Text;
      Students[kol].Ocenki.One := strtoint(PME1.Text);
      Students[kol].Ocenki.Two := strtoint(PME2.Text);
      Students[kol].Ocenki.Three := strtoint(PME3.Text);
      Students[kol].Ocenki.Four := strtoint(PME4.Text);
      Students[kol].Ocenki.Five := strtoint(PME5.Text);
      Students[kol].Rab := PCB.Checked;
      PLB.Items.Add(Students[kol].Name);
      PLP1.Text := "";
      PLP2.Text := "";
      PME1.Text := "";
      PME2.Text := "";
      PME3.Text := "";
      PME4.Text := "";
      PME5.Text := "";
      PCB.Checked := false;
     end;
 end;

Procedure PButton2Click(PPanel1, PPanel2: TPanel; PEdit: TEdit; SG: TStringGrid); stdcall;
 var i: integer;
 begin
   PPanel1.Visible := false;
   PPanel2.Visible := true;
   for i := 0 to kst-1 do
    begin
    if Students[i].Index = StrToInt(PEdit.Text) then
     begin
     if (Students[i].Ocenki.One >= 4) and (Students[i].Ocenki.Two >= 4) and (Students[i].Ocenki.Three >= 4) and (Students[i].Ocenki.Four >= 4) and (Students[i].Ocenki.Five >= 4) then
      begin
      if (Students[i].Ocenki.One = 5) and (Students[i].Ocenki.Two = 5) and (Students[i].Ocenki.Three = 5) and (Students[i].Ocenki.Four = 5) and (Students[i].Ocenki.Five = 5) then
       begin
       if Students[i].Rab = True then
        SG.Cells[0,i+1] := Students[i].Name
        else
         SG.Cells[1,i+1] := Students[i].Name
       end
      else
       SG.Cells[2,i+1] := Students[i].Name;
    end

    else
     if (Students[i].Ocenki.One = 3) or (Students[i].Ocenki.Two = 3) or (Students[i].Ocenki.Three = 3) or (Students[i].Ocenki.Four = 3) or (Students[i].Ocenki.Five = 3) then
     begin
      if Students[i].Rab = True then
       SG.Cells[2,i+1] := Students[i].Name
       else
        SG.Cells[3,i+1] := Students[i].Name
     end;
   end;
 end;
end;

procedure PExitClick(PPanel1,PPanel2: TPanel; SG:TStringGrid); stdcall;
 var i,k: integer;
 begin
  PPanel2.Visible := false;
  PPanel1.Visible := true;
  for i := 1 to kst do
   for k := 1 to kst do
    SG.Cells[i,k] := "";
 end;      

exports
   PFormCreate, PButton1Click, PButton2Click, PExitClick;

begin
end.

Заранее спасибо!


 
Dyakon_Frost ©   (2006-04-02 11:47) [1]

Спасибо! Проблему уже решил!



Страницы: 1 вся ветка

Текущий архив: 2006.04.16;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.025 c
2-1143708974
Вова2
2006-03-30 12:56
2006.04.16
Установка доступа к дискам!!!


15-1143020600
Кручен-Верчен
2006-03-22 12:43
2006.04.16
Не получается решить интегралы.


4-1138127656
medvedenator
2006-01-24 21:34
2006.04.16
Запуск программы от имени администратора


15-1143363049
Yegorchic
2006-03-26 12:50
2006.04.16
Backup по-русски


4-1137259089
Guest386x
2006-01-14 20:18
2006.04.16
Блокирование клавиатуры