Skip to content
⌘ NSIS Forum Archive

Call to a dll function without System::Call

4 posts

r2du-soft#

Call to a dll function without System::Call

hi
i easily call to with system::call with this code:

System::Call "r2duEnc::EncSection(t 'ABCD',t 'ABCD')" 
now i copy that dll to plugins and i try to call them with code:

r2duEnc::EncSection 'abcd' 'abcd' 
but after compile and run nsis .exe file program has stop working....

if my codes its wrong?!
my dll have two parameter....
thanks
Anders#
A exported function must follow the NSIS plugin ABI to work as a plugin call, see \Contrib\ExDll\ in the NSIS source tree.

Your System:: Call syntax is also probably wrong, you must export A/W functions to use the t type.
r2du-soft#
Originally Posted by Anders View Post
A exported function must follow the NSIS plugin ABI to work as a plugin call, see \Contrib\ExDll\ in the NSIS source tree.

Your System:: Call syntax is also probably wrong, you must export A/W functions to use the t type.
Thanks mr anders
Butvsystem::call with syntax t work for me easily withiut a/w !!!!!!!!
I how can use a/w?
Anders#
A Windows function like MessageBox actually exists as two functions: MessageBoxA(...,char* text,...) and MessageBoxW(...,WCHAR*text,...) and the t type picks the right one based on the Unicode attribute in your .nsi.

If your function in C looks like EncSection(char*,char*) then you should use the m (multibyte) string type.