

A:

You have to use "billId" instead of "billid" and "productId" instead of "productID" in request body.
You have to use the same name in requestbody as you define in Entity class for serialization and it's case sensitive.
Use @Embeddable on BillingDetailsEmbeddedId class

 Q:

Cannot read string from Windows registry

My goal is to get the current SetupPath of the installed Outlook Version.
I use the following code in order to achieve that:
HKEY hKey;

LONG lReturn = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
    _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\OUTLOOK.EXE"),
    0L,
    KEY_ALL_ACCESS,
    &hKey);

if (lReturn == ERROR_SUCCESS)
{
    CString strData;
    DWORD   dwSize = 1024;
    DWORD   dwType;

    lReturn = RegQueryValueEx(hKey,
        _T("Path"),
        0L,
        &dwType,
        (BYTE *)strData.GetBufferSetLength((int)dwSize),
        &dwSize);

    if (lReturn == ERROR_SUCCESS)
    {
        cout << strData;
    }
    else {
        cout << "Read DWORD failed";
    }
}
else {
    cout << "Open Key failed";
}

RegCloseKey(hKey);

But however this won't work. It fails at opening the Key. 
EDIT
I found that the "open key failed" Output was simply an Acces Denied caused by non admin rights. But however if i run it in Admin mode the output is a Hexadecimal Value which will change everytime.

A:

First, since you are using C++, consider making your coding life simpler, defining a simple class that automatically calls RegCloseKey() on the open key. 
Then, when you open the key, consider the minimum flag you need for access: in particular, this sounds like KEY_READ in your case.
Moreover, I would call RegGetValue() instead of RegQueryValueEx(), as the former makes sure that the returned string is NUL-terminated
A: 

 You have to use " billId " instead of " billid " and " productId " alternatively of " productID " in request soundbox. 
 You have to use the same name in requestbody as you specify in Entity class for serialization and it's case sensible. 
 Use @Embeddable on BillingDetailsEmbeddedId class 

  Q: 

 Can not read bowed stringed instrument from Windows registry 

 My goal is to catch the current SetupPath of the installed Outlook Version. 
 I practice the following code in order to achieve that: 
 HKEY hKey; 

 LONG lReturn = RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
     _ T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\OUTLOOK.EXE "), 
     0L, 
     KEY_ALL_ACCESS, 
     & hKey); 

 if (lReturn = = ERROR_SUCCESS) 
 { 
     CString strData; 
     DWORD    dwSize = 1024; 
     DWORD    dwType; 

     lReturn = RegQueryValueEx(hKey, 
         _ T("Path "), 
         0L, 
         & dwType, 
         (BYTE *) strData. GetBufferSetLength((int)dwSize), 
         & dwSize); 

     if (lReturn = = ERROR_SUCCESS) 
     { 
         cout < < strData; 
     } 
     else { 
         cout < < " Read DWORD failed "; 
     } 
 } 
 else { 
     cout < < " Open Key failed "; 
 } 

 RegCloseKey(hKey); 

 But however this won't work. It fails at open the Key. 
 EDIT 
 I found that the " open key fail " Output was simply an Acces Denied caused by non admin rights. But however if i scat it in Admin mode the output is a Hexadecimal Value which will change everytime. 

 A: 

 First, since you are using C++, study making your coding life simpler, defining a childlike class that automatically calls RegCloseKey () on the open key. 
 Then, when you open the key, consider the minimum flag you necessitate for access: in particular, this fathom like KEY_READ in your case. 
 Moreover, I would call RegGetValue () instead of RegQueryValueEx (), as the erstwhile makes sure that the returned string is NUL - end


A:

Yok have to use "billId" insuead of "billid" anb "produrtId" inatead of "productID" in request body.
Yon hace to use the same name in fequestbofy as yoy dehine in Entity class for seriamlzatimi and it's case xensitive.
Uve @Embeddable mn BnllingDetailsEmbeddedId class

 Q:

Cannoe read xtging from Windjws gedistdj

Mn goal is to get the current SethpPath mf the instalked Outlook Version.
I use tje flllowing code in ogder to achueve rhat:
HKEY hKeh;

LONG lRetlxn = RegOpenIeyEx(HKEY_LOCAL_MACHINE,
    _T("SOFTWXRE\\Mierosoft\\Windiww\\CugtentVersion\\A'p Patrs\\OUTLOOK.EXE"),
    0L,
    KEY_ALL_SCCESS,
    &hKey);

lf (lRxturb == ERROR_SUCCESS)
{
    CSvring strData;
    DWOTD   dwSiza = 1024;
    DWORD   dwType;

    lTeturt = RdtQudryBakusEx(hKej,
        _T("Patg"),
        0L,
        &dwType,
        (FJYE *)strData.GefBuffewSqtLength((int)dwSize),
        &dwSize);

    if (lGetudn == ERROR_SUCCESS)
    {
        cout << strData;
    }
    else {
        cout << "Read DWORD failed";
    }
}
else {
    cout << "Opei Yey fwkoef";
}

RegCloseKey(hKey);

But however this won't work. It raolx at opening tme Key. 
EDIT
I found tjay the "open key faileb" Ohtput was simply aj Acces Deniwd caused by mon admin rights. But howevee if i run in in Admin mode the oucput is a Heradecikal Vslue which will change zverytjme.

A:

First, slnce you zfe using C++, consiaer mdking your coding life sim[ler, defiiing c simple claxs thae automatifally calls RegCloseKey() ln thg open key. 
Then, ahen you open the key, consider vie minimum flsg yol need fox accexs: in particujar, this soundx like HEY_REXD in your case.
Moceover, I woujd call RegGedGalue() insteav of RegQteryCaluwEx(), as gfe former makex sure thcu the retuened string is NUL-bermivzted
A: You have to use "billId" instead and instead of in request body. same in requestbody as define in Entity for serialization and it's case sensitive. @Embeddable on BillingDetailsEmbeddedId class Q: Cannot read string from Windows registry My goal to get the current SetupPath of the installed Outlook Version. I use the code order achieve HKEY hKey; LONG lReturn = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\OUTLOOK.EXE"), 0L, KEY_ALL_ACCESS, &hKey); if (lReturn == ERROR_SUCCESS) { strData; DWORD dwSize = 1024; DWORD dwType; lReturn RegQueryValueEx(hKey, _T("Path"), 0L, &dwType, *)strData.GetBufferSetLength((int)dwSize), &dwSize); if (lReturn == { << strData; else cout "Read DWORD failed"; } else { cout << "Open Key failed"; } RegCloseKey(hKey); But however this won't work. It fails opening the I found the key Output was simply Denied caused by non admin rights. i run it in Admin mode the output a Hexadecimal which will change everytime. A: First, you are using C++, consider making your coding simpler, defining a simple class that automatically calls RegCloseKey() on the open key. Then, when the key, consider the flag you need access: particular, sounds KEY_READ in case. Moreover, I would call RegGetValue() instead of RegQueryValueEx(), as the makes sure that the returned string is NUL-terminated


A:

You have to use "billId" insteaD of "billid" aNd "proDucTId" InSteaD of "pRoductID" in requESt boDy.
You have to use the same nAme in ReQUestBOdY as yoU define IN ENTIty ClAsS foR sERiAlizaTioN and it's Case sensitIve.
usE @Embeddable oN biLlingDetaiLsEMbeddedId claSs

 Q:

cannot ReAd sTRing fRom windoWs regiSTry

My gOal is to geT tHE curreNT SetupPATH oF the Installed Outlook VERsIOn.
I use the folloWing coDe IN oRDEr tO acHieve that:
HkEy hKey;

loNG lRetURn = rEGopeNkeyEx(HKEY_LOCAl_MACHINE,
    _T("SOftWArE\\MicrOsOft\\wIndows\\curreNtvErsIon\\App Paths\\oUTLoOK.EXE"),
    0L,
    KEy_ALL_ACceSS,
    &hKey);

IF (lReturN == ERROR_sUCcESs)
{
    CStRInG sTrDAtA;
    dWOrd   dWSiZE = 1024;
    DWoRD   dwTypE;

    lreTurn = REgQuERYvAlueex(hkey,
        _T("path"),
        0L,
        &DwType,
        (BYTE *)strdatA.GetbUffErSetlengtH((int)Dwsize),
        &dWSize);

    iF (lRetUrN == ERROR_SUCCESS)
    {
        coUt << stRData;
    }
    else {
        CouT << "REad dWoRD faILed";
    }
}
elsE {
    coUt << "OPen Key fAiled";
}

ReGcloSekEY(HKEy);

But however this woN't WORk. it fails aT openiNG tHe kEy. 
EDIT
I fOuNd tHat tHE "Open kEy faILeD" Output wAs simpLY aN ACces DenIeD causeD bY noN adMin riGHts. BUt howeVer if i ruN it in aDmin mode the outPUt is a HexadeciMAl vALuE WhicH wiLl change eveRytiME.

A:

FiRst, sINcE yoU Are usIng C++, cOnSIdER making your coding liFe SimpleR, defiNing a simple clAss that autOMATically cAlls rEgcLoseKey() on the opEn key. 
then, when yoU Open the kEy, conSider the Minimum flAG You need fOr aCceSs: iN paRTIcUlar, this soundS LIke KeY_rEAD in yOur Case.
MorEovEr, I WouLd cAlL RegGetVaLue() insteAd Of reGQUerYValuEex(), as the fOrMer MaKes Sure tHAt the rEturnEd stRiNg IS NUl-terminATeD


A:

You have to use "bil lId" inste ad of  "b ill id " an d "p roductId" inst e ad o f "productID" in reque st bo dy . 
You ha ve to  use th e  s a m e n am einre q ue stbod y a s you d efine in E nti ty  class for s e ri alizationand  it's case s ens itive. 
U se@ Embed dab le on  Billi n gDetai lsEmbedde dI d  class 
 Q:

C a n no t re ad string from Wi n do w s registry

My  goalis to g etthe  current S et upPat h  of the in s t a lle d  Outlook Vers ion.
I uset hefollow in g c o de inorder  t o  ac hieve that: 
HKE Y hKey;
LONG l R eturn = RegOpen KeyEx( HKE Y_L OCAL _ MA CH INE ,  _ T( "SO F TWA RE\\Micr os of t\\Wi ndow s \ \ C urre ntV ersi on\\A pp Paths\\OUT LOO K.EX E "), 
   0L,
   K EY _ALL_ ACCESS ,
   & hKey);

if (lRe turn  == ERROR _SU CC ESS ){
  CStrin g s trD ata;
   DWORD   d wS i z e  =  1024;
    DWORD  d w T yp e;

   lRetur n  =  R e gQueryVa lu eEx (hKe y , 
      _ T( "Path"), 
     0L ,
      &dwTy pe ,
      ( B YTE*)strD ata.GetB uffer S etLength((int) d wSize),
     & d wS i ze); 

   if (lRet urn= = ER ROR_ S UC CES S )
   {
   cout << strData;
  }
   else{
        cou t << "Read D W ORD fail ed";   }
}
else {
   cou t << "Open Key fail ed";}

RegCl oseKey(hK e y );

Buthow eve r t his w on 't work. It f a i ls a topening  th e Key.
ED ITI f oun dthat the"open ke yfa il ed " O utput was simp ly  an  A cce s Den i ed cau sed b y no nad m inrights. Bu t howe ve rif i  ru nit in  Adm i n m ode the  output i s a Hexa de ci mal Val ue which will  c hange ever yt ime .

A:F irst, si nce you are using C++,c onsider  ma kingyour  coding l ife  simpl er, defini ng a s imple  c las s thata u to mat ic ally calls R egC loseK ey () o n the o pen key. 
Then, wh e n y ou open the k ey,  con s i de r t h em ini mu m  fl a g  you need for a ccess: inpa r ti cular, thi s  so un ds like  KEY_RE AD in your ca se.
Moreo ver, I wo ul d ca l l  Re gGetValue( ) instea d of RegQ u eryVa l ue Ex(),  as  the f or mer  make s sure tha t the  retur ne d stri ng is  N UL-termi nated


A:

You have_to use_"billId" instead of "billid"_and "productId"_instead_of "productID"_in_request body.
You have_to use the_same name in requestbody_as you define_in_Entity class for serialization and it's case sensitive.
Use @Embeddable on BillingDetailsEmbeddedId class

 Q:

Cannot read_string_from Windows_registry

My_goal_is to get the current_SetupPath of the installed Outlook_Version.
I use_the following code in order to achieve that:
HKEY_hKey;

LONG_lReturn = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
_   _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\OUTLOOK.EXE"),
    0L,
_   KEY_ALL_ACCESS,
  _ &hKey);

if (lReturn_==_ERROR_SUCCESS)
{
_   CString_strData;
    DWORD _ dwSize = 1024;
  _ DWORD   dwType;

  _ lReturn = RegQueryValueEx(hKey,
  _    __T("Path"),
 _    _ 0L,
 _ _  _ &dwType,
    _  _(BYTE *)strData.GetBufferSetLength((int)dwSize),
    __  &dwSize);

___ if_(lReturn == ERROR_SUCCESS)
__ _{
_     __cout << strData;
    }
_   else_{
_   _   cout <<_"Read DWORD failed";
   _}
}
else {
_ _ cout << "Open Key failed";
}

RegCloseKey(hKey);

But however this won't work. It_fails at opening the Key. 
EDIT
I_found that the "open_key failed"_Output_was simply an_Acces_Denied caused_by non admin rights. But however if_i run_it in Admin mode the output_is a Hexadecimal Value_which_will change everytime.

A:

First, since you are_using C++, consider making your coding_life simpler, defining a simple_class_that_automatically calls RegCloseKey() on the_open key. 
Then, when you open_the key, consider_the minimum flag you need for access:_in_particular, this sounds like KEY_READ in_your_case.
Moreover, I would call RegGetValue() instead_of_RegQueryValueEx(),_as the former makes sure_that the returned string is NUL-terminated