Re: dll question ver 2.5
- Posted by Alexander Toresson <alexander.toresson at gmail.com> Apr 29, 2005
- 497 views
Bernie Ryan wrote: > > Larry Miller wrote: > > > > It is possible to call a DLL function by it's ordinal, at least in 2.4. > > You get a handle to the DLL with GetModuleHandle and then use GetProcAddress > > to obtain the address of the desired DLL routine. The function is then > > defined: > > > > xxx=define_c_func("",address,{parameters},C_LONG) > > > > This may not be entirely legitimate and may not work in all cases. > > > > Larry Miller > > > > Thanks Larry. > > What I don't understand is why RDS dosen't just simply > add that capability into define_c_function because I'am > sure they are using GetProcAddress when you use the name > of a function. if you look at define_c_function name in dll.e > it uses the parameter " object routine_name " which > could be passed a atom or a sequence. > > > Bernie > I don't really see the advantage of this. The programmer has to do a little less work when wrapping a dll, however, the code becomes a lot less readable and it depends on the functions coming in a specific order, which can cause much confusion. Regards, Alexander Toresson