Click here to Skip to main content
16,004,969 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Mind *taker* (oooeeeooo) Pin
RomTibi26-Nov-06 10:02
RomTibi26-Nov-06 10:02 
GeneralRe: Mind *taker* (oooeeeooo) Pin
RomTibi28-Nov-06 6:25
RomTibi28-Nov-06 6:25 
GeneralRe: Mind *taker* (oooeeeooo) Pin
Shog928-Nov-06 6:42
sitebuilderShog928-Nov-06 6:42 
GeneralRe: Mind *taker* (oooeeeooo) Pin
RomTibi28-Nov-06 7:06
RomTibi28-Nov-06 7:06 
GeneralRe: Mind *taker* (oooeeeooo) Pin
RomTibi29-Nov-06 10:39
RomTibi29-Nov-06 10:39 
AnswerRe: RegQueryValue problems Pin
CPallini26-Nov-06 10:12
mveCPallini26-Nov-06 10:12 
GeneralRe: RegQueryValue problems Pin
RomTibi28-Nov-06 6:26
RomTibi28-Nov-06 6:26 
GeneralRe: RegQueryValue problems Pin
CPallini28-Nov-06 7:20
mveCPallini28-Nov-06 7:20 
As stated by MSDN:
LONG RegQueryValueEx(
  HKEY hKey,           // handle to key to query
  LPTSTR lpValueName,  // address of name of value to query
  LPDWORD lpReserved,  // reserved
  LPDWORD lpType,      // address of buffer for value type
  LPBYTE lpData,       // address of data buffer
  LPDWORD lpcbData     // address of data buffer size
);

lpValueName 
Pointer to a null-terminated string containing the name of the value to query. 


hence reg1,reg2, reg3 have to be strings.
Moreover, MSDN says:
lpcbData 
Pointer to a variable that specifies the size, in bytes, of the buffer pointed to by the lpData parameter. When the function returns, this variable contains the size of the data copied to lpData. 

Hence you have to initialise size, for instance, if
L is defined as follows
long * L = new long[10];

then you have to set:
size = 10 * sizeof(long);


Incidentally last considerations show that your function signature is not correct, since you have to pass the buffer lenght too.

By the way, where come from Inst, Uninst?

Finally, the code is a bit messy... Maybe if you tell us exactly what you intend to do, we will show a cleaner sample.



If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

GeneralRe: RegQueryValue problems Pin
RomTibi29-Nov-06 10:41
RomTibi29-Nov-06 10:41 
GeneralRe: RegQueryValue problems Pin
CPallini29-Nov-06 11:04
mveCPallini29-Nov-06 11:04 
AnswerRe: RegQueryValue problems Pin
Michael Dunn26-Nov-06 19:58
sitebuilderMichael Dunn26-Nov-06 19:58 
GeneralRe: RegQueryValue problems Pin
RomTibi28-Nov-06 6:26
RomTibi28-Nov-06 6:26 
Questioncan not create Visual C++ Smart Device project Pin
George_George26-Nov-06 1:23
George_George26-Nov-06 1:23 
QuestionGetting call stack of a remote process Pin
DavidR_r26-Nov-06 0:32
DavidR_r26-Nov-06 0:32 
AnswerRe: Getting call stack of a remote process Pin
Shog926-Nov-06 10:05
sitebuilderShog926-Nov-06 10:05 
QuestionPerformance counters Pin
locoone25-Nov-06 19:59
locoone25-Nov-06 19:59 
AnswerRe: Performance counters Pin
Viorel.25-Nov-06 22:33
Viorel.25-Nov-06 22:33 
GeneralRe: Performance counters Pin
locoone26-Nov-06 6:05
locoone26-Nov-06 6:05 
GeneralRe: Performance counters Pin
Viorel.26-Nov-06 7:30
Viorel.26-Nov-06 7:30 
QuestionHow to capture parent dialog title text into its child,sub,sub...child windows? Pin
Super Hornet25-Nov-06 19:12
Super Hornet25-Nov-06 19:12 
AnswerRe: How to capture parent dialog title text into its child,sub,sub...child windows? Pin
Michael Dunn25-Nov-06 20:12
sitebuilderMichael Dunn25-Nov-06 20:12 
QuestionRe: How to capture parent dialog title text into its child,sub,sub...child windows? Pin
Super Hornet25-Nov-06 21:14
Super Hornet25-Nov-06 21:14 
AnswerRe: How to capture parent dialog title text into its child,sub,sub...child windows? Pin
Pierre Leclercq25-Nov-06 21:26
Pierre Leclercq25-Nov-06 21:26 
AnswerRe: How to capture parent dialog title text into its child,sub,sub...child windows? Pin
Waldermort25-Nov-06 21:31
Waldermort25-Nov-06 21:31 
QuestionHow do you show what program files are being copied, etc in a Dialog Pin
Larry Mills Sr25-Nov-06 14:27
Larry Mills Sr25-Nov-06 14:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.