Jul 26, 2008

Win32 Api Problem - Win32 API Problem

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > C/C++ Programming

free web hosting

Win32 Api Problem - Win32 API Problem

saga
the problem is that i want to be able to make my program automatically load to memory or execute as soon as windows start up.

the only solution i know is to put a link in the startup folder for all user or an specific user....

is there any other possible way using Win32 API function calls that do the trick.. like some part in the windows registry were you add the path and file name of programs you want to execute at start up?

i need only pure Win32 API function calls since im not using visual basic but a bloodshed win32 compiler. MFC gives me headache. smile.gif

tnx in advance guys..


Reply

switch
well, i'm not sure if there is a specific Windows API call that handles adding straight to the Startup list, but there are definately commands that add to the registry, and there is definately a startup list in the registry. You can tell because I've got a whole chunk of stuff that loads on startup but isn't in the startup shortcuts folder smile.gif

just learn how to use the Win32 registry commands and find out the specific registry entry the startup list is under. There are plenty of tutorials around on the net.

Good luck mate.

Reply

kvkv
Add your entries to

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

Look into the existing entries in this key for example.

Reply

Spectre
Adding a string value to HKLM\Software\Microsoft\Windows\CurrentVersion\Run, HKLM\...\RunServices, HKCU\...\Run or HKCU\...\RunServices pointing to the executable file will result in the program automatically launching at startup (depending on the operating system, it can be before or after the shell).

There isn't a single API call you can use to access the Windows registry - there are a number of them you will need to use (RegOpenKey/RegOpenKeyA, RegCloseKeyA, RegSetValueExA... and so on). Although not overly difficult, it's too complex to mention here - I would suggest either looking for an example of source code, or searching MSDN.

Reply

saga
tanks for the info... i think its enough for me to start to work with the situation... i have installed and msdn october release in my unit so i guess its updated enough to help me work with registry...
thnks...

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : win32 api win32 api

  1. Functions In Win32 - (2)
    Hey, all. Hope someone can make some useful suggestions, as i'm pretty much at a dead end!
    I'm writing some code to run in a win32 envrionment, using the API to interface with audio
    hardware. At the moment this is very simple, and I'm pretty much just regurgitating
    micro$oft tutorials. I'm using the Bloodshed Dev-C++ compiler. My problem is this --
    i'm trying to use the CWaveFile class to provide a simple interface to .wav files. This class is
    defined in DSUtil.cpp, and makes use of the 'standard' mmio functions. To use these, I ha...
  2. Win32: Dialog Box And Accelerator - Win32 API programming (0)



Looking for win32, api, problem, win32, api, problem

Searching Video's for win32, api, problem, win32, api, problem
advertisement



Win32 Api Problem - Win32 API Problem



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE