You can actually just use a FPlatformNamedPipe object (Runtime/Core/Public/HAL/PlatformNamedPipe.h) which will wrap all that code for you in a platform independent way and will make the call to CreateFile for you. If you still want to manage that pipe yourself, you can look at Runtime/Core/Private/Windows/WindowsPlatformNamedPipe.cpp which calls CreateFile and just uses the * operator on an FString to pass it to the windows API call.