Page 1 of 1

import functions with alias-names?

Posted: Thu Dec 18, 2003 7:17 am
by HPW
In other enviroments you can mostly specify an alias name for the imported function.

Example:

Code: Select all

(import "user32.dll" "MessageBoxA" "MSB") 
(MSB 0 "This is the body" "Caption" 1) 
Another point where things can get smaller!
Just a thought.

Or is it this?

Code: Select all

(set 'MSB MessageBoxA)
Yes, it is. So make it in the import-call and I can save one command.
Of cource optional!

Posted: Thu Dec 18, 2003 7:52 am
by HPW
This would be quit nice to do this:

Code: Select all

(context 'iSEDQPDF)
(import "iSEDQuickPDF.DLL" "iSEDNewDocument" "NewDoc")
(context 'MAIN)
Then I could use:

Code: Select all

(iSEDQPDF:NewDoc)

Posted: Thu Dec 18, 2003 4:03 pm
by Lutz
try this:

(set 'Win:Clock (import "kernel32.dll" "GetTickCount"))

(Win:Clock) => 1312656

You don't need to do (context 'Win) at first. The 'set' statement with a context creates the context automatically.

Lutz