Use c++ to change users browser homepage

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

33 Replies - 13768 Views - Last Post: 31 October 2010 - 09:36 AM Rate Topic: -----

#31 Munawwar   User is offline

  • D.I.C Regular
  • member icon

Reputation: 163
  • View blog
  • Posts: 457
  • Joined: 20-January 10

Re: Use c++ to change users browser homepage

Posted 31 October 2010 - 04:00 AM

HAH! All you have to do is to set the project option from unicode to multi-byte character set (or alternatively convert wide character set to multi-byte). Right click on project icon->Properties->Character Set->Use Multi-Byte Character set.

EDIT: oscode's solution is better.See next post.

This post has been edited by Munawwar: 31 October 2010 - 07:38 AM

Was This Post Helpful? 1
  • +
  • -

#32 oscode   User is offline

  • D.I.C Regular

Reputation: 109
  • View blog
  • Posts: 257
  • Joined: 24-October 10

Re: Use c++ to change users browser homepage

Posted 31 October 2010 - 04:07 AM

You can also just use the ASCII method directly - RegSetValueExA
Was This Post Helpful? 3
  • +
  • -

#33 Krishs   User is offline

  • D.I.C Head
  • member icon

Reputation: 23
  • View blog
  • Posts: 105
  • Joined: 06-April 10

Re: Use c++ to change users browser homepage

Posted 31 October 2010 - 06:50 AM

visual studio has UNICODE enabled by default and thats why each window function has its A & W forms accordingly like one shown in above post as RegSetValueExA & RegSetValueExW and they take arguments accordingly.

to compile your code successfully , either you have to user Ascii version of this code or just undef UNICODE like

#ifdef UNICODE
#undef UNICODE
#endif
Was This Post Helpful? 1
  • +
  • -

#34 sharpie349   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 46
  • Joined: 28-October 10

Re: Use c++ to change users browser homepage

Posted 31 October 2010 - 09:36 AM

I finally figured it out i needed to add TEXT and then quotes around the parameter where I tell it to look for the key.
Those are great answers guyss!
Now all I need to do is figure out how to do this in firefox.
I am pretty sure this is stored in a javascript file somewhere on the users computer?
Are you able to get into a javascript file in c++ to write a line?
Thanks again everyone.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3