Old 18th August 2003, 21:06   #1
metatr0n
Junior Member
 
Join Date: Aug 2003
Location: Lawrence, Kansas
Posts: 1
Send a message via ICQ to metatr0n Send a message via AIM to metatr0n Send a message via Yahoo to metatr0n
n00b in need of some system.dll assistance

I've combed over docs/archive/forum as best I can and am still at a loss on how to properly use system.dll. First and foremost, how does one include the dll in the NSIS install script? Once that's accomplished, I assume that you can write functions that call on system.dll for various things (like free memory, cpu type, etc.)? If there's some pre-existing and realistic example script out there, plase direct me towards it. FWIW, I'm trying to get my installer to pick up basic computer information as part of on optional survey.

Overall, I must say I'm very impressed with NSIS, so much that I got my employer to drop WISE.

Thanks in advance.

- Seth
metatr0n is offline   Reply With Quote
Old 18th August 2003, 21:35   #2
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
Are you familiar to the API concept?
If you are Visual Basic, C++ or other programming language
you'll notice that sometimes you need api calls...


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 18th August 2003, 22:35   #3
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
For example:
code:

Declare Function GetSystemMetrics Lib "user32" Alias "GetSystemMetrics" (ByVal nIndex As Long) As Long


It's a Visual Basic 6 typical API declaration.
In system words:
code:

System::Call 'user32::GetSystemMetrics(i 43) i .r0'


43 will detect the number of buttons in your mouse...
code:

OutFile "NumberMouseButtons.exe"
Name "Number of Mouse Buttons"
Caption "Number of Mouse Buttons"
XPStyle "on"

Function ".onInit"
System::Call 'user32::GetSystemMetrics(i 43) i .r0'
Messagebox MB_OK "$0"
Quit
FunctionEnd

Section "-boo"
;
SectionEnd



* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel 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