LazActiveX: remove the typelib related code and units when compiling for WinCE because it can't be ported there, add to activexcontainer.pas a few stubs for API functions that are not defined in WinCE. Patch by Ludo Brands, bug #22152.

git-svn-id: trunk@37521 -
This commit is contained in:
maxim 2012-06-04 21:06:16 +00:00
parent 54fdf62499
commit d468662d4a
3 changed files with 30 additions and 1 deletions

View File

@ -209,6 +209,25 @@ type
implementation
{$ifdef wince}
const
GWLP_USERDATA=GWL_USERDATA;
function GetWindowLongPtrW(hWnd:HWND; nIndex:longint):LONG;
begin
result:=GetWindowLongW(hWnd, nIndex);
end;
function SetWindowLongPtrW(hWnd:HWND; nIndex:longint; dwNewLong:LONG):LONG;
begin
result:=SetWindowLongW(hWnd, nIndex, dwNewLong);
end;
function SetWindowLongPtr(hWnd:HWND; nIndex:longint; dwNewLong:LONG):LONG;
begin
result:=SetWindowLongW(hWnd, nIndex, dwNewLong);
end;
{$endif wince}
function WndCallback(Ahwnd: HWND; uMsg: UINT; wParam: WParam;
lParam: LParam): LRESULT; stdcall;

View File

@ -4,6 +4,7 @@ unit ImportTypelib;
interface
{$ifndef wince}
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, EditBtn,
StdCtrls,lazideintf,projectintf,PackageIntf;
@ -33,9 +34,11 @@ var
FrmTL: TFrmTL;
procedure ImpTypeLib(Sender: TObject);
{$endif wince}
implementation
{$ifndef wince}
uses typelib;
procedure ImpTypeLib(Sender: TObject);
@ -138,6 +141,7 @@ begin
end;
{$R *.lfm}
{$endif wince}
end.

View File

@ -33,7 +33,11 @@ unit lazactivexreg;
interface
uses
activexcontainer,ImportTypelib;
activexcontainer
{$ifndef wince}
,ImportTypelib
{$endif wince}
;
procedure Register;
@ -44,7 +48,9 @@ uses classes,LResources,MenuIntf, LCLIntf;
procedure Register;
begin
{$ifndef wince}
RegisterIDEMenuCommand(itmSecondaryTools, 'ImportTL','Import Type Library',nil,@ImpTypeLib);
{$endif wince}
RegisterComponents('ActiveX', [TActiveXContainer]);
end;