Some of you know that the .def file is used to export function from dlls to because you don't know the memory adress of a funtion in a dll.
Now, is there a way to export funtions from dlls if you don't know the funtion name? Say you have a dll. You don't have the source, and you have no idea what the name is of the funtion you want to export. Is there a way to export the funtion, view it, without knowing the name of it in the DLL?
Just asking...
Exporting Dynamic Functions using the .def file
-
- Posts: 732
- Joined: Wed Nov 26, 2003 11:59 pm
- Location: Raleigh, NC, USA
http://msdn.microsoft.com/library/defau ... y_name.asp
You can export the functions by Ordinal. Click the above link to learn more.
You can export the functions by Ordinal. Click the above link to learn more.
I think he really means import.
You'll still have to know the name of the function you want to import with a .def file. They will be listed in there, though.
You can also load without a .def file by ordinal (going with kaptainkommie's idea here) with good ol' GetProcAddress(). Just specify the ordinal you want to import in the low-order word of the parameter you'd usually use for the name of the function.
You'll still have to know the name of the function you want to import with a .def file. They will be listed in there, though.
You can also load without a .def file by ordinal (going with kaptainkommie's idea here) with good ol' GetProcAddress(). Just specify the ordinal you want to import in the low-order word of the parameter you'd usually use for the name of the function.