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

Posts: 111
Location: England
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 :-)
PHP Scripts
Millions is offline
Reply With Quote
View Public Profile Visit Millions's homepage!
 
When You Register, These Ads Go Away!
Old 12-10-2007, 03:01 PM Re: VC (Well actually eVC) very simple help required!
Millions's Avatar
Super Talker

Posts: 111
Location: England
Any one got any ideas
__________________
Lifes Just Great At The Mow :-)
PHP Scripts
Millions is offline
Reply With Quote
View Public Profile Visit Millions's homepage!
 
Old 12-11-2007, 03:39 AM Re: VC (Well actually eVC) very simple help required!
chrishirst's Avatar
Super Moderator

Posts: 13,527
Location: Blackpool. UK
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!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-12-2007, 06:38 PM Re: VC (Well actually eVC) very simple help required!
Millions's Avatar
Super Talker

Posts: 111
Location: England
Thanks for that chrishirst
__________________
Lifes Just Great At The Mow :-)
PHP Scripts
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

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

vB 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.12701 seconds with 12 queries