Hi guys, i'm newby on nsis programming.
i'm trying to call a method of dll from nsis using system plugin but i always get a chaine of char 'error' like value in the register of the result.
check is the name of dll
Code:
System::Call 'check::Sum(i, i) i (R0, R1) .R3'
and the prototype of function Sum is
int Sum(int s1, int s2)
i'm using the function Sum just to try if system:call works..
what's wrong in my code???
May someone help me????
thks
Problem with external dll
4 posts
Use http://www.dependencywalker.com/ and make sure the exported function name is not decorated.
If the function is cdecl and not stdcall then you need to to use a switch, check the system readme.
Is this dll in the path so it can be found by LoadLibrary?
If the function is cdecl and not stdcall then you need to to use a switch, check the system readme.
Is this dll in the path so it can be found by LoadLibrary?
The libray is found by the progam.
I find the problem. VS2008 has created the library with non solved dipendecies, so i can't call correctly the functions in the dll.
Now i have another problem:
when i call the method of dll with systrem:call and i use .rX or .s the program rise a runtime error and stop working.
Why i have an error using . before registry or stack?
Have you any idea about this stuff?
tnk
I find the problem. VS2008 has created the library with non solved dipendecies, so i can't call correctly the functions in the dll.
Now i have another problem:
when i call the method of dll with systrem:call and i use .rX or .s the program rise a runtime error and stop working.
Why i have an error using . before registry or stack?
Have you any idea about this stuff?
tnk
.rX means no input, so if you have MyFunc(char*foo) then foo will be 0 and not a string in your function. It is generally used like this: For void GetNumber(int*num){*num=666;} you would use System::Call "dll::GetNumber(*i.r0)"