Unit2.cpp
Upload User: lhxd_sz
Upload Date: 2014-10-02
Package Size: 38814k
Code Size: 1k
Development Platform:

C++ Builder

  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #pragma hdrstop
  4. #include "Unit2.h"
  5. //---------------------------------------------------------------------------
  6. #pragma package(smart_init)
  7. #pragma resource "*.dfm"
  8. TForm1 *Form1;
  9. extern "C" __declspec(dllimport) __stdcall int mycalc(int,int);
  10. extern "C" __declspec(dllimport) __stdcall void myte(void);
  11. extern "C" __declspec(dllimport) __stdcall int myfunc(int,int);
  12. //---------------------------------------------------------------------------
  13. __fastcall TForm1::TForm1(TComponent* Owner)
  14.         : TForm(Owner)
  15. {
  16. }
  17. //---------------------------------------------------------------------------
  18. void __fastcall TForm1::Button1Click(TObject *Sender)
  19. {
  20.   int nn;
  21.   nn=mycalc(10,12);
  22.   Edit1->Text=IntToStr(nn);
  23.   nn=myfunc(10,12);
  24.   Edit2->Text=IntToStr(nn);
  25.   myte();
  26. }
  27. //---------------------------------------------------------------------------