1 Attachment(s)
How to call a .dll with arguments?
I have a .dll, say test.dll and i want to call this .dll like:
test.dll /filename /start address.
The dll should take the filename and start address as parameters and do something with them inside.
I mean what the finality should be that the user's Command Prompt should look like in the picture.
Can this be done?
Re: How to call a .dll with arguments?
Quote:
Originally posted by myth7676
I have a .dll, say test.dll and i want to call this .dll like:
test.dll /filename /start address.
That's what an exe is for. Why don't you use an exe instead of a DLL? Note that you can export functions from an exe and call them as if the exe was a DLL.
Re: Re: How to call a .dll with arguments?
Quote:
Note that you can export functions from an exe and call them as if the exe was a DLL.
Can you show me how can i do that(export functions), please?
Re: Re: How to call a .dll with arguments?
Quote:
Originally posted by gstercken
That's what an exe is for. Why don't you use an exe instead of a DLL? Note that you can export functions from an exe and call them as if the exe was a DLL.
I can think of a small handful of reasons why one might wish to do something like this with a DLL, but in general I agree that an EXE would be a better way to go.
Quote:
Originally posted by myth7676
Can you show me how can i do that(export functions), please?
I believe you would do it the same way you would export a function from a DLL... Via DEF file or _declspec( dllexport )...
Re: Re: Re: How to call a .dll with arguments?
Quote:
Originally posted by vicodin451
I can think of a small handful of reasons why one might wish to do something like this with a DLL, but in general I agree that an EXE would be a better way to go.
I believe you would do it the same way you would export a function from a DLL... Via DEF file or _declspec( dllexport )...
Aha, ok, just got it, thanks.