Can I call lua just for handle some process?

For example, I ‘d like to call a lua function (such as CreateUI(param1, param2)), then in C++ code,
I can use like this
pEngine->executeFunctionWithParamters(’nHandler’, param1, param2)

Can I?

Sorry, new for lua, maybe is stupid.