Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
VC (Well actually eVC) very simple help required!
Old 12-09-2007, 07:08 PM VC (Well actually eVC) very simple help required!
Millions's Avatar
Super Talker

Posts: 110
Location: England
Trades: 1
For a C coder this is likely to be the simplest thing on the planet, however as a VB coder its driving me NUTS!!!!

A little background to what I'm trying to do:
Quote:
A friend has a PNA (Personal Navigation Aid) which came with some crappy navigation software, he's successfully loaded Tomtom 6 on it and it all works sweet. BUT .. to get it working you need to set a single registry key:

[HKEY_LOCAL_MACHINE\Explorer\Shell Folders] "My Documents"="\MMC_Storage"

On a hard/soft reset this key is lost hence Tomtom says "No Maps Found". After a soft reset it does by default run a .exe on the SD Card which can be replaced. So he's asked me to write him a simple .exe that can set this key then launch Tomtom.


Now then, I'm a competent VP programmer and can do this easilly in VB/eVB BUT eVB creates .vb files and not .exe's , and what I know about C you can write on an atom - so I'm stuffed!

Long story short - I've found an example eVC app that can set registry keys and launches an other program. I have it almost edited it so it works but I have a tiny problem with the following:

Code:
RegSetValueEx(hKey,TEXT("My Documents"),
0,
REG_SZ,
(LPBYTE)lpCmdLine,
((lstrlen(lpCmdLine)+1)*sizeof(TCHAR)));


It writes contents of 'lpCmdLine' to the registry under the right place, but I can't seem to work out how to set a variable in eVC. So although I can write the Registry Key "My Documents" I can't set / change the 'lpCmdLine' value to "\MMC _Storage". Can someone help me change the code to do this simple thing?
__________________
Lifes Just Great At The Mow :-)

Please login or register to view this content. Registration is FREE
Millions is offline
Reply With Quote
View Public Profile Visit Millions's homepage!
 
 
Register now for full access!
Old 12-10-2007, 04:01 PM Re: VC (Well actually eVC) very simple help required!
Millions's Avatar
Super Talker

Posts: 110
Location: England
Trades: 1
Any one got any ideas
__________________
Lifes Just Great At The Mow :-)

Please login or register to view this content. Registration is FREE
Millions is offline
Reply With Quote
View Public Profile Visit Millions's homepage!
 
Old 12-11-2007, 04:39 AM Re: VC (Well actually eVC) very simple help required!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
you're probably a bit out of luck with C programmers at this forum, as it is more web orientated.

try
http://www.tek-tips.com/threadminder.cfm?pid=205
or
http://www.tek-tips.com/threadminder.cfm?pid=207
or
http://www.codingforums.com/forumdisplay.php?f=21
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-12-2007, 07:38 PM Re: VC (Well actually eVC) very simple help required!
Millions's Avatar
Super Talker

Posts: 110
Location: England
Trades: 1
Thanks for that chrishirst
__________________
Lifes Just Great At The Mow :-)

Please login or register to view this content. Registration is FREE
Millions is offline
Reply With Quote
View Public Profile Visit Millions's homepage!
 
Reply     « Reply to VC (Well actually eVC) very simple help required!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13619 seconds with 12 queries