Compile Error after plugin was moved to 4.10 project

Can anyone help me, please? This is the error:

error C4777: ‘swscanf_s’ : format string ‘%4X’ requires an argument of type ‘unsigned int *’, but variadic argument 1 has type ‘DWORD *’
WinJoystick.h(664): note: consider using ‘%lX’ in the format string

and this is the Code:


						DWORD dwPid = 0, dwVid = 0;
						WCHAR* strVid = wcsstr(var.bstrVal, L"VID_");
						if (strVid && swscanf_s(strVid, L"VID_%4X", &dwVid) != 1)
							dwVid = 0;
						WCHAR* strPid = wcsstr(var.bstrVal, L"PID_");
						if (strPid && swscanf_s(strPid, L"PID_%4X", &dwPid) != 1)
							dwPid = 0;

Haha - after a few hours of sleep and a fresh cup of steaming coffee - yeah, the answer is right there in the compiler warning.

lol :rolleyes:

problem solved :slight_smile: