MIME-version: 1.0 Message-id: From: Gisle Vanem References: <1313588569-18927-1-git-send-email-heiko.hund@...1489...> <1313588569-18927-2-git-send-email-heiko.hund@...1489...> Date: Wed, 17 Aug 2011 16:28:42 +0200 Subject: Re: [Openvpn-devel] [PATCH 1/3] add MinGW WinHTTP compatibility layer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-type: text/plain; CHARSET=US-ASCII; charset="US-ASCII"; format=flowed; reply-type=original Content-Transfer-Encoding: 7bit To: Alon Bar-Lev , Heiko Hund Cc: openvpn-devel@lists.sourceforge.net "Alon Bar-Lev" wrote: > These macros are soooooooo ugly! I tend to agree; had to read the code closely. But this hack was cool: union { FUNC ## _fn *type; FARPROC *ptr; } u = { .type = &(LIB ## _ ## FUNC) }; ... *(u.ptr) = GetProcAddress (lib, (#FUNC)); Where did you get that Heiko? --gv