Hallo,
danke für die schnelle Antwort. Habe alles dementsprechend geändert doch nun stürzt beim Test der Unreal Editor ab.
Der Editor gibt mir vollende Zeile an (mit -> gekennzeichnet.)
Code
using CSByteTestFn = std::string (__stdcall*) ();
FByteArray UMyBlueprintFunctionLibrary::CSByteTest()
{
HMODULE mod = LoadLibraryA("UnrealTest.dll");
CSByteTestFn CSByteTest = reinterpret_cast<CSByteTestFn>(GetProcAddress(mod, "ByteTest"));
-> std::string test = CSByteTest();
FString Str = FString(ANSI_TO_TCHAR(test.c_str()));
size_t n = strlen(test.c_str());
int size = static_cast<int>(n);
UE_LOG(LogTemp, Log, TEXT("CSharp: %s (%d)"), *Str,size);
FByteArray BA = FByteArray();
BA.Bytes = Str;
BA.Size = size;
return BA;
}
Alles anzeigen
hab ich was falsch gemacht oder geht es einfach nur nicht. Beim Erstellen des Projektes war alles i.O. doch beim testen sofortiger absturzt.
Code
LoginId:aba058ff4e8c376e3472169ab1d93964
EpicAccountId:61742c3dceab4e13b087c3f429b255a2
Fatal error: [File:D:/Build/++UE4+Licensee/Sync/Engine/Source/Runtime/Launch/Private/Windows/LaunchWindows.cpp] [Line: 95] SECURE CRT: Invalid parameter detected. Expression: Unknown Function: Unknown. File: Unknown Line: 0
ucrtbase
ucrtbase
UE4Editor_MyProjectB!UMyBlueprintFunctionLibrary::CSByteTest() [I:\unrealprojekts\MyProjectB\Source\MyProjectB\MyBlueprintFunctionLibrary.cpp:84]
UE4Editor_MyProjectB!UMyBlueprintFunctionLibrary::execCSByteTest() [I:\unrealprojekts\MyProjectB\Intermediate\Build\Win64\UE4Editor\Inc\MyProjectB\MyBlueprintFunctionLibrary.gen.cpp:195]
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll
Alles anzeigen