Module: wine
Branch: master
Commit: 8c758a62e85c68e71d7aa939833bc49d221bacf2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8c758a62e85c68e71d7aa9398…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Fri Feb 15 20:02:07 2008 +0100
wined3d: Remove VBFLAG_LOAD.
---
dlls/wined3d/vertexbuffer.c | 4 ----
dlls/wined3d/wined3d_private.h | 9 ++++-----
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/dlls/wined3d/vertexbuffer.c b/dlls/wined3d/vertexbuffer.c
index 93d3c55..b99fc43 100644
--- a/dlls/wined3d/vertexbuffer.c
+++ b/dlls/wined3d/vertexbuffer.c
@@ -499,10 +499,6 @@ static void WINAPI IWineD3DVertexBufferImpl_PreLoad(IWineD3DVertexBuffer *if
int i, j;
TRACE("(%p)->()\n", This);
- if(This->Flags & VBFLAG_LOAD) {
- return; /* Already doing that stuff */
- }
-
if(!This->vbo) {
/* TODO: Make converting independent from VBOs */
if(This->Flags & VBFLAG_CREATEVBO) {
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 96a80fa..1071871 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -951,11 +951,10 @@ typedef struct IWineD3DVertexBufferImpl
extern const IWineD3DVertexBufferVtbl IWineD3DVertexBuffer_Vtbl;
-#define VBFLAG_LOAD 0x01 /* Data is written from allocatedMemory to the VBO */
-#define VBFLAG_OPTIMIZED 0x02 /* Optimize has been called for the VB */
-#define VBFLAG_DIRTY 0x04 /* Buffer data has been modified */
-#define VBFLAG_HASDESC 0x08 /* A vertex description has been found */
-#define VBFLAG_CREATEVBO 0x10 /* Attempt to create a VBO next PreLoad */
+#define VBFLAG_OPTIMIZED 0x01 /* Optimize has been called for the VB */
+#define VBFLAG_DIRTY 0x02 /* Buffer data has been modified */
+#define VBFLAG_HASDESC 0x04 /* A vertex description has been found */
+#define VBFLAG_CREATEVBO 0x08 /* Attempt to create a VBO next PreLoad */
/*****************************************************************************
* IWineD3DIndexBuffer implementation structure (extends IWineD3DResourceImpl)
Module: wine
Branch: master
Commit: 484467278143313d950ecbf8b62e75baf7ee9e83
URL: http://source.winehq.org/git/wine.git/?a=commit;h=484467278143313d950ecbf8b…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com>
Date: Thu Feb 28 18:09:58 2008 +0100
wintrust/tests: Add a few tests.
---
dlls/wintrust/tests/crypt.c | 74 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 73 insertions(+), 1 deletions(-)
diff --git a/dlls/wintrust/tests/crypt.c b/dlls/wintrust/tests/crypt.c
index 31d8b8b..216b697 100644
--- a/dlls/wintrust/tests/crypt.c
+++ b/dlls/wintrust/tests/crypt.c
@@ -57,6 +57,8 @@ static void test_context(void)
HCATADMIN hca;
static GUID dummy = { 0xdeadbeef, 0xdead, 0xbeef, { 0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef }};
static GUID unknown = { 0xC689AABA, 0x8E78, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }}; /* WINTRUST.DLL */
+ CHAR windir[MAX_PATH], catroot[MAX_PATH], catroot2[MAX_PATH], dummydir[MAX_PATH];
+ DWORD attrs;
if (!pCryptCATAdminAcquireContext || !pCryptCATAdminReleaseContext)
{
@@ -64,6 +66,34 @@ static void test_context(void)
return;
}
+ /* When CryptCATAdminAcquireContext is successful it will create
+ * several directories if they don't exist:
+ *
+ * ...\system32\CatRoot\{GUID}, this directory holds the .cat files
+ * ...\system32\CatRoot2\{GUID} (WinXP and up), here we find the catalog database for that GUID
+ *
+ * Windows Vista uses lowercase catroot and catroot2.
+ *
+ * When passed a NULL GUID it will create the following directories although on
+ * WinXP and up these directories are already present when Windows is installed:
+ *
+ * ...\system32\CatRoot\{127D0A1D-4EF2-11D1-8608-00C04FC295EE}
+ * ...\system32\CatRoot2\{127D0A1D-4EF2-11D1-8608-00C04FC295EE} (WinXP up)
+ *
+ * TODO: Find out what this GUID is/does.
+ *
+ * On WinXp and up there is also a TimeStamp file in some of directories that
+ * seem to indicate the last change to the catalog database for that GUID.
+ *
+ * On Windows 2000 some files are created/updated:
+ *
+ * ...\system32\CatRoot\SYSMAST.cbk
+ * ...\system32\CatRoot\SYSMAST.cbd
+ * ...\system32\CatRoot\{GUID}\CATMAST.cbk
+ * ...\system32\CatRoot\{GUID}\CATMAST.cbd
+ *
+ */
+
/* All NULL */
SetLastError(0xdeadbeef);
ret = pCryptCATAdminAcquireContext(NULL, NULL, 0);
@@ -114,7 +144,16 @@ static void test_context(void)
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
- /* Correct context handle and dummy GUID */
+ /* Correct context handle and dummy GUID
+ *
+ * The tests run in the past unfortunately made sure that some directories were created.
+ *
+ * FIXME:
+ * We don't want to mess too much with these for now so we should delete only the ones
+ * that shouldn't be there like the deadbeef ones. We first have to figure out if it's
+ * save to remove files and directories from CatRoot/CatRoot2.
+ */
+
SetLastError(0xdeadbeef);
ret = pCryptCATAdminAcquireContext(&hca, &dummy, 0);
ok(ret, "Expected success\n");
@@ -123,6 +162,39 @@ static void test_context(void)
"Expected ERROR_SUCCESS or 0xdeadbeef, got %d\n", GetLastError());
ok(hca != NULL, "Expected a context handle, got NULL\n");
+ GetWindowsDirectoryA(windir, MAX_PATH);
+ lstrcpyA(catroot, windir);
+ lstrcatA(catroot, "\\system32\\CatRoot");
+ lstrcpyA(catroot2, windir);
+ lstrcatA(catroot2, "\\system32\\CatRoot2");
+
+ attrs = GetFileAttributes(catroot);
+ /* On a clean Wine this will fail. When a native wintrust.dll was used in the past
+ * some tests will succeed.
+ */
+ todo_wine
+ ok(attrs != INVALID_FILE_ATTRIBUTES,
+ "Expected the CatRoot directory to exist\n");
+
+ /* Windows creates the GUID directory in capitals */
+ lstrcpyA(dummydir, catroot);
+ lstrcatA(dummydir, "\\{DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF}");
+ attrs = GetFileAttributes(dummydir);
+ todo_wine
+ ok(attrs != INVALID_FILE_ATTRIBUTES,
+ "Expected CatRoot\\{DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF} directory to exist\n");
+
+ /* Only present on XP or higher. */
+ attrs = GetFileAttributes(catroot2);
+ if (attrs != INVALID_FILE_ATTRIBUTES)
+ {
+ lstrcpyA(dummydir, catroot2);
+ lstrcatA(dummydir, "\\{DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF}");
+ attrs = GetFileAttributes(dummydir);
+ ok(attrs != INVALID_FILE_ATTRIBUTES,
+ "Expected CatRoot2\\{DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF} directory to exist\n");
+ }
+
ret = pCryptCATAdminReleaseContext(hca, 0);
ok(ret, "Expected success\n");