Readme: Update examples

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2022-02-03 16:07:51 +01:00
parent 7fab825e5f
commit 4520593e49

View File

@ -18,8 +18,9 @@ The classes provide unified create methods and free destructors. They are like _
```C++ ```C++
// Load and set icon. // Load and set icon.
winstd::library lib_shell32; winstd::library lib_shell32(LoadLibraryEx(_T("shell32.dll"), NULL, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE));
if (lib_shell32.load(_T("shell32.dll"), NULL, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE)) if (!lib_shell32)
throw winstd::win_runtime_error("LoadLibraryEx failed");
m_note_icon->SetIcon(wxLoadIconFromResource(lib_shell32, MAKEINTRESOURCE(48))); m_note_icon->SetIcon(wxLoadIconFromResource(lib_shell32, MAKEINTRESOURCE(48)));
``` ```
@ -65,11 +66,13 @@ if (dwMaxSendPacketSize < sizeof(EapPacket))
#include <string> #include <string>
#include <iostream> #include <iostream>
using namespace std;
void main() void main()
{ {
std::wstring path; wstring path;
PathCanonicalize(path, _T("C:\\Windows\\Temp\\test\\..")); PathCanonicalizeW(path, L"C:\\Windows\\Temp\\test\\..");
std::cout << path.c_str() << std::endl; wcout << path.c_str() << endl;
} }
``` ```