NSIS 3.0 .1正式版汉化增强版内含图文教程


NSIS3.0.1官方增强版,内含汉化以及详细图文教程。免安装
资源截图
代码片段和文件信息
#include 
#include  // nsis plugin

HINSTANCE g_hInstance;
HWND g_hwndParent;

// To work with Unicode version of NSIS please use TCHAR-type
// functions for accessing the variables and the stack.

void __declspec(dllexport) myFunction(HWND hwndParent int string_size 
                                      LPTSTR variables stack_t **stacktop
                                      extra_parameters *extra ...)
{
  EXDLL_INIT();
  g_hwndParent = hwndParent;


  // note if you want parameters from the stack pop them off in order.
  // i.e. if you are called via exdll::myFunction file.dat read.txt
  // calling popstring() the first time would give you file.dat
  // and the second time would give you read.txt. 
  // you should empty the stack of your parameters and ONLY your
  // parameters.

  // do your stuff here
  {
    LPTSTR msgbuf = (LPTSTR) GlobalAlloc(GPTR (3 + string_size + 1) * sizeof(*msgbuf));
    if (msgbuf)
    {
      wsprintf(msgbuf TEXT(“$0=%s“) getuservariable(INST_0));
      MessageBox(g_hwndParent msgbuf TEXT(“Message from example plugin“) MB_OK);
      GlobalFree(msgbuf);
    }
  }
}


BOOL WINAPI DllMain(HINSTANCE hInst ULONG ul_reason_for_call LPVOID lpReserved)
{
  g_hInstance = hInst;
  return TRUE;
}

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)