The R Project SVN R

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6098 pd 1
/*
2
Can be built with VC++6 by
3
cl /MT /Ox /c Rchtml.c
4
link /dll /out:Rchtml.dll Rchtml.obj user32.lib htmlhelp.lib advapi32.lib
5
*/
6
 
7
#include <windows.h>
8
#include <htmlhelp.h>
9
 
10
static char htmlref[256];
11
 
12
__declspec(dllexport) void Rchtml(char **file, char **ptopic, int *error)
13
{
14
    char *topic =*ptopic;
15
    HWND rc;
16
 
17
    strcpy(htmlref, *file);
18
    if(topic && strlen(topic)) {
19
	strcat(htmlref, "::/");
20
	strcat(htmlref, topic);
21
	strcat(htmlref, ".html");
22
    }
23
    rc = HtmlHelp(GetDesktopWindow(), htmlref, HH_DISPLAY_TOPIC, 0);
24
    *error = (rc == (HWND)NULL);
25
}