Last change
on this file was 21494, checked in by dmik, 15 years ago |
Fixed broken build after r21492 by sorting out a huuuuge wagon of duplicates, wrong include order and other dirty mess.
|
File size:
1.7 KB
|
Rev | Line | |
---|
[9459] | 1 | /* $Id: ddclipper.cpp,v 1.1 2002-12-04 10:34:57 sandervl Exp $ */
|
---|
| 2 |
|
---|
| 3 | /*
|
---|
| 4 | * DXDrawClipper DLL implementaion
|
---|
| 5 | *
|
---|
| 6 | * Copyright 2001 Patrick Haller <patrick.haller@innotek.de>
|
---|
| 7 | *
|
---|
| 8 | *
|
---|
| 9 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
| 10 | *
|
---|
| 11 | */
|
---|
| 12 |
|
---|
| 13 | // define the following as we include winnt.h
|
---|
| 14 | #define _OS2WIN_H
|
---|
| 15 | #define FAR
|
---|
| 16 |
|
---|
| 17 | #include <odin.h>
|
---|
| 18 | #include <winbase.h>
|
---|
| 19 | #include <memory.h>
|
---|
| 20 | #include <stdio.h>
|
---|
[21479] | 21 |
|
---|
[21494] | 22 | #define CINTERFACE
|
---|
[9459] | 23 | #include "ddraw2d.h"
|
---|
| 24 | #include "clipper.h"
|
---|
| 25 | #include "winerror.h"
|
---|
| 26 |
|
---|
| 27 | #include <misc.h>
|
---|
| 28 |
|
---|
| 29 | //******************************************************************************
|
---|
| 30 | //******************************************************************************
|
---|
| 31 | HRESULT WIN32API OS2DirectDrawCreateClipper(DWORD dwFlags,
|
---|
| 32 | LPDIRECTDRAWCLIPPER FAR *lplpDDClipper,
|
---|
| 33 | IUnknown FAR *pUnkOuter)
|
---|
| 34 | {
|
---|
| 35 | OS2IDirectDrawClipper *newDDClipper;
|
---|
| 36 | HRESULT rc;
|
---|
| 37 |
|
---|
| 38 | dprintf(("DDRAW-CLIPPER: DirectDrawCreateClipper(%08xh,%08xh,%08xh)\n",
|
---|
| 39 | dwFlags,
|
---|
| 40 | lplpDDClipper,
|
---|
| 41 | pUnkOuter));
|
---|
| 42 |
|
---|
| 43 | // Verify parameters according to the docs
|
---|
| 44 | if (pUnkOuter != NULL)
|
---|
| 45 | return CLASS_E_NOAGGREGATION;
|
---|
| 46 |
|
---|
| 47 | if (dwFlags != 0)
|
---|
| 48 | return DDERR_INVALIDPARAMS;
|
---|
| 49 |
|
---|
| 50 |
|
---|
| 51 | newDDClipper = new OS2IDirectDrawClipper();
|
---|
| 52 |
|
---|
| 53 | if(newDDClipper == NULL)
|
---|
| 54 | {
|
---|
| 55 | rc = DDERR_OUTOFMEMORY;
|
---|
| 56 | }
|
---|
| 57 | else
|
---|
| 58 | {
|
---|
[21479] | 59 | newDDClipper->Vtbl.fnAddRef((IDirectDrawClipper *)newDDClipper);
|
---|
[9459] | 60 |
|
---|
| 61 | rc = newDDClipper->GetLastError();
|
---|
| 62 | if(rc != DD_OK)
|
---|
| 63 | {
|
---|
| 64 | *lplpDDClipper = NULL;
|
---|
| 65 |
|
---|
| 66 | delete newDDClipper;
|
---|
| 67 | }
|
---|
| 68 | else
|
---|
| 69 | *lplpDDClipper = (LPDIRECTDRAWCLIPPER)newDDClipper;
|
---|
| 70 | }
|
---|
| 71 | return(rc);
|
---|
| 72 | }
|
---|
| 73 |
|
---|
| 74 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.