Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define __BUILDING_DLL
- #include "MyDLLExports.h"
- #include "windows.h"
- #include <string>
- #include <cwchar>
- // appends "abcdef" to text in girdi.
- // girdi must be user supplied buffer of at least 256 wchar_t.
- // return value is girdi
- wchar_t *__stdcall deneme(wchar_t *girdi)
- {
- // No need to convert to single byte character strings.
- std::wstring ws(girdi);
- ws.append(L"abcdef");
- // Copy text in string to buffer provided by user.
- std::wcscpy_s(girdi, 256, ws.c_str());
- return girdi;
- //---------------------------------------------------
- // alternatively, you could simply do:
- //---------------------------------------------------
- // std::wscat_s(girdi, 256, L"abcdef");
- // return girdi;
- //---------------------------------------------------
- }
Advertisement
Add Comment
Please, Sign In to add comment