Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > SDK Help
  New Posts New Posts
  FAQ FAQ  Forum Search

CheckCoreMessage returns always false

  Topic Search Topic Search
peterakos View Drop Down

Joined: 2015 Jul 13
Online Status: Offline
Posts: 349
Direct Link To This Post Topic: CheckCoreMessage returns always false
    Posted: 2018 Apr 23 at 1:47am

User Information:

Cinema 4D Version:   R18 
Platform:   Windows  ;   
Language(s):     C++  ;   



In a custom thread, I call SpecialEventAdd(id, p1, p2) and I have a dialog that is supposed to process this event. 
The problem is that for some reason CheckCoreMessage returns false even thought the event has not been already processed. 
What can I do to properly handle the special event ? 

Thank you.

Edited by peterakos - 2018 Apr 23 at 1:48am
Back to Top
Andreas Block View Drop Down
Forum Moderator
Forum Moderator

Joined: 2014 Oct 01
Location: Hannover
Online Status: Offline
Posts: 1878
Direct Link To This Post Posted: 2018 Apr 24 at 7:36am

hard to say, but maybe it helps to provide some background info.

SpecialEventAdd() posts an event into a queue. In certain intervals in the main thread these events will be processed and distributed. When doing so, the events get a timestamp (a counter in BFM_CORE_UNIQUEID). This timestamp is identical for all events distributed in one interval.

CheckCoreMessage() checks a timestamp of the event and stores it in a member variable of the GeDialog (if ownlastcoremsg parameter is not provided).
This might already be an issue in your case. For example, if a bunch of events pile up, only the first would pass CheckCoreMessage() as all following would have the same timestamp (even though the events are of different type).

A solution may be to do CheckCoreMessage() based on event type and store the last timestamp on your own (via ownlastcoremsg parameter).

Let me know, if this helped.

SDK Support Engineer
Back to Top

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.094 seconds.