1
2
3
4
5
6
7
#include <ole2.h> 
#define BUFFER_SIZE 100

size_t   i;
LPCWSTR strLPCWSTR = L"sometext";
char *strChar = new char[BUFFER_SIZE];
wcstombs_s(&i, strChar, (size_t)BUFFER_SIZE, strLPCWSTR, (size_t)BUFFER_SIZE);