Skip to content

Instantly share code, notes, and snippets.

@bkuhns
Last active December 14, 2015 20:19
Show Gist options
  • Save bkuhns/5142716 to your computer and use it in GitHub Desktop.
Save bkuhns/5142716 to your computer and use it in GitHub Desktop.
Example of trying to mock a COM interface.
#import <system/ado/msado15.dll> rename_namespace("ADONS"), rename("EOF", "adoEOF")
#include <hippomocks.h>
int main()
{
MockRepository mocks;
auto pConn = mocks.Mock<ADONS::_Connection>();
mocks.OnCall(pConn, ADONS::_Connection::AddRef).Return(1);
ADONS::_ConnectionPtr conn = pConn;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment