# Crashing when retrieving Process ID

**URL:** <https://forums.unrealengine.com/t/crashing-when-retrieving-process-id/343138>\
**Category:** Blueprint\
**Tags:** unreal-engine, question, Blueprint, CPP, process\
**Created:** [January 5, 2016, 4:40am UTC](https://forums.unrealengine.com/t/crashing-when-retrieving-process-id/343138 "2016-01-05T04:40:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Taurian](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Taurian](https://forums.unrealengine.com/u/Taurian)\
**Post date:** [January 5, 2016, 4:40am UTC](https://forums.unrealengine.com/t/crashing-when-retrieving-process-id/343138/1 "2016-01-05T04:40:07Z")

</div>

Hello I’m trying to start a process, and get it’s process id. However when I run the code below the editor crashes. I’m guessing it’s because the process hasn’t had enough time to start up and give me the ID.

Does anyone know a way to retrieve the process id when using CreateProc()?

```
FString UMyTestClass::MyTestClass(FString MyTextVariable)
{	
	const TCHAR* wavLink = *MyTextVariable;
	uint32* OutProcessID = 0;
	FProcHandle RecordAudioProcess = FPlatformProcess::CreateProc(TEXT("MrProgram.exe"), wavLink, true, false, false, OutProcessID, 0, nullptr, nullptr);

	return TCHAR_TO_UTF8(OutProcessID);
}
```

---

<div class="post-metadata">

**Author:** ![Daekesh](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/daekesh/32/918652_2.png) [@Daekesh](https://forums.unrealengine.com/u/Daekesh)\
**Post date:** [January 5, 2016, 12:25pm UTC](https://forums.unrealengine.com/t/crashing-when-retrieving-process-id/343138/2 "2016-01-05T12:25:09Z")

</div>

Have you tried TCHAR\_TO\_UTF8( \*OutProcessID ); ?

Or, better yet, FString::FromInt( \*OutProcessID );
