DLL Function Export

G

Guest

Hello,

I've been given this totally cool website:
http://translate.google.com/transla...unktdll/einsprungpunktdll.html&langpair=de|en

And I need to find a way to export functions from DLL compiled by VB. I am
quite new to VB and while this site is translated into English, I have a hard
time figuring out how to use the "Controller-Linker" application. I've been
trying to make an 'educated guess' but for that I need to know the process
involved. Is there someone who understands the process better than me who
can suggest how to use this application? Thank you very much.

Victor.
 
C

c j anderson, mcp

I'm sorry, but what is your question? how to export methods from a dll?
that's not in your control -- if the original author wrote a visible
function, then it is already exported.

as far as using the function in VB.NET, in some cases, simply adding a
refernce to the object works -- in others you will use the DllImport
attribute (see
<http://msdn2.microsoft.com/library/e4takf5s(en-us,vs.80).aspx>)

Cheers.
 
G

Guest

Hi,

Thank for the reply. Basically, I am writing my own DLL and would like to
export a function. So, I am the "original author". The site which I
reference has a solution to exporting a function (I think) but I am not sure
how to use the "controller-linker" application because I am not sure what
exactly I should type as a command in that application. I will definitely
consider your advice but if you don't mind, please let me know what I should
enter as text for "controler-linker" function in

http://translate.google.com/transla...unktdll/einsprungpunktdll.html&langpair=de|en

Thank you so much.

Victor.
 
H

Herfried K. Wagner [MVP]

victorsk said:
I've been given this totally cool website:
http://translate.google.com/transla...unktdll/einsprungpunktdll.html&langpair=de|en

And I need to find a way to export functions from DLL compiled by VB. I
am
quite new to VB and while this site is translated into English, I have a
hard
time figuring out how to use the "Controller-Linker" application. I've
been
trying to make an 'educated guess' but for that I need to know the process
involved. Is there someone who understands the process better than me who
can suggest how to use this application?

Note that the page contains a download on the bottom containing all the
projects and code. The controller project will create a "link.exe". In the
VB6 installation directory, rename the existing "link.exe" to "link1.exe"
(and make a backup of "link.exe") and copy the "link.exe" you created by
compiling the project contained in the download into the directory. VB will
call the custom "link.exe" when compiling, and this "link.exe" will set
required parameters and call "link1.exe".

However, note that this approach is in no way supported!
 
G

Guest

Hi,

Thank you again for the reply. Sorry, I am quite new to VB so I appreciate
your patience (and help) with this. What I understand is that there is a
"link.exe" that comes with Visual Studio. Is this app attempting to use this
"link.exe" or is it creating a custom version "link1.exe"? Or, is "link.exe"
compiled by this app a custom version? If this is the case then I am
supposed to rename the custom "link.exe" to "link1.exe"? And, lastly, what
should I enter in "Controller-Linker" dialog box? Sorry, I am asking too
many questions, but I'll really appreciate your clarification on:

1) which directory I should store "link.exe" after renaming it to "link1.exe"
2) what to enter inside "Controller-Linker" dialog box.

Thank you for all your help,
Victor.
 
H

Herfried K. Wagner [MVP]

victorsk said:
Thank you again for the reply. Sorry, I am quite new to VB so I
appreciate
your patience (and help) with this. What I understand is that there is a
"link.exe" that comes with Visual Studio. Is this app attempting to use
this
"link.exe" or is it creating a custom version "link1.exe"? Or, is
"link.exe"
compiled by this app a custom version? If this is the case then I am
supposed to rename the custom "link.exe" to "link1.exe"? And, lastly,
what
should I enter in "Controller-Linker" dialog box? Sorry, I am asking too
many questions, but I'll really appreciate your clarification on:

1) which directory I should store "link.exe" after renaming it to
"link1.exe"
2) what to enter inside "Controller-Linker" dialog box.

Untested:

Open "%PROGRAMFILES%\Microsoft Visual Studio\VB98" in explorer, make a
backup of the existing "LINK.EXE", rename the existing "LINK.EXE" to
"LINK1.EXE". Then create a DEF file which contains the list of exported
functions (see article or
<URL:http://msdn.microsoft.com/library/en-us/vccore98/HTML/_core_module.2d.definition_files.asp>).
Compile the project contained in the download mentioned previously and copy
the resulting "link.exe" into the "%PROGRAMFILES%\Microsoft Visual
Studio\VB98" directory. Then simply compile your VB project and choose
"Yes" in the messagebox. A dialog box with a textbox appears. Enter the
name of the DEF file there and press "OK".
 
G

Guest

Hi,

Awesome! thanks for the instructions. I'll try to implement them. Sorry
for being a nuisance :)

Victor.
 
G

Guest

Hi,

Awesome! Thanks for the instructions. I'll try to implement them. Sorry
for being a nuisance :)

Victor.
 
G

Guest

Hi,

Awesome! Thanks for the instructions. I'll try to implement them. Sorry
for being a nuisance :)

Victor.
 
G

Guest

Hi,

Awesome! Thanks for the instructions. I'll try to implement them. Sorry
for being a nuisance :)

Victor.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top