Advertisement

UE4 笔记

阅读量:

FilePath: 需要访问的文件存储位置(例如:D:\XXX.txt)

复制代码
    	const char* str = TCHAR_TO_ANSI(*FilePath);
    #if PLATFORM_WINDOWS
    	ShellExecuteA(nullptr, "open", str, NULL, NULL, SW_SHOW);
    	return true;
    #else
    	UE_LOG(Log_Temp, Log, TEXT("platform is not support!"));
    	return false;
    #endif
    
    
      
      
      
      
      
      
      
      
    

请勿忘记包含必要的头文件:

复制代码
    #if PLATFORM_WINDOWS
    #include "Windows/MinWindows.h"
    #include <shellapi.h>
    #endif
    
    
      
      
      
      
    

全部评论 (0)

还没有任何评论哟~