Subversion Repositories spk

Rev

Rev 242 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 cycrow 1
// stdafx.h : include file for standard system include files,
2
// or project specific include files that are used frequently, but
3
// are changed infrequently
4
#pragma once
5
 
298 cycrow 6
#ifdef _WIN32
7
#include <windows.h>
8
#endif
191 cycrow 9
#include <Utils/WString.h>
1 cycrow 10
#include "../../common/InputBox.h"
11
 
12
using namespace System;
13
using namespace System::Runtime::InteropServices;
14
 
242 cycrow 15
 
191 cycrow 16
inline System::String^ _US(const Utils::WString& str)
17
{
18
	System::String^ Str = gcnew System::String(str.c_str());
19
	return Str;
20
}
242 cycrow 21
 
22
inline Utils::WString _WS(System::String^ str)
23
{
24
	if (!str || !str->Length)
25
		return L"";
26
	const wchar_t* chars = (const wchar_t*)(Marshal::StringToHGlobalUni(str)).ToPointer();
27
	std::wstring s = chars;
28
	Marshal::FreeHGlobal(IntPtr((void*)chars));
29
	return s;
30
}