View Single Post
Old 15th April 2011, 23:27   #4
rebot
Junior Member
 
Join Date: Apr 2011
Posts: 6
Unicode NSIS with Unicode RealProgress plugin.

From the call to plugin:
RealProgress:etailProgress /NOUNLOAD 30 40

Debugging the plugin code...in the function

int popstring(TCHAR *str, int len)
{
stack_t *th;

if (!g_stacktop || !*g_stacktop) return 1;
th=(*g_stacktop);
lstrcpyn(str, th->text, len);
*g_stacktop=th->next;
GlobalFree((HGLOBAL)th);
return 0;
}

str is returning '3' (as opposed to '30') when called from the DetailProgress function...

extern "C"
void __declspec(dllexport) DetailProgress(HWND hWndParent, int string_size,
TCHAR *variables, stack_t **stacktop,
extra_parameters *extra)
{
g_hWndParent=hWndParent;

EXDLL_INIT();
{
TCHAR szParam[8];

// Attempt to get a parameter.
if (popstring(szParam, 8) == 0)
{

//szParam evaluated at this point is '3'
//MessageBox(hWndParent, szParam, "Add szParam", MB_OK);


// Get the number of details to be printed.
g_iProgressBarAdd = str2int(szParam);

.
.
etc.
rebot is offline   Reply With Quote