# Calling BP Functions from C++

**URL:** <https://forums.unrealengine.com/t/calling-bp-functions-from-c/454173>\
**Category:** Blueprint\
**Tags:** unreal-engine, functions, UE4, Blueprint, question, CPP, calls\
**Created:** [August 21, 2019, 7:07am UTC](https://forums.unrealengine.com/t/calling-bp-functions-from-c/454173 "2019-08-21T07:07:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Panakotta00](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Panakotta00](https://forums.unrealengine.com/u/Panakotta00)\
**Post date:** [August 21, 2019, 7:07am UTC](https://forums.unrealengine.com/t/calling-bp-functions-from-c/454173/1 "2019-08-21T07:07:54Z")

</div>

How can I Call a Function via C++?

I’ve found the function “UObject::FindFunction” which allows me to find and get a UFunction instance by a name and UObject instance, I checked and it returns a valid pointer. Now I need to call this function, but how?  
I thought of “UObject::CallFunction” but idk what I should use for Z\_PARAM\_RESULT and Stack… I tried and made a FFrame, and used the nullptr for Z\_PARAM\_RESULT, cause my function has at the moment no returns or params. But if I call it, it just crashes with “access violation reading location”  
I can’t use CallFunctionRemote or CallFunctionByNameWithArguments, except there is an easy way to get the function pointer of CallFunctionRemote xD

---

<div class="post-metadata">

**Author:** ![Fenrir\_Willow](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fenrir_willow/32/755755_2.png) [@Fenrir\_Willow](https://forums.unrealengine.com/u/Fenrir_Willow)\
**Post date:** [August 21, 2019, 9:37am UTC](https://forums.unrealengine.com/t/calling-bp-functions-from-c/454173/2 "2019-08-21T09:37:50Z")

</div>

I don’t know the answer to your exact question, so apologies in advance. However, the blueprint and C++ framework provide a solution for a similar situation: `BlueprintNativeEvents`. In short this allows you to have both a C++ and a Blueprint implementation of a function. I recommend reading [this guide on the wiki](https://wiki.unrealengine.com/Blueprints,_Empower_Your_Entire_Team_With_BlueprintNativeEvents) for a quick deep dive. This solution is especially useful when you have generic logic implemented in C++, but you also want specific logic executed in your Blueprint.

This may or may not help your exact situation, since I don’t know the exact scenario where you are using your function call.
