Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
aqrit committed Jul 30, 2013
0 parents commit d72bd1a
Show file tree
Hide file tree
Showing 17 changed files with 2,908 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .gitattributes
@@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
163 changes: 163 additions & 0 deletions .gitignore
@@ -0,0 +1,163 @@
#################
## Eclipse
#################

*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath


#################
## Visual Studio
#################

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results
[Dd]ebug/
[Rr]elease/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.vspscc
.builds
*.dotCover

## TODO: If you have NuGet Package Restore enabled, uncomment this
#packages/

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf

# Visual Studio profiler
*.psess
*.vsp

# ReSharper is a .NET coding add-in
_ReSharper*

# Installshield output folder
[Ee]xpress

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish

# Others
[Bb]in
[Oo]bj
sql
TestResults
*.Cache
ClientBin
stylecop.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML



############
## Windows
############

# Windows image file caches
Thumbs.db

# Folder config file
Desktop.ini


#############
## Python
#############

*.py[co]

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox

#Translations
*.mo

#Mr Developer
.mr.developer.cfg

# Mac crap
.DS_Store
59 changes: 59 additions & 0 deletions classfactory.cpp
@@ -0,0 +1,59 @@
#include "header.h"

namespace classfactory
{
struct XVTBL
{
HRESULT (__stdcall * QueryInterface)( WRAP* This, const IID& riid, void** ppvObject );
ULONG (__stdcall * AddRef)( WRAP* This );
ULONG (__stdcall * Release)( WRAP* This );
HRESULT (__stdcall * CreateInstance)( WRAP* This, IUnknown *pUnkOuter, REFIID riid, void **ppvObject );
HRESULT (__stdcall * LockServer)( WRAP* This, BOOL fLock );
};

HRESULT __stdcall QueryInterface( WRAP* This, const IID& riid, void** ppvObject )
{
PROLOGUE;
HRESULT hResult = This->cf->lpVtbl->QueryInterface( This->cf, riid, ppvObject );
if( SUCCEEDED( hResult ) ) Wrap( This->dd_parent, iid_to_vtbl( riid ), ppvObject );
EPILOGUE( hResult );
}

ULONG __stdcall AddRef( WRAP* This )
{
PROLOGUE;
ULONG dwCount = This->cf->lpVtbl->AddRef( This->cf );
EPILOGUE( dwCount );
}

ULONG __stdcall Release( WRAP* This )
{
PROLOGUE;
ULONG dwCount = WrapRelease( This );
EPILOGUE( dwCount );
}

HRESULT __stdcall CreateInstance( WRAP* This, IUnknown *pUnkOuter, REFIID riid, void **ppvObject )
{
PROLOGUE;
HRESULT hResult = This->cf->lpVtbl->CreateInstance( This->cf, pUnkOuter, riid, ppvObject );
if( SUCCEEDED( hResult ) ) Wrap( This->dd_parent, iid_to_vtbl( riid ), ppvObject );
EPILOGUE( hResult );
}

HRESULT __stdcall LockServer( WRAP* This, BOOL fLock )
{
PROLOGUE;
HRESULT hResult = This->cf->lpVtbl->LockServer( This->cf, fLock );
EPILOGUE( hResult );
}

const XVTBL xVtbl =
{
QueryInterface, // 0x00
AddRef, // 0x04
Release, // 0x08
CreateInstance, // 0x0C
LockServer // 0x10
};
};
94 changes: 94 additions & 0 deletions clipper.cpp
@@ -0,0 +1,94 @@
#include "header.h"

namespace clipper
{
struct XVTBL
{
HRESULT (__stdcall * QueryInterface)( WRAP* This, const IID& riid, void** ppvObject );
ULONG (__stdcall * AddRef)( WRAP* This );
ULONG (__stdcall * Release)( WRAP* This );
HRESULT (__stdcall * GetClipList)( WRAP* This, LPRECT lpRect, LPRGNDATA lpClipList, LPDWORD lpdwSize );
HRESULT (__stdcall * GetHWnd)( WRAP* This, HWND* lphWnd );
HRESULT (__stdcall * Initialize)( WRAP* This, LPDIRECTDRAW lpDD, DWORD dwFlags );
HRESULT (__stdcall * IsClipListChanged)( WRAP* This, BOOL* lpbChanged );
HRESULT (__stdcall * SetClipList)( WRAP* This, LPRGNDATA lpClipList, DWORD dwFlags );
HRESULT (__stdcall * SetHWnd)( WRAP* This, DWORD dwFlags, HWND hWnd );
};

HRESULT __stdcall QueryInterface( WRAP* This, const IID& riid, void** ppvObject )
{
PROLOGUE;
HRESULT hResult = This->clip->lpVtbl->QueryInterface( This->clip, riid, ppvObject );
if( SUCCEEDED( hResult ) ) Wrap( This->dd_parent, iid_to_vtbl( riid ), ppvObject );
EPILOGUE( hResult );
}

ULONG __stdcall AddRef( WRAP* This )
{
PROLOGUE;
ULONG dwCount = This->clip->lpVtbl->AddRef( This->clip );
EPILOGUE( dwCount );
}

ULONG __stdcall Release( WRAP* This )
{
PROLOGUE;
ULONG dwCount = WrapRelease( This );
EPILOGUE( dwCount );
}

HRESULT __stdcall GetClipList( WRAP* This, LPRECT lpRect, LPRGNDATA lpClipList, LPDWORD lpdwSize )
{
PROLOGUE;
HRESULT hResult = This->clip->lpVtbl->GetClipList( This->clip, lpRect, lpClipList, lpdwSize );
EPILOGUE( hResult );
}

HRESULT __stdcall GetHWnd( WRAP* This, HWND* lphWnd )
{
PROLOGUE;
HRESULT hResult = This->clip->lpVtbl->GetHWnd( This->clip, lphWnd );
EPILOGUE( hResult );
}

HRESULT __stdcall Initialize( WRAP* This, LPDIRECTDRAW lpDD, DWORD dwFlags )
{
PROLOGUE;
HRESULT hResult = This->clip->lpVtbl->Initialize( This->clip, GetInnerInterface( lpDD ), dwFlags );
EPILOGUE( hResult );
}

HRESULT __stdcall IsClipListChanged( WRAP* This, BOOL* lpbChanged )
{
PROLOGUE;
HRESULT hResult = This->clip->lpVtbl->IsClipListChanged( This->clip, lpbChanged );
EPILOGUE( hResult );
}

HRESULT __stdcall SetClipList( WRAP* This, LPRGNDATA lpClipList, DWORD dwFlags )
{
PROLOGUE;
HRESULT hResult = This->clip->lpVtbl->SetClipList( This->clip, lpClipList, dwFlags );
EPILOGUE( hResult );
}

HRESULT __stdcall SetHWnd( WRAP* This, DWORD dwFlags, HWND hWnd )
{
PROLOGUE;
HRESULT hResult = This->clip->lpVtbl->SetHWnd( This->clip, dwFlags, hWnd );
EPILOGUE( hResult );
}

const XVTBL xVtbl =
{
QueryInterface, // 0x00
AddRef, // 0x04
Release, // 0x08
GetClipList, // 0x0C
GetHWnd, // 0x10
Initialize, // 0x14
IsClipListChanged, // 0x18
SetClipList, // 0x1C
SetHWnd // 0x20
};
};

0 comments on commit d72bd1a

Please sign in to comment.