Startup from registry program doesn't work

2009-11-26 Thread Sam Hu
Greetings! Below program is purpose to execute a program(exe) from registry upon system startup.It was built successfuly,but unfortunately it does not work as expected,nothing would happen.It prints: "Oh..no,not a good doctor." when the program runs. What's problem?It is under DMD2.036 under

Re: Startup from registry program doesn't work

2009-11-26 Thread Richard Webb
Do you need to be calling RegOpenKeyEx with KEY_WRITE instead of KEY_READ ?

Re: Startup from registry program doesn't work

2009-11-30 Thread Sam Hu
Richard Webb Wrote: > Do you need to be calling RegOpenKeyEx with KEY_WRITE instead of KEY_READ ? > Thanks,I changed to KEY_WRITE and the function now return true when the app executes.However the specified app dosn't start up automatically,when I check the startup settings by some third party

Re: Startup from registry program doesn't work

2009-12-01 Thread Richard Webb
Is the DWORD length=pFileName.sizeof; setting length to the size of the pointer, when you need the length of the string? That would explain why only 4 bytes have been written.

Re: Startup from registry program doesn't work

2009-12-01 Thread Sam Hu
Richard Webb Wrote: > Is the > > DWORD length=pFileName.sizeof; > > setting length to the size of the pointer, when you need the length of the > string? That would explain why only 4 bytes have been written. > Solved.Thank you so much for your help!