救急,查看一个DLL中的函数参数(hha.dll的函数参数说明),怎么搞,多谢各位了 /BY 云儿飞飞 (100分)

  • 主题发起人 主题发起人 YunEr
  • 开始时间 开始时间
Y

YunEr

Unregistered / Unconfirmed
GUEST, unregistred user!
想做一个东东,需要编译一堆网页,生成CHM的东东,因为是自动的编译,
需要嵌入MS的HTMLHELP WORKSHOP的编译功能,也可以类似的方案,只要
达到能将一堆HTML文件生成MS的那种CHM文件即可。

或者告之如何查看hha.dll中的函数参数说明,
或者如何查看DLL中的函数参数,注意是函数参数,而不是函数名称啊。

请各位大虾帮助啊,

分数大大的有,先给100分,如果解决了,再付200分。
 
关注这个问题
 
找到这个资料,希望对你有用

The new HtmlHelp system is a great way to write you online documentation if you
already know HTML. But then, how do you call it from your application ?
I hacked this short module for LabWindows in order to display contextual help,
the ChmHelp() function is similar to the SystemHelp() function and if defined
in HtmlHelp.h. Note, you need to include HtmlHelp.lib and Advapi32.lib to you
project. You need the Microsoft HtmlHelp workshop in order to get those
libraries (and to compile chm files).

Two source files: ChmHelp.h and ChmHelp.c.

Category: Windows 95 + IE4, sample C source code

//head file
#ifndef _CHM_HELP
#define _CHM_HELP

#include < HtmlHelp.h>

extern int ChmHelp(const char* Context);
extern void QuitChmHelp(void);

#endif


//.c
/******************************************************************************
MODULE: CHM_HELP.C
PURPOSE: Gives context sensitive help using HtmlHelp CHM files
To display a particular topic, call the ChmHelp function of this module
with the name of the html file to display
Help("Topic.html");

For more help on building help files for Windows98, see:
http://msdn.microsoft.com/msdn-online/workshop/author/htmlhelp/
download and install the HtmlHelp Workshop.

IMPORTANT: the file HelpFile.chm must be in the same directory than the program
NOTE: context sensitive help using constant numbers does not work
******************************************************************************/
#include <Windows.h> // (Or WinUser ?) Definitions for HtmlHelp.h
#include <userint.h>

#include "ChmHelp.h"

static char HelpFile[MAX_PATHNAME_LEN];
static BOOL MainHelpWindowIsOpen=FALSE;
static int WH=-1;
static int CallbackID=0;
static int WinMsgNum;
static char* ChmFile="HelpFile.chm";

// When is this called ?!?
static void HelpCallback(unsigned int wParam, unsigned lParam, void *callbackData) {
Breakpoint();
}

/******************************************************************************
FUNCTION: ChmHelp
PURPOSE: Launch the Windows help with the appropriate context file
IN: Context: name of the html file part of the chm file to display
RETURN: FALSE on failure
******************************************************************************/
int ChmHelp(const char* Context) {
HWND Ret;
char File[MAX_PATHNAME_LEN];
if (!MainHelpWindowIsOpen) {
if (GetFullPathFromProject (ChmFile, HelpFile)==-1) {
MessagePopup("Error !", "Unable to find file HelpFile.CHM in current directory.");
return FALSE;
}
//if (Command==HELP_CONTEXTPOPUP) Command=HH_HELP_CONTEXT;
WH=GetCVIWindowHandle ();
WinMsgNum = RegisterWinMsgCallback (HelpCallback, NULL, 0, 0, &CallbackID, 1);
MainHelpWindowIsOpen=TRUE;
}

strcpy(File, "mk:@MSITStore:"); // ??? Buggy without it
strcat(File, HelpFile);
strcat(File, "::/");
strcat(File, Context);

Ret=HtmlHelp((HWND)WH, /*Help*/File, HH_DISPLAY_TOPIC, 0/*(DWORD)File*/);
return TRUE;
}

/******************************************************************************
FUNCTION: QuitHelp
PURPOSE: Should be called when quitting the main program. This will close the CHM window
******************************************************************************/
void QuitChmHelp(void) {
HtmlHelp((HWND)WH, HelpFile, HH_CLOSE_ALL, 0); // Closing the Help window
if (CallbackID!=0) UnRegisterWinMsgCallback(CallbackID);
//SystemHelp (HelpFile, HELP_QUIT, 0, 0);
MainHelpWindowIsOpen=FALSE;
WH=-1;
}


 
TO amo
非常感谢,可是,和我的要求还是有差距。
我主要是想得到hha.dll中的那个编译生成CHM的函数的参数说明。
 
TO amo
今天上班查了一下午MSDN,都没有这个hha.dll的函数的参数说明。

好象这个东东是MS的秘密一样啊,网上几乎找不到呢。
现在唯一能做的是拿DLL开刀了。
 
注意那个htmlhelp.h就包括了函数声明

http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q186907&

HOWTO: Set Up Visual C++ to Use the HTML Help API
The information in this article applies to:
Microsoft Visual C++, 32-bit Enterprise Edition 4.2, 4.2b, 5.0, 6.0
Microsoft Visual C++, 32-bit Professional Edition 4.2, 4.2b, 5.0, 6.0
Microsoft Visual C++, 32-bit Learning Edition 6.0
Microsoft HTML Help 1.3, 1.21

SummaryThis article describes the steps that must be performed in order to use
the HTML Help API with Visual C++.
More Information
1.Include Htmlhelp.h in any source file that uses the HTML Help
API. Add Htmlhelp.h to the .cpp file where the HTML Help API is invoked or in
the include file for that .cpp file.

2.Show Visual C++ where to find Htmlhelp.h; it is installed with the HTML Help
Workshop in the <HTML Help Workshop Path>/Include directory. Specify this
location for Visual C++ as follows:


3.On the Tools menu, click Options.
In the Options dialog box, click the Directories tab.
In the Show Directories For list, click Include Files.
Type the location of the HTML Help Workshop's include directory in the
Directories box.
Make sure you use Htmlhelp.lib when linking.

4.Show Visual C++ where to find the HTML Help library, located in the
<HTML Help Workshop Path>/lib. Specify this location in Visual C++ by
returning to the Directories tab described in step 2:
a.In the Show Directories For list, click Library Files.
b.Type the location of the HTML Help Workshop's library directory in the
Directories box.

5.Next, add the chosen library to the Visual C++ project settings, as follows:
a.On the Project menu, click Settings.
b.After the Settings dialog box appears, click the Link tab.
c.Select General in the Category list, and then type the name of the Html Help
library in the Object/Library Modules box.

6.When building the project, the following warning message may appear:

..default lib LIBCMT conflicts with use of other libs; use /NODEFAULTLIB:library.
Follow the procedure in step 5 to return to the Link tab in the Settings dialog box:


In the Category list, click Input.
Then type LIBCMT in the Ignore Libraries box.
This method disables the default library search, so if any of the default
libraries are being used, they must now be explicitly listed.
The Visual C++ project can now call the HTML Help API successfully.
ReferencesHTML Help Workshop: Online Help HTML Help Web Site:
hhttp://msdn.microsoft.com/workshop/Author/htmlhelp/
"Official Microsoft HTML Help Authoring Kit" by Steve Wexler, Microsoft Press
 
amo兄
要的是HHA_CompileHHP这个函数,在MS的这个LIB中是没有的
 
msdn上有个包。
 
BlackDragon兄,
哪个包,按那个东东搜啊?谢谢啊,
 
你要编译hhp啊?
直接用
hhc.exe ***.hhp
搞定了.
 
前些日子我也研究这个,用SOFTICE+IDA,我终于搞懂咯。
type
PCallBack = ^TCallBack;
TCallBack = procedure(AMessage:PChar);
procedure HHA_CompileHHP(AFileName:PChar;AMessage,AStatus:PCallBack;Reserve:Integer=0);stdcall;

AFileName:要编译的HtmlHelp的工程文件名(*.hhp)
AMessage:返回编译信息
AStatus:返回状态信息
最后一个不能确定是什么,但除了0以外什么都出错.
 
不错,很利害。呵呵。
 
TO BlackDragon
OK,多谢了兄台,我会试试这个方法的

TO BeginDelphi
佩服,兄弟,我记下来了,明天试一下。
我更感兴趣你怎么弄出来的,这个过程很重要,能不能大概写一下,
感激不尽,分数另外发题目给你。

这个问题分数马上加到300分
 
原来不能修改分数啊,那只好在另外开题加本问题的分了。
 
BeginDelphi,介绍一下经验吧,感激不尽!
 
我有一个工具,可导出c的头文件,想要联系

3368aa@sina.com
 
BlackDragon兄的方法可行,只是要执行一个命令。可作为备选方案,谢谢!
BeginDelphi,好象调用会出错啊。你怎样得到参数的呢?
 
直接调用hhc.exe 进行处理啊,hhc.exe可以传递参数的。
我就这样做的,呵呵。
 

Similar threads

后退
顶部