[SOLVED] BroadcastSystemMessage LPDWORD parameter incompatibility lazarus / 34-Windows ---------------------------------------------------------------------- Kepsz · 2015-07-24 09:05 After modify the PATH env variable in regedit, it is required to send a WM_SETTINGSCHANGE system message to finish the PATH update. This is how i try to do this: Code: [Select]BroadcastSystemMessage(BSF_POSTMESSAGE, BSM_ALLCOMPONENTS, WM_SETTINGCHANGE, 0, 0); But there are problem with the 3. paramterer. "Got ShortInt", expected "LPDWORD". The value of WM_SETTINGCHANGE is 26. I tryed replaceing it with different numeric types, but just get various type incompatible messages. So i do not know how to solve this. Lazarus 1.4.2 32bit. ---------------------------------------------------------------------- rvk · 2015-07-24 10:39 Are you sure the problem is with parameter 3??? Please copy and paste the error messaged here. (you can right click and choose copy/selected message) I think the problem is with parameter 2. Try this: Code: [Select]var   dwRecipient: DWord; begin   dwRecipient := BSM_ALLCOMPONENTS;   BroadcastSystemMessage(BSF_POSTMESSAGE, @dwRecipient, WM_SETTINGCHANGE, 0, 0); ---------------------------------------------------------------------- Kepsz · 2015-07-24 11:15 Hmm, seems like i get lost in the parameter list. o.O That was the second parameter, not the third. Thanks for your code sample, now it's working fine!