Subversion Repositories spk

Rev

Rev 1 | Rev 242 | Go to most recent revision | 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
 
6
#include <CyString.h>
191 cycrow 7
#include <Utils/WString.h>
1 cycrow 8
#include "../../common/InputBox.h"
9
 
10
using namespace System;
11
using namespace System::Runtime::InteropServices;
12
 
13
inline CyString CyStringFromSystemString( System::String ^str)
14
{
15
	if ( !str || !str->Length )
16
		return NullString;
17
	const char* chars = (const char*)(Marshal::StringToHGlobalAnsi(str)).ToPointer();
18
	std::string s = chars;
19
	Marshal::FreeHGlobal(IntPtr((void*)chars));
20
	return CyString(s);
21
}
22
 
23
inline System::String ^SystemStringFromCyString ( CyString str )
24
{
25
	System::String ^Str = gcnew System::String(str.c_str());
26
	return Str;
27
}
191 cycrow 28
 
29
inline System::String^ _US(const Utils::WString& str)
30
{
31
	System::String^ Str = gcnew System::String(str.c_str());
32
	return Str;
33
}