Subversion Repositories spk

Rev

Rev 1 | 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>
7
#include "../../common/InputBox.h"
8
 
9
using namespace System;
10
using namespace System::Runtime::InteropServices;
11
 
12
inline CyString CyStringFromSystemString( System::String ^str)
13
{
14
	if ( !str || !str->Length )
15
		return NullString;
16
	const char* chars = (const char*)(Marshal::StringToHGlobalAnsi(str)).ToPointer();
17
	std::string s = chars;
18
	Marshal::FreeHGlobal(IntPtr((void*)chars));
19
	return CyString(s);
20
}
21
 
22
inline System::String ^SystemStringFromCyString ( CyString str )
23
{
24
	System::String ^Str = gcnew System::String(str.c_str());
25
	return Str;
26
}