基本信息
源码名称:程序内部控件探嗅,ADO连接解析
源码大小:15.72M
文件格式:.zip
开发语言:Pascal
更新时间:2021-05-08
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 7 元 
   源码介绍

通过该程序可以获取Delphi编程开发的窗口控件类及控件名称,并实现对ADO的连接解析


function MyFindControl(Handle: HWnd): TWincontrol;
var
  OwningProcess: DWORD;
begin
  Result:= nil;
  GetWindowThreadProcessID(Handle, OwningProcess);
  ShowMessage(IntToStr(OwningProcess) ' , ' IntToStr(GetCurrentProcessID));
  if (Handle <> 0)and(OwningProcess <> 0)and
     (OwningProcess = GetCurrentProcessID) then
  begin
    ShowMessage(IntToStr(GetProp(Handle, MakeIntAtom(ControlAtom))));
    if GlobalFindAtom(PChar(ControlAtomstring)) = ControlAtom then
    begin
      Result:= Pointer(GetProp(Handle, MakeIntAtom(ControlAtom)));
    end
    else
    begin
      Result:= Pointer(SendMessage(Handle, RM_GetObjectInstance, 0, 0));
    end;
  end;
end; { MYFindControl }

function GetAllHandle(AhWnd: Integer; lparam: Longint): Boolean; stdcall;
var
  WndClassName: Array[0..255] of WideChar; //[0..254]
  WndCaption: Array[0..255] of WideChar;   //[0..254]
begin
  Result:= True;
  GetClassName(AhWnd, @WndClassName, 256);
  GetWindowText(AhWnd, WndCaption, 256);

  SetLength(frmClass, Length(frmClass) 1);
  frmClass[High(frmClass)].Handle:= AhWnd;
  frmClass[High(frmClass)].Name:= StrPas(WndClassName);
  frmClass[High(frmClass)].Title:= StrPas(WndCaption);
end;