Remove pluginapi.c's dependency on nsis_tchar.h

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6531 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2014-07-19 20:56:12 +00:00
parent 9950ce1432
commit 913d5a62b2
3 changed files with 77 additions and 61 deletions

View file

@ -1,5 +1,8 @@
#include <windows.h>
#include <nsis/pluginapi.h> // nsis plugin
#ifndef _TCHAR_DEFINED
#include <tchar.h>
#endif
HINSTANCE g_hInstance;
@ -26,8 +29,8 @@ void __declspec(dllexport) myFunction(HWND hwndParent, int string_size,
// do your stuff here
{
TCHAR buf[1024];
wsprintf(buf,_T("$0=%s\n"),getuservariable(INST_0));
TCHAR buf[3+1024+1]; // A real plugin should use string_size and not 1024!
wsprintf(buf,TEXT("$0=%.1024s"),getuservariable(INST_0));
MessageBox(g_hwndParent,buf,0,MB_OK);
}
}