Changeset 3678 for trunk/src/kernel32/registry.cpp
- Timestamp:
- Jun 8, 2000, 8:08:58 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/registry.cpp
r2984 r3678 1 /* $Id: registry.cpp,v 1. 1 2000-03-03 11:15:59sandervl Exp $ */1 /* $Id: registry.cpp,v 1.2 2000-06-08 18:08:56 sandervl Exp $ */ 2 2 3 3 /* … … 30 30 #include "unicode.h" 31 31 #include <winreg.h> 32 33 #define DBG_LOCALLOG DBG_registry 34 #include "dbglocal.h" 32 35 33 36 … … 789 792 790 793 ODINFUNCTION4(LONG,RegQueryValueW,HKEY, hkey, 791 792 793 794 LPCWSTR,lpszSubKey, 795 LPWSTR, lpszValue, 796 PLONG, pcbValue) 794 797 { 795 798 char *astring1 = UnicodeToAsciiString((LPWSTR)lpszSubKey); … … 803 806 if(rc == ERROR_SUCCESS) 804 807 { 805 astring2 = (char *)malloc(*pcbValue); 806 strcpy(astring2, (char *)lpszValue); 807 AsciiToUnicode(astring2, lpszValue); 808 free(astring2); 808 if(pcbValue) { 809 astring2 = (char *)malloc(*pcbValue); 810 strcpy(astring2, (char *)lpszValue); 811 AsciiToUnicode(astring2, lpszValue); 812 free(astring2); 813 } 809 814 } 815 FreeAsciiString(astring1); 810 816 return(rc); 811 817 } … … 918 924 919 925 ODINFUNCTION5(LONG,RegSetValueW,HKEY, hkey, 920 921 922 923 926 LPCWSTR,lpSubKey, 927 DWORD, dwType, 928 LPCWSTR,lpData, 929 DWORD, cbData) 924 930 { 925 931 char *astring1 = UnicodeToAsciiString((LPWSTR)lpSubKey); … … 956 962 957 963 ODINFUNCTION6(LONG,RegSetValueExA,HKEY, arg1, 958 959 960 961 962 964 LPSTR, arg2, 965 DWORD, arg3, 966 DWORD, arg4, 967 BYTE*, arg5, 968 DWORD, arg6) 963 969 { 964 970 return _O32_RegSetValueEx(ConvertKey(arg1),
Note:
See TracChangeset
for help on using the changeset viewer.