ILK example

#include <windows.h>

 

int main(int, char **)

{

    LPMALLOC        lpIm;

    CoGetMalloc( MEMCTX_TASK, (LPMALLOC*)&lpIm);

    //do something with lpIm

// IMalloc_Release(lpIm); //not calling this causes an interface leak

    return(0);

}

(C) Copyright IBM Corporation 1992, 2010.