?
Solved

Win32 RegSetValue (3)

Posted on 1997-02-26
1
Medium Priority
?
226 Views
Last Modified: 2013-12-04
Hi,
With these function

RegSetValueEx(hKey3, "file", 0, REG_SZ, (CONST BYTE *)m_cnom,
                  m_cnom.GetLength());

exemple is a variable of Class CString


How do I do.

The response doesn't work.
Thanx
0
Comment
Question by:puce020497
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
edtmihu earned 20 total points
ID: 1298474
Try this:
RegSetValueEx( hKey3, _T( "file" ), 0, REG_SZ, (CONST BYTE *) (LPCTSTR) m_cnom, m_cnom.GetLength() + 1 );
                                       
You need to include the terminating null in the length.
Regards Michael
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question