strcpy(r, "putty.hlp");
strcpy(r, PUTTY_HELP_FILE);
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show){    int argc;    char **argv;    split_into_argv(cmdline, &argc, &argv, NULL);    if (argc > 0) {	/*	 * Assume the first argument to be a private key file, and	 * attempt to load it.	 */	cmdline_keyfile = argv[0];    }    InitCommonControls();    hinst = inst;    /*     * See if we can find our Help file.     */    {        char b[2048], *p, *q, *r;        FILE *fp;        GetModuleFileName(NULL, b, sizeof(b) - 1);        r = b;        p = strrchr(b, '\\');        if (p && p >= r) r = p+1;        q = strrchr(b, ':');        if (q && q >= r) r = q+1;        strcpy(r, "putty.hlp");        if ( (fp = fopen(b, "r")) != NULL) {            help_path = dupstr(b);            fclose(fp);        } else            help_path = NULL;    }    random_ref();    return DialogBox(hinst, MAKEINTRESOURCE(201), NULL,		     MainDlgProc) != IDOK;}