前所未所的难题

yongxing 2000-08-21 02:53:00
怎样在WIN2000里把*****显示出来?
由于 Windows NT/2000 在安全性上面的改进,Areslee的方法行不通,目前所有的查
看****的工具都没用处,
因为使用常规的 SendMessage( WM_GETTEXT ) 方法或者GetWindowText根本就不管用,
会得到一个5 号错误,即 ERROR_ACCESS_DENIED。
可能只能用DLL+EXE来实现。
如何在钩子函数里把****抓出来。
...全文
463 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
FBStudio 2000-08-23
  • 打赏
  • 举报
回复
我觉得按照下面的思路可能行得通。
写一个钩子dll,在dll中钩住指定的窗口后再调用SetWindowLong。
wolfzhu 2000-08-22
  • 打赏
  • 举报
回复
编辑框的PASSWORD属性风格为ES_PASSWORD,可用SetWindowLong来改变。下面这段是从MSDN上拷下来的,没有翻译,请多多见谅:

SetWindowLong
The SetWindowLong function changes an attribute of the specified window. The function also sets a 32-bit (long) value at the specified offset into the extra window memory of a window.

LONG SetWindowLong(
HWND hWnd, // handle of window
int nIndex, // offset of value to set
LONG dwNewLong // new value
);

Parameters
hWnd
Handle to the window and, indirectly, the class to which the window belongs.
nIndex
Specifies the zero-based offset to the value to be set. Valid values are in the range zero through the number of bytes of extra window memory, minus 4; for example, if you specified 12 or more bytes of extra memory, a value of 8 would be an index to the third 32-bit integer. To set any other value, specify one of the following values: Value Action
GWL_EXSTYLE Sets a new extended window style.
GWL_STYLE Sets a new window style.
GWL_WNDPROC Sets a new address for the window procedure.
GWL_HINSTANCE Sets a new application instance handle.
GWL_ID Sets a new identifier of the window.
GWL_USERDATA Sets the 32-bit value associated with the window. Each window has a corresponding 32-bit value intended for use by the application that created the window.


The following values are also available when the hWnd parameter identifies a dialog box: Value Action
DWL_DLGPROC Sets the new address of the dialog box procedure.
DWL_MSGRESULT Sets the return value of a message processed in the dialog box procedure.
DWL_USER Sets new extra information that is private to the application, such as handles or pointers.



dwNewLong
Specifies the replacement value.
Return Values
If the function succeeds, the return value is the previous value of the specified 32-bit integer.

If the function fails, the return value is zero. To get extended error information, callGetLastError.

If the previous value of the specified 32-bit integer is zero, and the function succeeds, the return value is zero, but the function does not clear the last error information. This makes it difficult to determine success or failure. To deal with this, you should clear the last error information by callingSetLastError(0) before calling SetWindowLong. Then, function failure will be indicated by a return value of zero and a GetLastError result that is nonzero.

Remarks
The SetWindowLong function fails if the window specified by the hWnd parameter does not belong to the same process as the calling thread.

Certain window data is cached, so changes you make using SetWindowLong will not take effect until you call the SetWindowPos function.

If you use SetWindowLong with the GWL_WNDPROC index to replace the window procedure, the window procedure must conform to the guidelines specified in the description of the WindowProc callback function.

If you use SetWindowLong with the DWL_MSGRESULT index to set the return value for a message processed by a dialog procedure, you should return TRUE directly afterwards. Otherwise, if you call any function that results in your dialog procedure receiving a window message, the nested window message could overwrite the return value you set using DWL_MSGRESULT.

Calling SetWindowLong with the GWL_WNDPROC index creates a subclass of the window class used to create the window. An application can subclass a system class, but should not subclass a window class created by another process. The SetWindowLong function creates the window subclass by changing the window procedure associated with a particular window class, causing the system to call the new window procedure instead of the previous one. An application must pass any messages not processed by the new window procedure to the previous window procedure by calling CallWindowProc. This allows the application to create a chain of window procedures.

Reserve extra window memory by specifying a nonzero value in the cbWndExtra member of the WNDCLASSEX structure used with the RegisterClassEx function.

You must not call SetWindowLong with the GWL_HWNDPARENT index to change the parent of a child window. Instead, use the SetParent function.

Windows CE: The nIndex parameter must be a multiple of 4 bytes.

Unaligned access is not supported.

The following nIndex parameter values are not supported:

GWL_HINSTANCE

GWL_HWNDPARENT

GWL_USERDATA

Windows CE versions 2.0 and later support the DWL_DLGPROC value in the nIndex parameter, but Windows CE 1.0 does not.

QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winuser.h.
Import Library: Use user32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.

See Also
Window Classes Overview, Window Class Functions, CallWindowProc, GetWindowLong, RegisterClassEx, SetParent, WindowProc, WNDCLASSEX


Ideal 2000-08-22
  • 打赏
  • 举报
回复
在 Win2000 中,想取密码,似乎有点玄——因为据说是加密了的缘故,也不知对不对。
yongxing 2000-08-22
  • 打赏
  • 举报
回复
Help me please.
yongxing 2000-08-22
  • 打赏
  • 举报
回复
不行的,老兄,我把下面这段翻译一下:
Remarks
The SetWindowLong function fails if the window specified by the hWnd parameter does not belong to the same process as the calling thread
备注:
如果由hWnd参数指定的窗口与调用线程不属于同一进程,将导致SetWindowLong函数失败。
xiaotiao 2000-08-22
  • 打赏
  • 举报
回复
因为在W2K中已经没有AllocCSAsDSSegment这样的函数,所以你根本就没有办法截获他在何处调用这个窗口的构造函数.
yongxing 2000-08-21
  • 打赏
  • 举报
回复
高手们,帮帮忙吧
yongxing 2000-08-21
  • 打赏
  • 举报
回复
Help me.
shines77 2000-08-21
  • 打赏
  • 举报
回复
关注高手
yongxing 2000-08-21
  • 打赏
  • 举报
回复
高手们,帮帮忙吧
Fenian 2000-08-21
  • 打赏
  • 举报
回复
care
yongxing 2000-08-21
  • 打赏
  • 举报
回复
如何更改Edit的属性?
是用BOOL SetProp(HWND hWnd,LPCTSTR lpString,HANDLE hData);吗?
我不知道“****”的属性用什么String表示。
DragonCheng 2000-08-21
  • 打赏
  • 举报
回复
直接将窗体属性改掉行吗
蝈蝈俊 2000-08-21
  • 打赏
  • 举报
回复
关注
Mover 2000-08-21
  • 打赏
  • 举报
回复
关注

16,470

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧