mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 06:53:00 +00:00
- Fix some msvc issues in rostests
svn path=/trunk/; revision=42365
This commit is contained in:
parent
771b93f448
commit
c71617e216
12 changed files with 45 additions and 37 deletions
|
@ -70,14 +70,6 @@ typedef struct _DD_MISCELLANEOUSCALLBACKS {
|
|||
int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
|
||||
LPSTR lpCmdLine, int nCmdShow)
|
||||
{
|
||||
/* get the functions we need */
|
||||
// DD_GETDRIVERINFODATA drv;
|
||||
HMODULE lib = LoadLibrary("gdi32.dll");
|
||||
DdCreateDirectDrawObject = (BOOL (APIENTRY*)(LPDDRAWI_DIRECTDRAW_GBL, HDC))GetProcAddress(lib, "GdiEntry1");
|
||||
DdQueryDirectDrawObject = (BOOL (APIENTRY*)(LPDDRAWI_DIRECTDRAW_GBL, LPDDHALINFO,LPDDHAL_DDCALLBACKS,LPDDHAL_DDSURFACECALLBACKS,LPDDHAL_DDPALETTECALLBACKS,LPD3DHAL_CALLBACKS,LPD3DHAL_GLOBALDRIVERDATA,LPDDHAL_DDEXEBUFCALLBACKS,LPDDSURFACEDESC,LPDWORD,LPVIDMEM))GetProcAddress(lib, "GdiEntry2");
|
||||
DdAttachSurface = (BOOL (APIENTRY*)(LPDDRAWI_DDRAWSURFACE_LCL, LPDDRAWI_DDRAWSURFACE_LCL))GetProcAddress(lib, "GdiEntry11");
|
||||
DdResetVisrgn = (BOOL (APIENTRY*)(LPDDRAWI_DDRAWSURFACE_LCL, HWND))GetProcAddress(lib, "GdiEntry6");
|
||||
|
||||
/* HAL Startup process */
|
||||
DEVMODE devmode;
|
||||
HBITMAP hbmp;
|
||||
|
@ -90,7 +82,21 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
|
|||
//DWORD Status; /* for create surface */
|
||||
UINT i;
|
||||
UINT j;
|
||||
UINT cSurfaces;
|
||||
|
||||
DDHAL_CANCREATESURFACEDATA mDdCanCreateSurface;
|
||||
DDHAL_UPDATEOVERLAYDATA mDdUpdateOverlay;
|
||||
DDRAWI_DDRAWSURFACE_LCL *pDDSurface;
|
||||
DDHAL_CREATESURFACEDATA mDdCreateSurface;
|
||||
|
||||
|
||||
/* get the functions we need */
|
||||
// DD_GETDRIVERINFODATA drv;
|
||||
HMODULE lib = LoadLibrary("gdi32.dll");
|
||||
DdCreateDirectDrawObject = (BOOL (APIENTRY*)(LPDDRAWI_DIRECTDRAW_GBL, HDC))GetProcAddress(lib, "GdiEntry1");
|
||||
DdQueryDirectDrawObject = (BOOL (APIENTRY*)(LPDDRAWI_DIRECTDRAW_GBL, LPDDHALINFO,LPDDHAL_DDCALLBACKS,LPDDHAL_DDSURFACECALLBACKS,LPDDHAL_DDPALETTECALLBACKS,LPD3DHAL_CALLBACKS,LPD3DHAL_GLOBALDRIVERDATA,LPDDHAL_DDEXEBUFCALLBACKS,LPDDSURFACEDESC,LPDWORD,LPVIDMEM))GetProcAddress(lib, "GdiEntry2");
|
||||
DdAttachSurface = (BOOL (APIENTRY*)(LPDDRAWI_DDRAWSURFACE_LCL, LPDDRAWI_DDRAWSURFACE_LCL))GetProcAddress(lib, "GdiEntry11");
|
||||
DdResetVisrgn = (BOOL (APIENTRY*)(LPDDRAWI_DDRAWSURFACE_LCL, HWND))GetProcAddress(lib, "GdiEntry6");
|
||||
|
||||
printf("This apps showing how to start up directx draw/d3d interface and some other as well\n");
|
||||
printf("This code have been releae to some close applactons with my premtions, if any company\n");
|
||||
|
@ -364,7 +370,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
|
|||
mddsdPrimary.dwFlags = DDSD_CAPS;
|
||||
mddsdPrimary.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VISIBLE;
|
||||
|
||||
DDHAL_CANCREATESURFACEDATA mDdCanCreateSurface;
|
||||
mDdCanCreateSurface;
|
||||
mDdCanCreateSurface.lpDD = &mDDrawGlobal;
|
||||
mDdCanCreateSurface.CanCreateSurface = mCallbacks.HALDD.CanCreateSurface;
|
||||
mDdCanCreateSurface.bIsDifferentPixelFormat = FALSE; //isDifferentPixelFormat;
|
||||
|
@ -405,7 +411,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
|
|||
|
||||
mpPrimaryLocals[0] = &mPrimaryLocal;
|
||||
|
||||
DDHAL_CREATESURFACEDATA mDdCreateSurface;
|
||||
mDdCreateSurface;
|
||||
mDdCreateSurface.lpDD = &mDDrawGlobal;
|
||||
mDdCreateSurface.CreateSurface = mCallbacks.HALDD.CreateSurface;
|
||||
mDdCreateSurface.lpDDSurfaceDesc = &mddsdPrimary;//pDDSD;
|
||||
|
@ -500,7 +506,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
|
|||
mOverlayGlobal.ddpfSurface = mddsdOverlay.ddpfPixelFormat;
|
||||
|
||||
// setup front- and backbuffer surfaces
|
||||
UINT cSurfaces = mddsdOverlay.dwBackBufferCount + 1;
|
||||
cSurfaces = mddsdOverlay.dwBackBufferCount + 1;
|
||||
for ( i = 0; i < cSurfaces; i++)
|
||||
{
|
||||
memset(&mOverlayMore[i], 0, sizeof(DDRAWI_DDRAWSURFACE_MORE));
|
||||
|
@ -565,7 +571,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
|
|||
}
|
||||
|
||||
|
||||
DDHAL_UPDATEOVERLAYDATA mDdUpdateOverlay;
|
||||
mDdUpdateOverlay;
|
||||
mDdUpdateOverlay.lpDD = &mDDrawGlobal;
|
||||
mDdUpdateOverlay.UpdateOverlay = mCallbacks.HALDDSurface.UpdateOverlay;
|
||||
mDdUpdateOverlay.lpDDDestSurface = mpPrimaryLocals[0];
|
||||
|
@ -607,7 +613,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
|
|||
/* blt */
|
||||
|
||||
|
||||
DDRAWI_DDRAWSURFACE_LCL *pDDSurface = mpPrimaryLocals[0];
|
||||
pDDSurface = mpPrimaryLocals[0];
|
||||
|
||||
if (!DdResetVisrgn(pDDSurface, NULL))
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <windows.h>
|
||||
#include <setupapi.h>
|
||||
#include <tchar.h>
|
||||
#include <stdlib.h> // FIXME-DONTCOMMIT: Why is this needed?
|
||||
#include "resource.h"
|
||||
|
||||
typedef BOOL (WINAPI * SH_GIL_PROC)(HIMAGELIST *phLarge, HIMAGELIST *phSmall);
|
||||
|
|
|
@ -597,8 +597,8 @@ TEST_STATUS TestGlobalReAllocMovable()
|
|||
*/
|
||||
TEST_STATUS TestGlobalReAlloc()
|
||||
{
|
||||
OUTPUT_Banner("Testing GlobalReAlloc()");
|
||||
TEST_STATUS result = SKIPPED;
|
||||
OUTPUT_Banner("Testing GlobalReAlloc()");
|
||||
|
||||
result = TEST_CombineStatus(result, TestGlobalReAllocFixed());
|
||||
result = TEST_CombineStatus(result, TestGlobalReAllocMovable());
|
||||
|
@ -767,8 +767,8 @@ TEST_STATUS TestGlobalFlagsFixed()
|
|||
*/
|
||||
TEST_STATUS TestGlobalFlags()
|
||||
{
|
||||
OUTPUT_Banner("Testing GlobalFlags()");
|
||||
TEST_STATUS result = SKIPPED;
|
||||
OUTPUT_Banner("Testing GlobalFlags()");
|
||||
|
||||
result = TEST_CombineStatus(result, TestGlobalFlagsFixed());
|
||||
result = TEST_CombineStatus(result, TestGlobalFlagsMoveable());
|
||||
|
|
|
@ -22,6 +22,9 @@ int main()
|
|||
|
||||
int c;
|
||||
|
||||
HMIDIOUT Handle = NULL;
|
||||
UINT Result;
|
||||
|
||||
printf("MIDI output devices: %d\n", outs);
|
||||
|
||||
for (c = 0; c < outs; c ++)
|
||||
|
@ -32,8 +35,7 @@ int main()
|
|||
|
||||
printf("Opening MIDI output #0\n");
|
||||
|
||||
HMIDIOUT Handle = NULL;
|
||||
UINT Result = midiOutOpen(&Handle, 0, 0, 0, CALLBACK_NULL);
|
||||
Result = midiOutOpen(&Handle, 0, 0, 0, CALLBACK_NULL);
|
||||
printf("Result == %d Handle == %d\n", Result, (int)Handle);
|
||||
|
||||
// play something:
|
||||
|
|
|
@ -110,7 +110,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
PAINTSTRUCT ps; /* Also used during window drawing */
|
||||
HDC hDC; /* A device context used for drawing */
|
||||
RECT rc, clr, wir; /* A rectangle used during drawing */
|
||||
RECT rc = {0,0,0,0}, clr, wir; /* A rectangle used during drawing */
|
||||
char spr[100], sir[100];
|
||||
static HBRUSH hbrWhite=NULL, hbrGray=NULL, hbrBlack=NULL, hbrRed=NULL, hbrBlue=NULL, hbrYellow=NULL;
|
||||
|
||||
|
@ -123,9 +123,8 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
case WM_CHAR:
|
||||
{
|
||||
|
||||
hDC = GetDC(hWnd);
|
||||
TCHAR text[2];
|
||||
hDC = GetDC(hWnd);
|
||||
text[0] = (TCHAR)wParam;
|
||||
text[1] = _T('\0');
|
||||
|
||||
|
@ -170,10 +169,9 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
case WM_KEYDOWN:
|
||||
{
|
||||
|
||||
hDC = GetDC(hWnd);
|
||||
RECT Rect;
|
||||
TCHAR text[2];
|
||||
hDC = GetDC(hWnd);
|
||||
text[0] = (TCHAR)wParam;
|
||||
text[1] = _T('\0');
|
||||
|
||||
|
@ -201,10 +199,9 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
case WM_KEYUP:
|
||||
{
|
||||
|
||||
hDC = GetDC(hWnd);
|
||||
RECT Rect;
|
||||
TCHAR text[2];
|
||||
hDC = GetDC(hWnd);
|
||||
text[0] = (TCHAR)wParam;
|
||||
text[1] = _T('\0');
|
||||
|
||||
|
@ -594,6 +591,8 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
case WM_CREATE:
|
||||
{
|
||||
SCROLLINFO si;
|
||||
TEXTMETRIC tm;
|
||||
/* Register a Ctrl+Alt+C hotkey*/
|
||||
RegisterHotKey(hWnd, CTRLC, MOD_CONTROL, VK_C);
|
||||
RegisterHotKey(hWnd, ALTF1, MOD_CONTROL | MOD_ALT, VK_F1);
|
||||
|
@ -605,7 +604,6 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
hbrBlue = CreateSolidBrush ( RGB(0x00, 0x00, 0xFF));
|
||||
hbrYellow = CreateSolidBrush ( RGB(0xFF, 0xFF, 0x00));
|
||||
|
||||
SCROLLINFO si;
|
||||
si.cbSize = sizeof(si);
|
||||
si.fMask = SIF_ALL;
|
||||
si.nMin = 0;
|
||||
|
@ -619,7 +617,6 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
/* The window is being created. Create our button
|
||||
* window now. */
|
||||
TEXTMETRIC tm;
|
||||
|
||||
/* First we use the system fixed font size to choose
|
||||
* a nice button size. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue