1. dll question ver 2.5
- Posted by Bernie Ryan <xotron at bluefrog.com> Apr 29, 2005
- 481 views
I thought that version 2.5 was going to allow calling a DLL function by an ordinal ? Bernie My files in archive: w32engin.ew mixedlib.e eu_engin.e win32eru.ew Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
2. Re: dll question ver 2.5
- Posted by Robert Craig <rds at RapidEuphoria.com> Apr 29, 2005
- 461 views
Bernie Ryan wrote: > I thought that version 2.5 was going to allow calling > a DLL function by an ordinal ? Actually, prior to 2.4, I said I'd look into it, but then later I backed away from it: http://www.listfilter.com/cgi-bin/esearch.exu?fromMonth=2&fromYear=8&toMonth=2&toYear=8&postedBy=rds&keywords=ordinal I still don't have any plans to do it. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
3. Re: dll question ver 2.5
- Posted by Larry Miller <larrymiller at sasktel.net> Apr 29, 2005
- 585 views
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
4. Re: dll question ver 2.5
- Posted by Bernie Ryan <xotron at bluefrog.com> Apr 29, 2005
- 449 views
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 My files in archive: w32engin.ew mixedlib.e eu_engin.e win32eru.ew Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
5. Re: dll question ver 2.5
- Posted by Alexander Toresson <alexander.toresson at gmail.com> Apr 29, 2005
- 498 views
- Last edited Apr 30, 2005
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
6. Re: dll question ver 2.5
- Posted by Hayden McKay <hmck1 at dodo.com.au> May 02, 2005
- 498 views
You could write some machine code to set up the stack frame then call the C routine bypassing the call to define_c_proc/define_c_func. Alexander Toresson wrote: > > 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 >