Is it safe to use LPCTSTR in a structure with the WM_COPYDATA message?
问题 I have this structure: typedef struct tagCOPY_PACKET { TCHAR szFile[_MAX_PATH]; GUID guidSignature; } S_COPY_PACKET; I prepare to send data with WM_COPYDATA like this: CString strFile = GetFileToOpenFromFileExplorerPath(); S_COPY_PACKET sCopyDataPacket; _tcscpy_s(sCopyDataPacket.szFile, _MAX_PATH, strFile); sCopyDataPacket.guidSignature = CopyData_Signature; COPYDATASTRUCT cds; cds.dwData = COPYDATA_TYPE_MSA; cds.cbData = sizeof(sCopyDataPacket); cds.lpData = &sCopyDataPacket; DWORD_PTR