I’m modifying the STablUpd code example on MSDN (For editing string tables in resources) however, I’m running into a few errors.
The code that the errors are situated in is
HSTRBLOCK strBlock = GetStringBlockW( L"file.exe", 7, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_UK) );
UINT str1Len;
GetStringLength( strBlock, str1Len );
LPWSTR pszString1;
GetStringW(strBlock, 6, pszString1 );
MessageBox(NULL, (LPCSTR) pszString1, NULL, NULL);
and the errors I receive are as follows
Error 4 error C2065: 'pszString1' : undeclared identifier tabledlg.c 190 1 STablUpd
Error 5 error C2065: 'pszString1' : undeclared identifier tabledlg.c 191 1 STablUpd
Error 8 error C2065: 'pszString1' : undeclared identifier tabledlg.c 192 1 STablUpd
Error 3 error C2146: syntax error : missing ';' before identifier 'pszString1' tabledlg.c 190 1 STablUpd
Error 2 error C2275: 'LPWSTR' : illegal use of this type as an expression tabledlg.c 190 1 STablUpd
Any anybody point out if there are any errors in this please, I’ve checked but the code seems fine to me.
Any help is appreciated.
It appears that
LPWSTRis not defined. Either you’re missing aninclude, or you’re including the file but the type is excluded by some pre-processor directives.See this for more info.