3年前的小程序:破解需要delphi IDE 环境的vcl 控件

基本原理:有些vcl组件未注册的话,会显示没有注册的信息,但在设计期间不显示这些信息,表示该组件会检查delphi的ide 环境,解决办法就是让自己的exe带上ide的信息;

组件检查ide的办法无非就是使用api查找特定的delphi窗体类名称,如下是代码,建立几个看不见的窗体,名称和delphi ide的主要窗口一样;当然,这样做不见得100%破解检查ide环境的组件,有些组件可以遍历窗体的子件类,总之方法很多,要更好的办法,简单;用dede反编译delphi的主程序,把dfm资源搞出来,到自己工程里加入就行了。

以下是代码,见笑;
None.gif { *********************  破解需要delphi IDE 的vcl 控件 *****
None.gif
// 请直接将该单元加入到工程中,并放到最初启动位置,无需调
None.gif
// 用方法,自动完成解密过程
None.gif
// 版权所有:随飞
None.gif // 该版为 Pascal 代码版本
None.gif
******************************************************** }
None.gifunit vclAntIde;
ExpandedBlockStart.gifContractedBlock.gif
Interface uses interface
InBlock.gifuses
InBlock.gif  Windows, Messages;
InBlock.gif
InBlock.gif
const
InBlock.gif  AppBuilder        
= 'TAppBuilder';
InBlock.gif
  EditWindow        = 'TEditWindow';
InBlock.gif
  PropertyInspector = 'TPropertyInspector';
InBlock.gif
  ObjectTreeView    = 'TObjectTreeView';
InBlock.gif

InBlock.gifimplementation
InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif
Function WindowProc()function WindowProc(Window: Integer; AMessage, wParam, lParam: Integer):
InBlock.gif  
Integer;
InBlock.gif  stdcall; export;
InBlock.gifbegin
InBlock.gif  WindowProc :
= 0;
InBlock.gif  
case AMessage of
InBlock.gif    WM_DESTROY, WM_QUIT, WM_QUERYENDSESSION, WM_CLOSE:
InBlock.gif      begin
InBlock.gif        PostQuitMessage(
0);
InBlock.gif        
Exit;
InBlock.gif      
end;
InBlock.gif  
end;
InBlock.gif  WindowProc :
= DefWindowProc(Window, AMessage, wParam, lParam);
InBlock.gif
end;
InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif
Function WinRegister()function WinRegister(AppName: PAnsiChar): boolean;
InBlock.gifvar
InBlock.gif  WindowClass       : TWndClass;
InBlock.gifbegin
InBlock.gif  WindowClass.Style :
= 2 or 1;
InBlock.gif  WindowClass.lpfnWndProc :
= @WindowProc;
InBlock.gif  WindowClass.cbClsExtra :
= 0;
InBlock.gif  WindowClass.cbWndExtra :
= 0;
InBlock.gif  WindowClass.hInstance :
= HInstance;
InBlock.gif  WindowClass.hIcon :
= LoadIcon(0, idi_Application);
InBlock.gif  WindowClass.hCursor :
= LoadCursor(0, idc_Arrow);
InBlock.gif  WindowClass.hbrBackground :
= HBrush(Color_Window);
InBlock.gif  WindowClass.lpszMenuName :
= nil;
InBlock.gif  WindowClass.lpszClassName :
= AppName;
InBlock.gif
InBlock.gif  Result :
= RegisterClass(WindowClass) <> 0;
InBlock.gif
end;
InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif
Function WinCreate()function WinCreate(AppName: PAnsiChar): HWnd;
InBlock.gifvar
InBlock.gif  hWindow           : HWnd;
InBlock.gifbegin
InBlock.gif  hWindow :
= CreateWindow(AppName,
InBlock.gif    AppName,
InBlock.gif    WS_OVERLAPPEDWINDOW,
InBlock.gif    
0,
InBlock.gif    
0,
InBlock.gif    
1,
InBlock.gif    
1,
InBlock.gif    
0,
InBlock.gif    
0,
InBlock.gif    HInstance,
InBlock.gif    nil);
InBlock.gif  
if hWindow <> 0 then
InBlock.gif  begin
InBlock.gif    
//      ShowWindow(hWindow, cmdShow);
InBlock.gif    
//      UpdateWindow(hWindow);
InBlock.gif  
end;
InBlock.gif
InBlock.gif  Result :
= hWindow;
InBlock.gif
end;
InBlock.gif
InBlock.gifvar
InBlock.gif  AMessage          : TMsg;
InBlock.gif  hWindow           : HWnd;
InBlock.gif  
InBlock.gifbegin
InBlock.gif
//HWND handle = GetSafeHwnd();
InBlock.gif
InBlock.gif  
if GlobalFindAtom('@TaskAgent')=0 then
InBlock.gif
  begin
InBlock.gif    GlobalAddAtom(
'@TaskAgent');
InBlock.gif
  end;
InBlock.gif
InBlock.gif  
if not WinRegister(AppBuilder) then
InBlock.gif  begin
InBlock.gif    MessageBox(
0'注册失败!', nil, mb_Ok);
InBlock.gif
    Exit;
InBlock.gif  
end;
InBlock.gif  
if not WinRegister(EditWindow) then
InBlock.gif  begin
InBlock.gif    MessageBox(
0'注册失败!', nil, mb_Ok);
InBlock.gif
    Exit;
InBlock.gif  
end;
InBlock.gif  
if not WinRegister(PropertyInspector) then
InBlock.gif  begin
InBlock.gif    MessageBox(
0'注册失败!', nil, mb_Ok);
InBlock.gif
    Exit;
InBlock.gif  
end;
InBlock.gif  
if not WinRegister(ObjectTreeView) then
InBlock.gif  begin
InBlock.gif    MessageBox(
0'注册失败!', nil, mb_Ok);
InBlock.gif
    Exit;
InBlock.gif  
end;
InBlock.gif
InBlock.gif  hWindow :
= WinCreate(AppBuilder);
InBlock.gif  
if hWindow = 0 then
InBlock.gif  begin
InBlock.gif    MessageBox(
0'创建失败', nil, mb_Ok);
InBlock.gif
    Exit;
InBlock.gif  
end;
InBlock.gif
InBlock.gif  hWindow :
= WinCreate(EditWindow);
InBlock.gif  
if hWindow = 0 then
InBlock.gif  begin
InBlock.gif    MessageBox(
0'创建失败', nil, mb_Ok);
InBlock.gif
    Exit;
InBlock.gif  
end;
InBlock.gif  hWindow :
= WinCreate(PropertyInspector);
InBlock.gif  
if hWindow = 0 then
InBlock.gif  begin
InBlock.gif    MessageBox(
0'创建失败', nil, mb_Ok);
InBlock.gif
    Exit;
InBlock.gif  
end;
InBlock.gif
InBlock.gif  hWindow :
= WinCreate(ObjectTreeView);
InBlock.gif  
if hWindow = 0 then
InBlock.gif  begin
InBlock.gif    MessageBox(
0'创建失败', nil, mb_Ok);
InBlock.gif
    Exit;
InBlock.gif  
end;
InBlock.gif
InBlock.gif
end.
InBlock.gif
InBlock.gif

转载于:https://www.cnblogs.com/Chinasf/archive/2005/10/24/260518.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值