【发布时间】:2018-02-04 16:02:33
【问题描述】:
我尝试从 NSIS 调用中读取参数,例如:
MySQL::SetCredentials "localhost" 3306 "banananode" "root" ""
在方法上,我尝试使用popstring 获取第一个参数,就像 NSIS 上的示例代码一样:
LPTSTR mystringbuffer = (LPTSTR)GlobalAlloc(GPTR, (3 + string_size + 1) * sizeof(*mystringbuffer));
int test = popstring(mystringbuffer);
MessageBox(hWnd, mystringbuffer, TEXT("plug-in"), MB_OK);
GlobalFree(mystringbuffer);
但是popstring 只返回l 而不是localhost:
我曾尝试使用 getuservariable(INST_0) 作为示例,但在这里,它给了我一个空结果。
你能告诉我,有什么问题吗?
【问题讨论】:
标签: c++ nsis nsis-plugin