|
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
|