RE: .dll files -- possibly [OT]
- Posted by Andy Serpa <ac at onehorseshy.com> Jul 17, 2003
- 453 views
Chris Saik wrote: > > > Thanks Andy. So are .dlls "included", or do you just > place the .dll in the \windows\system\ directory and > call the functions directly? I would imagine the > latter, since you state that other languages can > access .dlls written in most any language (with the > possible parameter restrictions, of course) and > without revealing the source code. > > Yeah, you've got to "link" the functions in the dll with your program by using open_dll(), define_c_func() & define_c_proc() (see REFMAN). Then you call the functions with c_func() or c_proc(). Sometimes other overhead needs to be done to send the parameters properly (poking a character string into memory with allocate_string(), for instance). This process is known as "wrapping" the .dll -- making a "wrapper". (Search the archive with the word wrapper and you'll find some.) Using a Euphoria-created .dll is a lot simpler than using one made in a different language where you'll generally need a bit of knowledge about C to figure out how to wrap it properly...