Чтение онлайн

ЖАНРЫ

Советы по Delphi. Версия 1.4.3 от 1.1.2001

Озеров Валентин

Шрифт:

Top = 6

Width = 28

Height = 13

Caption = 'Name'

FocusControl = EditName

end

object Label2: TLabel

Left = 6

Top = 44

Width = 32

Height = 13

Caption = 'Capital'

FocusControl = EditCapital

end

object Label3: TLabel

Left = 6

Top = 82

Width = 45

Height = 13

Caption = 'Continent'

FocusControl = EditContinent

end

object Label4: TLabel

Left = 6

Top = 120

Width = 22

Height = 13

Caption = 'Area'

FocusControl = EditArea

end

object Label5: TLabel

Left = 6

Top = 158

Width = 50

Height = 13

Caption = 'Population'

FocusControl = EditPopulation

end

object EditName: TDBEdit

Left = 6

Top = 21

Width = 135

Height = 21

DataField = 'Name'

DataSource = DataSource1

MaxLength = 0

TabOrder = 0

end

object EditCapital: TDBEdit

Left = 6

Top = 59

Width = 135

Height = 21

DataField = 'Capital'

DataSource = DataSource1

MaxLength = 0

TabOrder = 1

end

object EditContinent: TDBEdit

Left = 6

Top = 97

Width = 135

Height = 21

DataField = 'Continent'

DataSource = DataSource1

MaxLength = 0

TabOrder = 2

end

object EditArea: TDBEdit

Left = 6

Top = 135

Width = 65

Height = 21

DataField = 'Area'

DataSource = DataSource1

MaxLength = 0

TabOrder = 3

end

object EditPopulation: TDBEdit

Left = 6

Top = 173

Width = 65

Height = 21

DataField = 'Population'

DataSource = DataSource1

MaxLength = 0

TabOrder = 4

end

end

 end

 object DataSource1: TDataSource

Left = 95

Top = 177

 end

 object Database1: TDatabase

DatabaseName = 'DB1'

LoginPrompt = False

SessionName = 'Default'

Left = 128

Top = 176

 end

end

Как

вызывать функцию 16-битной DLL из 32-битного приложения?

Из советов Nomadic'a:

Надо использовать Thunks.

Кусок работающего только под Windows 95 кода —

const

 Gfsr_SystemResources = 0;

 Gfsr_GdiResources = 1;

 Gfsr_UserResources = 2;

var

 hInst16: THandle;

 GFSR: Pointer;

 { Undocumented Kernel32 calls. }

function LoadLibrary16(LibraryName: PChar): THandle; stdcall; external kernel32 index 35;

procedure FreeLibrary16(HInstance: THandle); stdcall; external kernel32 index 36;

function GetProcAddress16(Hinstance: THandle; ProcName: PChar): Pointer; stdcall; external kernel32 index 37;

procedure QT_Thunk; cdecl; external kernel32 name 'QT_Thunk';

{ QT_Thunk needs a stack frame. }

{$StackFrames On}

{ Thunking call to 16-bit USER.EXE. The ThunkTrash argumentallocates space on the stack for QT_Thunk. }

Поделиться с друзьями: