Old 22nd September 2008, 10:00   #1
dr_z
Junior Member
 
Join Date: Sep 2008
Posts: 3
dll

How can I call a method from an external DLL and how to pass parameters correctly?
For example I have a function int Func1(int Param1) exported from mydll.dll, will the following code be correct
System::call “MyDll:Func1 (i 111) i.r0”?
dr_z is offline   Reply With Quote
Old 22nd September 2008, 16:48   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Yes, it will work as long as it can find the DLL.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 23rd September 2008, 05:29   #3
dr_z
Junior Member
 
Join Date: Sep 2008
Posts: 3
Both so
System::Call "TestDll::MyFunc(i 111) i.r5"
and so
System::Call "TestDll::MyFunc(i) i 111.r5"
or
System::Call "TestDll::MyFunc(i) i r0.r5"

data-ins are not transferred. In dll I write values of data-ins to a text file and if the number it is written 0 if string that " is transferred. Please help.
dr_z is offline   Reply With Quote
Old 23rd September 2008, 20:04   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
The calls are perfectly correct, but not real. I'd need a more detailed example to help you here.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 24th September 2008, 08:15   #5
dr_z
Junior Member
 
Join Date: Sep 2008
Posts: 3
For example how can I call function char * CharUpper(char *str1) from user32.dll?
dr_z is offline   Reply With Quote
Old 24th September 2008, 19:02   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
System::Call user32::CharUpper(tr0)t.r0

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump