0

Its really hard going to code to save the ip settings(RegSetValueEx()) from cpp(By registry editing of WinCe). Its issue about encoding of string(which I parse to BYTE* and if I use hardcoded string,parsed it to same BYTE* it supports) Anybody can support for coding, will be good.Otherwise , please show me the different routes if you can. (Like batch file(setting ip with ipconfig) to execute from cpp).

HKEY hKey;
int res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Comm\\ENET1\\Parms\\TcpIp", 0, KEY_WRITE, &hKey);
const BYTE* data = (BYTE*)text;
long ret = RegSetValueEx(hKey,L"IpAddress",0,REG_MULTI_SZ,data,16);
RegCloseKey(HKEY_LOCAL_MACHINE);

It should save ip on WinCe from cpp.

  1. By batch file executing from cpp.
  2. Registry editing from cpp.
  3. Or any other method.
2
  • don't know if this'll work on wince: stackoverflow.com/questions/25862904/… Commented Feb 17, 2023 at 13:06
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Commented Feb 18, 2023 at 19:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.