# How do I access FMOD\_STUDIO\_EVENTINSTANCE properties in C++?

**URL:** <https://qa.fmod.com/t/how-do-i-access-fmod-studio-eventinstance-properties-in-c/16011>\
**Category:** FMOD Engine\
**Tags:** cpp\
**Created:** [July 25, 2020, 11:33pm UTC](https://qa.fmod.com/t/how-do-i-access-fmod-studio-eventinstance-properties-in-c/16011 "2020-07-25T23:33:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shadoninja](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Shadoninja](https://qa.fmod.com/u/Shadoninja)\
**Post date:** [July 25, 2020, 11:33pm UTC](https://qa.fmod.com/t/how-do-i-access-fmod-studio-eventinstance-properties-in-c/16011/1 "2020-07-25T23:33:03Z")

</div>

Hello! I am making my own [FMOD\_STUDIO\_EVENT\_CALLBACK](https://www.fmod.com/resources/documentation-api?version=2.0&page=studio-api-eventinstance.html#fmod_studio_event_callback) implementation, but the `FMOD_STUDIO_EVENTINSTANCE` type described in the function definition doesn’t have any data on it for me to access in the C++ code. All I can find is this:

```auto
typedef struct FMOD_STUDIO_EVENTINSTANCE FMOD_STUDIO_EVENTINSTANCE;

```

The docs in for the callback function say that the `FMOD_STUDIO_EVENTINSTANCE` is actually a `Studio::EventInstance`, but I am not sure how to leverage that in my code.

Edit: I actually got it figured out (I think). I cast it to the EventInstance type and have been making ground:

```auto
int count;
FMOD::Studio::EventDescription* eventDescription;
((FMOD::Studio::EventInstance*) event)->getDescription(&eventDescription);
eventDescription->getInstanceCount(&count);

```

Why is there a layer of indirection with the type here?

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [July 28, 2020, 12:38am UTC](https://qa.fmod.com/t/how-do-i-access-fmod-studio-eventinstance-properties-in-c/16011/2 "2020-07-28T00:38:52Z")

</div>

We have a single callback structure shared between C and C++, as you’ve discovered to access the C++ interface you need to cast to the C++ equivalent type, i.e. FMOD\_STUDIO\_EVENTINSTANCE becomes FMOD::Studio::EventInstance.
