Solved

Win32 RegSetValue (3)

Posted on 1997-02-26
1
209 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
1 Comment
 
LVL 1

Accepted Solution

by:
edtmihu earned 10 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now