1. dll question ver 2.5

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

new topic     » topic index » view message » categorize

2. Re: dll question ver 2.5

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

new topic     » goto parent     » topic index » view message » categorize

3. Re: dll question ver 2.5

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

new topic     » goto parent     » topic index » view message » categorize

4. Re: dll question ver 2.5

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

new topic     » goto parent     » topic index » view message » categorize

5. Re: dll question ver 2.5

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

new topic     » goto parent     » topic index » view message » categorize

6. Re: dll question ver 2.5

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
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu