Unicorn with delicious cookie
Nous utilisons des cookies pour améliorer votre expérience de navigation. En savoir plus
Accepter
to the top
>
>
>
Confusion of WPARAM with UINT, and LPAR…

Confusion of WPARAM with UINT, and LPARAM with LONG

23 Jan 2012
Author:

A great deal of compilation errors occurring when trying to recompile a 32-bit Windows application for 64-bit systems is related to inccorect function arguments. You may often see that in user code UINT and LONG types are used instead of WPARAM and LPARAM as function arguments.

Here is an example:

//Function definition in the class
virtual LRESULT OnTrayNotification(WPARAM uID, LPARAM lEvent);
//Function implementation
LRESULT CSystemTray::OnTrayNotification(UINT wParam, LONG lParam)

In Win32 the type WPARAM coincides with UINT and LPARAM coincides with LONG. In Win64 these are different types, so you must correct the code. See also the post "A common error occurring when compiling a 64-bit application: error C2440, OnTimer" on this topic.

Popular related articles

S'abonner

Comments (0)

close comment form
close form

Remplissez le formulaire ci‑dessous en 2 étapes simples :

Vos coordonnées :

Étape 1
Félicitations ! Voici votre code promo !

Type de licence souhaité :

Étape 2
Team license
Enterprise licence
** En cliquant sur ce bouton, vous déclarez accepter notre politique de confidentialité
close form
Demandez des tarifs
Nouvelle licence
Renouvellement de licence
--Sélectionnez la devise--
USD
EUR
* En cliquant sur ce bouton, vous déclarez accepter notre politique de confidentialité

close form
La licence PVS‑Studio gratuit pour les spécialistes Microsoft MVP
close form
Pour obtenir la licence de votre projet open source, s’il vous plait rempliez ce formulaire
* En cliquant sur ce bouton, vous déclarez accepter notre politique de confidentialité

close form
I want to join the test
* En cliquant sur ce bouton, vous déclarez accepter notre politique de confidentialité

close form
check circle
Votre message a été envoyé.

Nous vous répondrons à


Si l'e-mail n'apparaît pas dans votre boîte de réception, recherchez-le dans l'un des dossiers suivants:

  • Promotion
  • Notifications
  • Spam