equal
deleted
inserted
replaced
232 |
232 |
233 linkToModule |
233 linkToModule |
234 "link this function to the external module. |
234 "link this function to the external module. |
235 I.e. retrieve the module handle and the code pointer." |
235 I.e. retrieve the module handle and the code pointer." |
236 |
236 |
237 |handle| |
237 |handle functionName| |
238 |
238 |
239 moduleName isNil ifTrue:[ |
239 moduleName isNil ifTrue:[ |
240 self error:'Missing moduleName'. |
240 self error:'Missing moduleName'. |
241 ]. |
241 ]. |
242 moduleHandle isNil ifTrue:[ |
242 moduleHandle isNil ifTrue:[ |
250 ]. |
250 ]. |
251 moduleHandle := handle. |
251 moduleHandle := handle. |
252 ]. |
252 ]. |
253 name isNumber ifFalse:[ |
253 name isNumber ifFalse:[ |
254 (moduleHandle getFunctionAddress:name into:self) isNil ifTrue:[ |
254 (moduleHandle getFunctionAddress:name into:self) isNil ifTrue:[ |
|
255 moduleHandle := nil. |
255 self error:'Missing function: ', name, ' in module: ', moduleName. |
256 self error:'Missing function: ', name, ' in module: ', moduleName. |
256 ] |
257 ] |
257 ]. |
258 ]. |
|
259 |
|
260 "Modified: / 22-06-2006 / 16:47:49 / cg" |
258 ! |
261 ! |
259 |
262 |
260 prepareInvoke |
263 prepareInvoke |
261 self hasCode ifFalse:[ |
264 self hasCode ifFalse:[ |
262 moduleHandle isNil ifTrue:[ |
265 moduleHandle isNil ifTrue:[ |
263 self linkToModule. |
266 self linkToModule. |
264 ]. |
267 ]. |
265 ]. |
268 ]. |
266 ! ! |
269 ! ! |
267 |
270 |
268 !ExternalLibraryFunction methodsFor:'private-accessing'! |
271 !ExternalLibraryFunction methodsFor:'private-accessing'! |
269 |
272 |
739 ! ! |
742 ! ! |
740 |
743 |
741 !ExternalLibraryFunction class methodsFor:'documentation'! |
744 !ExternalLibraryFunction class methodsFor:'documentation'! |
742 |
745 |
743 version |
746 version |
744 ^ '$Header: /cvs/stx/stx/libbasic/ExternalLibraryFunction.st,v 1.23 2006-06-20 15:26:29 ca Exp $' |
747 ^ '$Header: /cvs/stx/stx/libbasic/ExternalLibraryFunction.st,v 1.24 2006-06-22 14:47:58 cg Exp $' |
745 ! ! |
748 ! ! |