• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

nrComm1->LoadConfig( ? , ? , ? );

Started by To, March 14, 2012, 07:58:08 am

Previous topic - Next topic

To

Hello,

I can not figure out what to put in a parameter to the following statement:
nrComm1->LoadConfig(

Could you help me?

Roman Novgorodov

Hello

This method loads serial port settings from system registry.

It has following declaration:
procedure LoadConfig(const Root:HKEY;const Key,Name:string);virtual;
  where Root handle of root key (f.e.  HKEY_LOCAL_MACHINE)
  Key path to key (fe 'Software\MyApp')
  Name name of binary value for keep serial port settings (fe 'rs232')

Roman Novgorodov
DeepSoftware LLC
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

To

Hello,
Thank for your answer.

I try it but it's not OK.

I try :       nrComm1->SaveConfig(HKEY_LOCAL_MACHINE,"c:\application\exe\","RS232");

And a error is : Le projet Project.exe a déclenché la classe d'exception ERegistryException avec le message 'Failed to set data for ' â-¡â-¡2".

Could you help me?

cptang

Quote from: To on March 14, 2012, 07:58:08 am
Hello,

I can not figure out what to put in a parameter to the following statement:
nrComm1->LoadConfig(

Could you help me?


save:
nrComm1->SaveConfig(HKEY_LOCAL_MACHINE,"SOFTWARE\\System\\Windows","rs232")    ;
load:
nrComm1->LoadConfig(HKEY_LOCAL_MACHINE,"SOFTWARE\\System\\Windows","rs232")    ;