|
Actually, you _can_ run a dll - http://support.microsoft.com/kb/164787. Agree, it's not exactly the same as running an .exe, but then again, Windows itself starts tons of processes using rundll/rundll32.
|
|
|
|
|
I would set aside all the BS responses they might be looking for and tell them the basic reason. An EXE is configured by the compiler as an application and a DLL is built to be an extension library that can be shared by multiple EXE files. Nothing more technical than that is needed.
If they were looking for anything more than that at a basic level then I wouldn't want to work for them because they really like to pick nits about crap that isn't really all that relevant.
-CB
|
|
|
|
|
I completely agree...
I have found in the many interviews that I have taken that when the interviewers begin asking incredibly detailed questions relating to irrelevant knowledge for most application development they have no real interest in hiring anyone. Of course, they may also just like asking people a lot of stupid questions...
Steve Naidamast
Black Falcon Software, Inc.
blackfalconsoftware@ix.netcom.com
|
|
|
|
|
Steve Naidamast wrote: I have found in the many interviews that I have taken that when the interviewers begin asking incredibly detailed questions relating to irrelevant knowledge for most application development they have no real interest in hiring anyone. Of course, they may also just like asking people a lot of stupid questions...
When they get like that I begin to realize that they're just playing "Jeopardy". Any "propeller-head" can spout out technology terms. What I want to demonstrate to a prospective employer/client is that I know how to THINK. Sure, some built-in knowledge is important but EQUALLY important is realizing you can't keep it all in your head. That's what reference material is for. Why bother memorizing everything? If I'm aware of how a particular language feature works that's enough: when I need it I'll look it up if it isn't something I use on a day-by-day basis.
I remember for a while some of the guys at our company were all about getting "certifications". Cool, except when I would go to them with a real problem they couldn't think clearly enough to solve the problem: it wasn't one of the test questions so they didn't know what to do!
Heh ...
-cb
|
|
|
|
|
If i asked this question i would expect this answer:
"Both CAN be run, usually a DLL is intended to be used inside another program, that's why normally you don't run a dll directly."
But an acceptable answer will be:
"DLLs are intended to be used inside programs, while EXEs are programs themselves"
|
|
|
|
|
Also, a DLL doesn't have its own stack, by default. An exe does.
|
|
|
|
|
On Windows, there are cases where you can run a function in a dll with rundll32.exe if the function's takes no args and its return type is void. In other words, the function needs to be as much of a standalone as an exe file. For example, in Powersell,
PS> rundll32.exe advapi32.dll,ProcessIdleTasks
PS> rundll32.exe user32.dll,LockWorkStation
|
|
|
|
|
No, they can take args using similar parameters to what WinMain() does. Just that some functions don't use them.
void CALLBACK
EntryPoint(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow);
|
|
|
|
|
How would you use rundll32.exe to run that function then?
|
|
|
|
|
|
I confess I didn't read the tag line either. There's a bit of a problem with the semantics of the statement too. I'd agree that you can't start an execution from a dll (from other comments, I'd be wrong about that too, but don't know how), but you definitely do run dll code.
|
|
|
|
|
Well.. technically, if it is the right kind of DLL, you can.. using rundll32.exe (which has been included in at least the last few versions of windows). It lets you execute any entry-point style (think WinMain signature) named code symbol.
I guess it was easier for M$ to write a few DLL's with many functions, rather than dozens (or hundreds/thousands) of individual linked EXE's, each for a specific purpose.
|
|
|
|
|
rundll32.exe, although there are no guarantees that it will work (depending on the DLL's entry points)
--
Kein Mitleid Für Die Mehrheit
|
|
|
|
|
While browsing through Q&A this morning I came across this question:
FetalExecutionEngineError On OpenFileDialog.showDialog()
I'm guessing that the engine must be a little underdeveloped to get this type of error.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
What an abortion!
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
and the bad news is you only land there if the fetal execution fails...
Think of how stupid the average person is, and realize half of them are stupider than that. - George Carlin
|
|
|
|
|
Is that real, or is it... doctored?
Too much? I'll grab my coat (which will free up a coat hanger).
|
|
|
|
|
On a serious note, I did get this once, and eventually (after several weeks) I figured out it was caused by my installation of Visual Studio 2010. It appears an update caused corruption in some place in the framework. I really have VS2010, and am going to uninstall it soon.
I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image.
Stephen Hawking
|
|
|
|
|
Great catch. I ran into this one the other day in VS 2012.
Web deployment task failed. (Failed to create type 'Microsot.SqlServer.Dac.DacServices'.
An new company you think?
|
|
|
|
|
Microsot? Is that a tiny barfly?
Fletcher Glenn
|
|
|
|
|
Just found:
'Dim w As Object = DBNull.Value
'Dim i As Integer = 1
'i = w
'Throw New Exception("XIMBA")
|
|
|
|
|
I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image.
Stephen Hawking
|
|
|
|
|
|
|
Just un-comment the lines of code and run the programm. If i=w works fine, you'll be thrown to Ximba (a region in South Africa). Beware of the mythical forces which could be applied.
|
|
|
|