import functions with alias-names?

Started by HPW, December 17, 2003, 11:17:16 PM

Previous topic - Next topic

HPW

In other enviroments you can mostly specify an alias name for the imported function.



Example:

(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?

(set 'MSB MessageBoxA)

Yes, it is. So make it in the import-call and I can save one command.

Of cource optional!
Hans-Peter

HPW

#1
This would be quit nice to do this:

(context 'iSEDQPDF)
(import "iSEDQuickPDF.DLL" "iSEDNewDocument" "NewDoc")
(context 'MAIN)

Then I could use:

(iSEDQPDF:NewDoc)
Hans-Peter

Lutz

#2
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