// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <stdio.h>

#include <afx.h>
#include <objbase.h>
#include <oleauto.h>
#include <wtypes.h>
#include <atlconv.h>

int main(int argc,char **argv)
{
   USES_CONVERSION;
   LPCWSTR s = A2CW(argv[1]);
   printf("%s\n",W2A(s));
   CString s2 = s;
   const char *s3 = (LPCTSTR)s2;
   printf("%s\n",s3);
   return 0;
}
