About the simple use of OBS frontend API, but it failed

KarlNG

New Member
I want to control OBS for recording through the OBS frontend API, but it always prompts me that there is no callback in the call, the following is my code:

[DllImport("obs-frontend-api.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void obs_frontend_recording_start();

public StartRecording()
{
obs_frontend_recording_start();
// I always receive this following error output after calling obs_frontend_recording_start()
// error: Tried to call obs_frontend_recording_start with no callbacks!
}

Can anyone tell me what's wrong?
TIA
 
Top