Skip to content

Instantly share code, notes, and snippets.

View vSzemkel's full-sized avatar
💭
[\*]{5}\s[\*]{3}

Marcin Buchwald vSzemkel

💭
[\*]{5}\s[\*]{3}
View GitHub Profile
@vSzemkel
vSzemkel / OAuth2_O365.cs
Created November 5, 2020 11:16
Demonstrates how to send and receive emails with OAuth2 authentication and Office 365
namespace OAuthWithO365
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using MailKit;
using MailKit.Net.Imap;
@vSzemkel
vSzemkel / download-parse-read-IXMLDOMDocument .cpp
Last active August 31, 2017 08:56
Download, parse and read IXMLDOMDocument
#include <afx.h>
#include <msxml2.h>
HRESULT CDocumentEvidenceManager::TryResolvePageDerivation(SDocumentEvidence evidence, const char* destinationPath)
{
HRESULT ret = S_OK;
// format url with xml source stream
CString url;
const CString title = evidence.szTitle;
@vSzemkel
vSzemkel / QueryStringObjectSerializer.cs
Last active July 19, 2017 09:58
QueryStringObjectSerializer enables caching sophisticated results of GET search requests in favor of POST noncachable ones
// -----------------------------------------------------------------------
// <copyright file="QueryStringObjectSerializer.cs" company="Agora SA">
// Copyright (c) TDE - Development IT , lipiec 2017
// <author>Marcin Buchwald</author>
// </copyright>
// -----------------------------------------------------------------------
namespace NewsMavens.Models.Helpers
{
using System;
@vSzemkel
vSzemkel / MsgWaitForMultipleObjectsEx.cpp
Created July 1, 2017 08:31
MsgWaitForMultipleObjectsEx with MWMO_ALERTABLE
// MsgWaitForMultipleObjectsEx.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <Windows.h>
VOID CALLBACK APCProc(ULONG_PTR dwParam) {
printf("Worker thread in APCProc\n");
};