pragma argsused TList forms new TList extern __declspec dllexport TADO

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#pragma argsused
TList *forms = new TList();
extern "C" __declspec( dllexport ) TADOConnection *connection; //
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
{
return 1;
}
extern "C" __declspec(dllexport) WINAPI void FormsListClear()
{
delete[] forms;
}
extern "C" __declspec(dllexport) WINAPI void setConnection(TADOConnection *connect)
{
connection = connect;
}
extern "C" __declspec(dllexport) WINAPI void openForm2()
{
TForm2 *Form2 = new TForm2(NULL);
//forms->Add(Form2);
//TDataModule6 *DM = new TDataModule6(NULL);
Form2->ADOQuery1->Connection = connection;
//DM->ADOConnection1->ConnectionString = "";
Form2->ShowModal();
delete Form2;
}
extern "C" __declspec(dllexport) WINAPI void openForm3()
{
TForm3 *Form3 = new TForm3(NULL);
forms->Add(Form3);
Form3->ShowModal();
delete Form3;
}
extern "C" __declspec(dllexport) WINAPI void openForm4()
{
TForm4 *Form4 = new TForm4(NULL);
forms->Add(Form4);
Form4->ShowModal();
delete Form4;
}