view netinstall/mklink2.c @ 5069:14f0dd1fabdb

move test-harness to lisp/ directory so it gets byte-compiled -------------------- ChangeLog entries follow: -------------------- etc/ChangeLog addition: 2010-02-22 Ben Wing <ben@xemacs.org> * dbxrc.in: test-harness.el is in lisp directory now. lisp/ChangeLog addition: 2010-02-22 Ben Wing <ben@xemacs.org> * test-harness.el: * test-harness.el (test-harness-from-buffer): * test-harness.el (batch-test-emacs): Move file from tests/automated into lisp/ so it gets byte-compiled. This significantly reduces the amount of extra crap in outputted backtraces. Delete hack in batch-test-emacs to look for test-harness.el in the test directory since it's not there any more. Also, in `Check-Message', incorporate call to `Skip-Test-Unless' in the macro output rather than its body, to avoid problems byte- compiling the file -- `Skip-Test-Unless' isn't available in the environment during byte-compilation so we can't call it then. src/ChangeLog addition: 2010-02-22 Ben Wing <ben@xemacs.org> * .gdbinit.in.in: * Makefile.in.in (batch_test_emacs): test-harness.el is in lisp directory now so change how we call it.
author Ben Wing <ben@xemacs.org>
date Mon, 22 Feb 2010 22:04:55 -0600
parents 3078fd1074e8
children
line wrap: on
line source

#include "win32.h"
#include "shlobj.h"

/* This part of the code must be in C because the C++ interface to COM
doesn't work. */

void
make_link_2 (char *exepath, char *args, char *icon, char *lname)
{
  IShellLink *sl;
  IPersistFile *pf;
  WCHAR widepath [_MAX_PATH];

  CoCreateInstance (&CLSID_ShellLink, NULL,
		    CLSCTX_INPROC_SERVER, &IID_IShellLink, (LPVOID *) & sl);
  sl->lpVtbl->QueryInterface (sl, &IID_IPersistFile, (void **) &pf);

  sl->lpVtbl->SetPath (sl, exepath);
  sl->lpVtbl->SetArguments (sl, args);
  sl->lpVtbl->SetIconLocation (sl, icon, 0);

  MultiByteToWideChar (CP_ACP, 0, lname, -1, widepath, _MAX_PATH);
  pf->lpVtbl->Save (pf, widepath, TRUE);

  pf->lpVtbl->Release (pf);
  sl->lpVtbl->Release (sl);
}