Click here to Skip to main content
15,887,936 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
I have .DLL file that do alot of functions.
But I want to execute this DLL when windows start up every 10 minutes.
Regardless opening my application
how can I do this please I want help.
Posted
Updated 11-Jul-12 7:29am
v4
Comments
Albert Holguin 11-Jul-12 11:15am    
You can't just call methods within a DLL without some sort of entry point... you have to make an exe or service wrapper.
nagiub2007 11-Jul-12 11:20am    
iam beginner
an i cannot understand what u mean
can u explain simply plz
Sergey Alexandrovich Kryukov 11-Jul-12 12:32pm    
Here is what Albert means: you did not explain what do you mean by "execute DLL". There is no a default unambiguous meaning of it. A DLL is an executable, but this is a shared library, and who knows what would you mean to use from this library? Regular EXE files have specified "entry point" in it: some function the OS loader should call to start the application. The general-purpose DLL does not have to have it, so the OS have no idea what to do with it.
--SA
Albert Holguin 11-Jul-12 17:21pm    
Perfect explanation
Albert Holguin 11-Jul-12 17:24pm    
Sergey provided great links and explanation.

Usually such functionality is done with a windows service, create a service for your DLL and call your methods on a Timer.

Read the following :
http://msdn.microsoft.com/en-us/library/aa984464%28v=vs.71%29.aspx[^]

Simple Windows Service Sample[^]
 
Share this answer
 
Comments
Albert Holguin 11-Jul-12 11:12am    
Great suggestion... +5
Mehdi Gholam 11-Jul-12 11:41am    
Thanks Albert!
Sergey Alexandrovich Kryukov 11-Jul-12 12:41pm    
My 5, but in this case I don't think OP is ready to get it. More basic understanding is needed. Please see my answer (most of it is in my comment to the question).
--SA
Mehdi Gholam 11-Jul-12 12:45pm    
Thanks Sergey!
Shahin Khorshidnia 11-Jul-12 13:11pm    
+5
Please see my comment to the question. The problem is that you don't specify what do you mean by "run a DLL", so your problem cannot be solved until you understand what you really need.

For better understanding, you should understand what the executable modules are and what is the role of DLLs. You can get some idea quickly from the information on the RunDLL.exe or RunDLL32.exe applications. They require to specify what is the DLL and what to use as the entry point:
http://support.microsoft.com/kb/164787[^].

Are you getting the idea?

Now, you need to understand what the executable modules do:
http://en.wikipedia.org/wiki/Shared_library#Shared_libraries[^],
http://en.wikipedia.org/wiki/Dynamic-link_library[^],
http://en.wikipedia.org/wiki/EXE[^],
http://en.wikipedia.org/wiki/Portable_Executable[^],
http://en.wikipedia.org/wiki/Executable[^],
http://en.wikipedia.org/wiki/Executable_file_format[^].

Makes some research, have a good reading and come back with your questions. To solve your problem you tried to formulate in the present question, try to understand what you really want, based on new knowledge and come back with more accurate questions. We will gladly help you.

—SA
 
Share this answer
 
Comments
Mehdi Gholam 11-Jul-12 12:44pm    
5'ed
Sergey Alexandrovich Kryukov 11-Jul-12 12:52pm    
Thank you, Mehdi.
--SA
nagiub2007 11-Jul-12 12:45pm    
OK i have API from mobile company retrieve mobile numbers from db
and send sms messages regardless running my windows application
i hope it seems clear
Sergey Alexandrovich Kryukov 11-Jul-12 12:57pm    
OK. (Sigh.)

No. this is not clear at all. "Mobile company", "send SMS..." -- fine. How is this related to any DLL? What exactly DLL? What should it do? What's the library or API do you need to use?

If you don't know that, asking further questions is useless. Learn some programming, or learn the application field, but to start, you need to know both. Right now, you problem is the critical lack of judgement. Not that you provide insufficient or inaccurate information about your problem, you cannot see if it is insufficient or inaccurate. This is a kind of cognitive habit. We all should be able to reflect the perception of the people we address to, get a clear picture of how your words can be recognized. Just think before you post...

--SA
Sergey Alexandrovich Kryukov 11-Jul-12 13:00pm    
Now, nothing happens "regardless your windows application". Is some software sends messages, this software should be executed. What does it mean "without opening application"? There is no such think as "opening". An application is either started (terminated, etc.) or not. Do you mean UI?

You know, I feel we are loosing time. Get yourself basically educated to the level where you understand what you want and then come back. We will gladly help you.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900