Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8234051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:20:53+00:00 2026-06-07T18:20:53+00:00

I have made a very simple NSIS plugin that has one function in it.

  • 0

I have made a very simple NSIS plugin that has one function in it. I have successfully compiled the Win32 DLL project into a DLL then copied it to the directory C:\Program Files (x86)\NSIS\Plugins

My Problem: When I create .nsi script that calls a function from the dll I get a compile error saying Invalid command: tbox::myFunction

What am I doing wrong? Do I need to copy the tbox.lib file to the NSIS directory aswell or create a tbox.nsh file to include?

My dll’s name is tbox.dll, my nsi script is below and below that is my C++ DLL code:

    !include MUI2.nsh
    !include WinMessages.nsh

    Name    "aa.nsi"
    OutFile "aa.exe"
    Caption "${^Name}"
    ShowInstDetails show
    !define MUI_CUSTOMFUNCTION_GUIINIT   MyGUIInit

    Section "Dummy"
        MessageBox MB_ICONINFORMATION|MB_OKCANCEL "dvkjdkj"
        tbox::myFunction "abc" "def"
    SectionEnd

DLL Code:

#include "targetver.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#pragma comment(lib, "msimg32.lib")
#include <commctrl.h>
#include "TransparentCheckbox.h"
#include "NSIS/pluginapi.h"

HINSTANCE g_hInstance;
HWND g_hwndParent;
unsigned int g_stringsize;
stack_t **g_stacktop;
TCHAR *g_variables;

// To work with Unicode version of NSIS, please use TCHAR-type functions for accessing the variables and the stack.
HWND __declspec(dllexport) myFunction(HWND hwndParent, int string_size, TCHAR *variables, stack_t **stacktop, extra_parameters *extra)
{
  g_hwndParent=hwndParent;
  EXDLL_INIT();

  {
    TCHAR buf[1024];
    wsprintf(buf,TEXT("string_size=%d, variables=%s\n"), string_size, variables);
    MessageBox(g_hwndParent,buf,0,MB_OK);
  }

  return g_hwndParent;
}

BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
{
  g_hInstance = (HINSTANCE)hInst;
  return TRUE;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T18:20:55+00:00Added an answer on June 7, 2026 at 6:20 pm

    Makensis lists all plugins and their exported functions when you compile.

    If your plugin is not listed then it is not in the correct directory or has no exports at all. If it is listed but has the wrong name (tbox::_myFunction or tbox::myFunction@xyz) then you have a decoration problem. You can try extern "C" HWND __declspec(dllexport) __cdecl myFunction(..., if that is not enough you might need a .def file.

    You can also take a look at the exports with Dependency Walker…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a VERY simple C# Winforms project that I made using Visual Studio
i have made a very simple labview VI which has an activeX component in
I have made a deployment project for my very simple .Net 4.0 C# Winforms
I have made a very simple project in Xcode 4 where I connected 4
I have very simple problem. I made a very simple function for you to
I have a very simple SQL query that I made which retrieves some user
I have a very simple makefile, that basically does the following: # Pre-compiled header
I have made a very simple AppleScript to close tabs in Safari. The problem
I have a custom listview and made overlapping very simple: in onDraw method, I
in my application I made a very simple binding. I have a NSMutableArray bound

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.