Fix the DCICreatePrimary() prototype. It's supposed to return an int

so have it return DCI_FAIL_UNSUPPORTED.
Add the needed error codes and the DCISURFACEINFO definition to
dciddi.h.
Add dciman.h and put the function prototypes there.
dciddi.h and dciman.h should be installed with the other Windows
headers.
This commit is contained in:
Francois Gouget 2005-04-20 18:42:04 +00:00 committed by Alexandre Julliard
parent 3b843d3e7d
commit 30a07e9046
5 changed files with 75 additions and 5 deletions

View File

@ -25,6 +25,7 @@
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "dciman.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dciman);
@ -47,7 +48,7 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
HDC WINAPI
DCIOpenProvider(void) {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
return NULL;
}
/***********************************************************************
@ -62,10 +63,10 @@ DCICloseProvider(HDC hdc) {
/**************************************************************************
* DCICreatePrimary (DCIMAN32.@)
*/
void WINAPI
DCICreatePrimary(HDC hdc, LPVOID pDciSurfaceInfo)
int WINAPI
DCICreatePrimary(HDC hdc, LPDCISURFACEINFO *pDciSurfaceInfo)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
FIXME("%p %p\n", hdc, pDciSurfaceInfo);
return;
return DCI_FAIL_UNSUPPORTED;
}

View File

@ -76,6 +76,8 @@ WINDOWS_INCLUDES = \
d3dx8core.h \
dbghelp.h \
dbt.h \
dciddi.h \
dciman.h \
dde.h \
ddeml.h \
ddraw.h \

View File

@ -36,7 +36,11 @@ extern "C" {
#define DCIESCAPE 5
/* DCI Errors */
#define DCI_OK 0
#define DCI_OK 0
#define DCI_FAIL_GENERIC -1
#define DCI_FAIL_UNSUPPORTEDVERSION -2
#define DCI_FAIL_INVALIDSURFACE -3
#define DCI_FAIL_UNSUPPORTED -4
typedef int DCIRVAL; /* DCI callback return type */
@ -52,6 +56,26 @@ typedef struct _DCICMD {
DWORD dwReserved;
} DCICMD,*LPDCICMD;
typedef struct _DCISURFACEINFO {
DWORD dwSize;
DWORD dwDCICaps;
DWORD dwCompression;
DWORD dwMask[3];
DWORD dwWidth;
DWORD dwHeight;
LONG lStride;
DWORD dwBitCount;
ULONG_PTR dwOffSurface;
WORD wSelSurface;
WORD wReserved;
DWORD dwReserved1;
DWORD dwReserved2;
DWORD dwReserved3;
DCIRVAL (CALLBACK *BeginAccess)(LPVOID, LPRECT);
void (CALLBACK *EndAccess)(LPVOID);
void (CALLBACK *DestroySurface)(LPVOID);
} DCISURFACEINFO, *LPDCISURFACEINFO;
#ifdef __cplusplus
} /* extern "C" */
#endif

38
include/dciman.h Normal file
View File

@ -0,0 +1,38 @@
/*
* DCI driver interface
*
* Copyright (C) 2005 Francois Gouget
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _INC_DCIMAN
#define _INC_DCIMAN
#include <dciddi.h>
#ifdef __cplusplus
extern "C" {
#endif
HDC WINAPI DCIOpenProvider(void);
void WINAPI DCICloseProvider(HDC);
int WINAPI DCICreatePrimary(HDC,LPDCISURFACEINFO*);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* _INC_DCIMAN */

View File

@ -708,6 +708,11 @@ PSTR
%long
HDC
int
%ptr
LPDCISURFACEINFO *
%void