I am new to TWAIN programming. I was reading the specification and got confused when trying to do this:
appIdentity.SupportedGroups = DF_APP2;
lstrcpy(appIdentity.Manufacturer, "My Company");
I got the error message
error C2664: 'lstrcpyW' : cannot convert parameter 1 from 'TW_STR32' to 'LPWSTR'
on my Visual C++ Express on Windows Vista.
The code works in Twacker’s source code.
Please help. Thanks in advance!
TW_STR32 is Multi Byte and you’re trying to use a Wide Char pointer to acces it, you just can’t (without blowing up your software).
You need to convert it using MultiByteToWideChar … or to compile in multibyte instead of unicode wide char.
Thanks for the reply!
It works with your answer.
I found more information here as well: http://msdn.microsoft.com/en-us/library/z207t55f%28VS.80%29.aspx