Blog - Title

  • Fabulous Adventures In Coding

    hash.cpp

    • 0 Comments
    #include "headers.h" ULONG ComputeHash(const WCHAR * psz) { AssertReadString(psz); ULONG hash = 0; while (*psz != '\0') { hash = 17 * hash + *psz; ++psz; } return hash; }
  • Fabulous Adventures In Coding

    binder.h

    • 0 Comments
    #ifndef BINDER_H // { #define BINDER_H class Binder : public IDispatch { protected: class Name { public: Name(); ~Name(); HRESULT SetValue(VARIANTARG * pvar); HRESULT GetValue(VARIANT * pvar); BOOL IsFunction(void); HRESULT ExecuteFunction...
  • Fabulous Adventures In Coding

    Many Happy Returns

    • 1 Comments
    Happy birthday Channel Nine! In this episode I finally discover why it is that Charles picked me to be the guinea pig, and I wax verbose on the subject of human brains.
  • Fabulous Adventures In Coding

    High-Dimensional Spaces Are Counterintuitive, Part Two

    • 2 Comments
    The volume of an n-cube of edge length s is easy to work out. A 2-cube has s 2 units of area. A 3-cube has s 3 units of volume. A 4-cube has s 4 units of 4-volume, and so on -- an n-cube has s n units of n-volume. If the n-cube has edge of s>1, say...
  • Fabulous Adventures In Coding

    dllmain.h

    • 1 Comments
    #ifndef DLLMAIN_H // { #define DLLMAIN_H extern void DLLAddRef(void); extern void DLLRelease(void); extern void DLLAddLock(void); extern void DLLReleaseLock(void); #endif // DLLMAIN_H }
  • Fabulous Adventures In Coding

    classfac.h

    • 0 Comments
    #ifndef CLASSFAC_H #define CLASSFAC_H class ClassFactory : public IClassFactory { private: long m_cref; ClassFactory(); ~ClassFactory(); public: static HRESULT Create(ClassFactory * * ppFactory); // IUnknown STDMETHODIMP QueryInterface...
  • Fabulous Adventures In Coding

    Are JScript strings passed by value or by reference?

    • 1 Comments
      I was describing some of the semantics of reference types earlier, and that reminded me of one of the first questions I was ever asked about reference semantics.   Pop quiz: Are JScript strings passed by reference...
  • Fabulous Adventures In Coding

    classfac.cpp

    • 0 Comments
    #include "headers.h" // ClassFactory ClassFactory::ClassFactory() { m_cref = 1; } ClassFactory::~ClassFactory() { } HRESULT ClassFactory::Create(ClassFactory * * ppFactory) { AssertOutPtr(ppFactory); *ppFactory = new ClassFactory(); if (NULL...
Page 32 of 32 (783 items) «2829303132