Raised This Month: $12 Target: $400
 3% 

Use AMX pointer acquired from other thread.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lopol2010
Junior Member
Join Date: Aug 2015
Location: Russia
Old 04-27-2021 , 09:57   Use AMX pointer acquired from other thread.
Reply With Quote #1

Hello gods of mods.
In short: Can i use AMX pointer acquired from other thread?

Full problem:
I use winapi function RegisterWaitForSingleObject which executes callback on different thread with data that you provided as 'Context' when calling RegisterWaitForSingleObject.

This is what i get when call MF_LogError (which accepts amx pointer as 1st arg) from that callback:

An exception was thrown at 0x7C4C0EDF (amxmodx_mm.dll) in hlds.exe: 0xC0000005: Write access violation at 0x88006EC1.

Last edited by Lopol2010; 04-27-2021 at 10:00.
Lopol2010 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 04-27-2021 , 10:27   Re: Use AMX pointer acquired from other thread.
Reply With Quote #2

Any interaction with AMXX should be done on the main thread.
__________________
klippy is offline
Lopol2010
Junior Member
Join Date: Aug 2015
Location: Russia
Old 04-27-2021 , 10:40   Re: Use AMX pointer acquired from other thread.
Reply With Quote #3

Thank you very much!
Lopol2010 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:42.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode