|
[讨论]XP启动时执行AUTOEXEC.BAT吗[已解决]
如果安装的是WinXP, 系统根目录下的Io.sys, msdos.sys, autoexec.bat,config.sys等都是空文件,在msconfig系统配置程序里也见不到"处理autoexec.bat"的选项了,猜想xp下这几个文件已经没有用处了 |
|
[求助]一个简单的汇编问题。
LENGTH不是指令, 只是一个伪指令 |
|
[求助]一个简单的汇编问题。
LENGTH是MASM的保留字, 换个名吧 |
|
[求助]请问如何监视系统创建了一个新的进程?
可以考虑hook某些API |
|
自定义函数可否返回一个WORD类型?
返回类型只是一个逻辑上的概念而已,具体还要看调用函数caller是怎么看待的 例如被调函数把返回值放在eax中,但是调用函数却把ax看作返回值,这在语法上没有任何问题,只是逻辑上会产生问题 |
|
[已解决]如何编程得到PE文件的版权信息?
有的 version.dll中有3个函数可用,如果用汇编语言写程序的话要 include version.inc includelib version.lib 它们是: GetFileVersionSize GetFileVersionInfo VerQueryValue 具体用法可以查找msdn |
|
请教,如果获得 ML.exe 的输出信息?
管道是windows环境下进程之间相互通信的手段之一,它实际上是一段共享的内存区,进程把共享消息放在那里。并通过一些 API 提供信息交换。管道是两个头的东西,每个头各连接一个进程或者同一个进程的不同代码。使用管道的好处在于:读写它使用的是对文件操作的 api,结果操作管道就和操作文件一样。即使你在不同的计算机之间用命名管道来通信,你也不必了解和自己去实现网络间通信的具体细节。 命名管道是由服务器端的进程建立的,管道的命名必须遵循特定的命名方法,就是 "\\.\pipe\管道名",当作为客户端的进程要使用时,使用"\\计算机名\\pipe\管道名" 来打开使用,具体步骤如下: 服务端通过函数 CreateNamedPipe 创建一个命名管道的实例并返回用于今后操作的句柄,或为已存在的管道创建新的实例。 服务端侦听来自客户端的连接请求,该功能通过 ConnectNamedPipe 函数实现。 客户端通过函数 WaitNamedPipe 来等待管道的出现,如果在超时值变为零以前,有一个管道可以使用,则 WaitNamedPipe 将返回 True,并通过调用 CreateFile 或 CallNamedPipe 来呼叫对服务端的连接。 此时服务端将接受客户端的连接请求,成功建立连接,服务端 ConnectNamedPipe 返回 True建立连接之后,客户端与服务器端即可通过 ReadFile 和 WriteFile,利用得到的管道文件句柄,彼此间进行信息交换。 当客户端与服务端的通信结束,客户端调用 CloseFile,服务端接着调用 DisconnectNamedPipe。最后调用函数CloseHandle来关闭该管道。 一个控制台有三个句柄:标准输入、标准输出和和标准错误句柄,标准输入、标准输出句柄是可以重新定向的,你可以用匿名管道来代替它,这样一来,你可以在管道的另一端用别的进程来接收或输入,而控制台一方并没有感到什么不同,就象 Dos 下的 > 或者 < 可以重新定向输出或输入一样。通常控制台程序的输入输出如下: (控制台进程output) write ----> 标准输出设备(一般是屏幕) (控制台进程input) read <---- 标准输入设备(一般是键盘) 而用管道代替后: (作为子进程的控制台进程output) write ----> 管道1 ----> read (父进程) (作为子进程的控制台进程input) read <----> 管道2 <---- write (父进程) 使用匿名管道的步骤如下: 使用 CreatePipe 建立两个管道,得到管道句柄,一个用来输入,一个用来输出 准备执行控制台子进程,首先使用 GetStartupInfo 得到 StartupInfo 使用第一个管道句柄代替 StartupInfo 中的 hStdInput,第二个代替 hStdOutput、hStdError,即标准输入、输出、错误句柄 使用 CreateProcess 执行子进程,这样建立的子进程输入和输出就被定向到管道中 父进程通过 ReadFile 读第二个管道来获得子进程的输出,通过 WriteFile 写第一个管道来将输入写到子进程 父进程可以通过 PeekNamedPipe 来查询子进程有没有输出 子进程结束后,要通过 CloseHandle 来关闭两个管道。 节选自罗云彬的win32汇编教程 |
|
请教,如果获得 ML.exe 的输出信息?
可以使用管道来获取ml.exe的输出信息 |
|
[求助]vc下ReadProcessMemory如果要读宽字符(Unicode)该怎么处理?
可以用WideCharToMultiByte函数转换成MBCS |
|
汇编问题:没有类型名如何定义一个该类型的变量
最初由 小虾 发布 应该是吧,6.14版我没有试过 新版的ml.exe兼容性很不好,编译时居然说windows.inc文件中某结构声明有错误,没办法,只好自己把那个结构重写一下 |
|
汇编问题:没有类型名如何定义一个该类型的变量
据我试验, 汇编语言的结构是可以嵌套定义的, 例如: EEE STRUCT STRUCT BBB a DD ? b DD ? ENDS d DD ? EEE ENDS ......... ......... .data q EEE <<5, 6>, 7> ......... .code ...... mov eax, q.BBB.b 我用的ML为8.00.50727.42版 如果可以的话, 楼主的结构可以定义如下: CELLREC STRUCT attrib BYTE ? UNION v text BYTE 201 DUP (?) value DWORD ? STRUCT f fvalue DWORD ? formula BYTE 201 DUP (?) ENDS ENDS CELLREC ENDS |
|
有没有遇到循环引用的情形?
有的, 例如C语言里 struct B; struct A { struct B* pB; int n; }; struct B { struct A* pA int n; }; |
|
|
|
如何编程完成如下功能:启动一个程序,向其中的编辑框中送一个字符串,然后......
用快照函数枚举进程然后找出QQ的方法也是可以的 |
|
[求助]VirtualQueryEx函数中有个参数不知道怎么用啊???
VirtualQueryEx是查询内存页属性的 第二个参数是欲查询的那个页面中的某个线性地址 一页是4KB大小, 只要指定了这4KB中的任何一个线性地址就会返回整个页面的信息 如果试图查询内核模式下的页面(如线性地址80000000h以上的内存页), 函数会执行失败 |
|
[求助]有一些看不明白,请大家帮忙下!
LoadImage Function -------------------------------------------------------------------------------- The LoadImage function loads an icon, cursor, animated cursor, or bitmap. Syntax HANDLE LoadImage( HINSTANCE hinst, LPCTSTR lpszName, UINT uType, int cxDesired, int cyDesired, UINT fuLoad ); Parameters hinst [in] Handle to an instance of the module that contains the image to be loaded. To load an OEM image, set this parameter to zero. lpszName [in] Specifies the image to load. If the hinst parameter is non-NULL and the fuLoad parameter omits LR_LOADFROMFILE, lpszName specifies the image resource in the hinst module. If the image resource is to be loaded by name, the lpszName parameter is a pointer to a null-terminated string that contains the name of the image resource. If the image resource is to be loaded by ordinal, use the MAKEINTRESOURCE macro to convert the image ordinal into a form that can be passed to the LoadImage function. If the hinst parameter is NULL and the fuLoad parameter omits the LR_LOADFROMFILE value, the lpszName specifies the OEM image to load. The OEM image identifiers are defined in Winuser.h and have the following prefixes. OBM_ OEM bitmaps OIC_ OEM icons OCR_ OEM cursors To pass these constants to the LoadImage function, use the MAKEINTRESOURCE macro. For example, to load the OCR_NORMAL cursor, pass MAKEINTRESOURCE(OCR_NORMAL) as the lpszName parameter and NULL as the hinst parameter. If the fuLoad parameter includes the LR_LOADFROMFILE value, lpszName is the name of the file that contains the image. uType [in] Specifies the type of image to be loaded. This parameter can be one of the following values. IMAGE_BITMAP Loads a bitmap. IMAGE_CURSOR Loads a cursor. IMAGE_ICON Loads an icon. cxDesired [in] Specifies the width, in pixels, of the icon or cursor. If this parameter is zero and the fuLoad parameter is LR_DEFAULTSIZE, the function uses the SM_CXICON or SM_CXCURSOR system metric value to set the width. If this parameter is zero and LR_DEFAULTSIZE is not used, the function uses the actual resource width. cyDesired [in] Specifies the height, in pixels, of the icon or cursor. If this parameter is zero and the fuLoad parameter is LR_DEFAULTSIZE, the function uses the SM_CYICON or SM_CYCURSOR system metric value to set the height. If this parameter is zero and LR_DEFAULTSIZE is not used, the function uses the actual resource height. fuLoad [in] This parameter can be one or more of the following values. LR_DEFAULTCOLOR The default flag; it does nothing. All it means is "not LR_MONOCHROME". LR_CREATEDIBSECTION When the uType parameter specifies IMAGE_BITMAP, causes the function to return a DIB section bitmap rather than a compatible bitmap. This flag is useful for loading a bitmap without mapping it to the colors of the display device. LR_DEFAULTSIZE Uses the width or height specified by the system metric values for cursors or icons, if the cxDesired or cyDesired values are set to zero. If this flag is not specified and cxDesired and cyDesired are set to zero, the function uses the actual resource size. If the resource contains multiple images, the function uses the size of the first image. LR_LOADFROMFILE Loads the image from the file specified by the lpszName parameter. If this flag is not specified, lpszName is the name of the resource. LR_LOADMAP3DCOLORS Searches the color table for the image and replaces the following shades of gray with the corresponding 3-D color: Color Replaced with Dk Gray, RGB(128,128,128) COLOR_3DSHADOW Gray, RGB(192,192,192) COLOR_3DFACE Lt Gray, RGB(223,223,223) COLOR_3DLIGHT Do not use this option if you are loading a bitmap with a color depth greater than 8bpp. LR_LOADTRANSPARENT Retrieves the color value of the first pixel in the image and replaces the corresponding entry in the color table with the default window color (COLOR_WINDOW). All pixels in the image that use that entry become the default window color. This value applies only to images that have corresponding color tables. Do not use this option if you are loading a bitmap with a color depth greater than 8bpp. If fuLoad includes both the LR_LOADTRANSPARENT and LR_LOADMAP3DCOLORS values, LRLOADTRANSPARENT takes precedence. However, the color table entry is replaced with COLOR_3DFACE rather than COLOR_WINDOW. LR_MONOCHROME Loads the image in black and white. LR_SHARED Shares the image handle if the image is loaded multiple times. If LR_SHARED is not set, a second call to LoadImage for the same resource will load the image again and return a different handle. When you use this flag, the system will destroy the resource when it is no longer needed. Do not use LR_SHARED for images that have non-standard sizes, that may change after loading, or that are loaded from a file. When loading a system icon or cursor, you must use LR_SHARED or the function will fail to load the resource. Windows 95/98/Me: The function finds the first image with the requested resource name in the cache, regardless of the size requested. LR_VGACOLOR Uses true VGA colors. Return Value If the function succeeds, the return value is the handle of the newly loaded image. If the function fails, the return value is NULL. To get extended error information, call . Remarks When you are finished using a bitmap, cursor, or icon you loaded without specifying the LR_SHARED flag, you can release its associated memory by calling one of the functions in the following table. Resource Release function Bitmap DeleteObject Cursor DestroyCursor Icon DestroyIcon The system automatically deletes these resources when the process that created them terminates, however, calling the appropriate function saves memory and decreases the size of the process's working set. Windows 95/98/Me: LoadImageW is supported by the Microsoft® Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems. Example For an example, see Using Window Classes. Function Information Header Declared in Winuser.h, include Windows.h Import library User32.lib Minimum operating systems Windows 95, Windows NT 4.0 Unicode Implemented as Unicode and ANSI versions on Windows NT, Windows 2000, Windows XP See Also Resources Overview, CopyImage, GetSystemMetrics, LoadBitmap, LoadCursor, LoadIcon |
|
[求助]请教如何在win32下使用ListBox控件?(C++)
向ListBox发送LB_INSERTSTRING消息 |
|
|
|
请教,这几个C结构用MASM32结构怎么写?
xlref struct fwFirst WORD ? rwLast WORD ? colFirst BYTE ? colLast BYTE ? xlref ends XLREF typedef xlref LPXLREF typedef far ptr xlref 依此类推 结构中的struct格式如下 struct 结构名 ;结构 定义 ends |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值