Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Начинающим";
Текущий архив: 2006.04.16;
Скачать: [xml.tar.bz2];

Вниз

Проблемы с 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;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.46 MB
Время: 0.041 c
15-1143090734
vajo
2006-03-23 08:12
2006.04.16
USB контроллер не определяется


15-1143551972
oldman
2006-03-28 17:19
2006.04.16
Для любителей группы "Черный кофе" (старой, годика 1987....)


2-1143773415
Barabashka
2006-03-31 06:50
2006.04.16
Небольшая проблема


4-1138786134
Cashmare
2006-02-01 12:28
2006.04.16
WaitForSingleObject & Synchronize


2-1143795433
Alex7
2006-03-31 12:57
2006.04.16
Обращение к переменной Public





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский