Pointer conversion
Posted: Fri Nov 25, 2016 11:20 am
Hello,
I need some help casting pointers in some ugly, old winapi functions:
Error XS1503 Argument 5: cannot convert from 'void*' to 'byte*'
local nValue as dword
...
nRet := RegSetValueEx( pSubKey, ;
String2Psz(cValueName), ;
0, ;
REG_DWORD, ;
ptr(_cast, @nValue),;
DWORD(nSize) )
Error XS1503 Argument 3: cannot convert from 'void*' to 'word*'
local pUnicode as ptr
...
iNum := dword(WideCharToMultiByte(;
ncp,; // CodePage AS DWORD
0,; // dwFlags AS DWORD
pUnicode,; // lpWideCharStr AS PSZ
isLen,; // cchWideChar AS INT
null_psz,; // lpMultiByteStr AS PSZ
0,; // cchMultiByte AS INT
null_ptr,; // lpDefaultChar AS PSZ
null_ptr )) // lpUsedDefaultChar AS LOGIC PTR
I need some help casting pointers in some ugly, old winapi functions:
Error XS1503 Argument 5: cannot convert from 'void*' to 'byte*'
local nValue as dword
...
nRet := RegSetValueEx( pSubKey, ;
String2Psz(cValueName), ;
0, ;
REG_DWORD, ;
ptr(_cast, @nValue),;
DWORD(nSize) )
Error XS1503 Argument 3: cannot convert from 'void*' to 'word*'
local pUnicode as ptr
...
iNum := dword(WideCharToMultiByte(;
ncp,; // CodePage AS DWORD
0,; // dwFlags AS DWORD
pUnicode,; // lpWideCharStr AS PSZ
isLen,; // cchWideChar AS INT
null_psz,; // lpMultiByteStr AS PSZ
0,; // cchMultiByte AS INT
null_ptr,; // lpDefaultChar AS PSZ
null_ptr )) // lpUsedDefaultChar AS LOGIC PTR