Commit 0562c64d authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32/tests: Link to storage API directly.

parent a4f27c3c
...@@ -446,23 +446,14 @@ static void test_create_storage_modes(void) ...@@ -446,23 +446,14 @@ static void test_create_storage_modes(void)
static void test_stgcreatestorageex(void) static void test_stgcreatestorageex(void)
{ {
HRESULT (WINAPI *pStgCreateStorageEx)(const WCHAR* pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS* pStgOptions, void* reserved, REFIID riid, void** ppObjectOpen);
HMODULE hOle32 = GetModuleHandleA("ole32");
IStorage *stg = NULL; IStorage *stg = NULL;
STGOPTIONS stgoptions = {1, 0, 4096}; STGOPTIONS stgoptions = {1, 0, 4096};
HRESULT r; HRESULT r;
pStgCreateStorageEx = (void *) GetProcAddress(hOle32, "StgCreateStorageEx");
if (!pStgCreateStorageEx)
{
win_skip("skipping test on NT4\n");
return;
}
DeleteFileA(filenameA); DeleteFileA(filenameA);
/* Verify that StgCreateStorageEx can accept an options param */ /* Verify that StgCreateStorageEx can accept an options param */
r = pStgCreateStorageEx( filename, r = StgCreateStorageEx( filename,
STGM_SHARE_EXCLUSIVE | STGM_READWRITE, STGM_SHARE_EXCLUSIVE | STGM_READWRITE,
STGFMT_DOCFILE, STGFMT_DOCFILE,
0, 0,
...@@ -471,19 +462,13 @@ static void test_stgcreatestorageex(void) ...@@ -471,19 +462,13 @@ static void test_stgcreatestorageex(void)
&IID_IStorage, &IID_IStorage,
(void **) &stg); (void **) &stg);
ok(r==S_OK || r==STG_E_UNIMPLEMENTEDFUNCTION, "StgCreateStorageEx with options failed\n"); ok(r==S_OK || r==STG_E_UNIMPLEMENTEDFUNCTION, "StgCreateStorageEx with options failed\n");
if (r==STG_E_UNIMPLEMENTEDFUNCTION)
{
/* We're on win98 which means all bets are off. Let's get out of here. */
win_skip("skipping test on win9x\n");
return;
}
r = IStorage_Release(stg); r = IStorage_Release(stg);
ok(r == 0, "storage not released\n"); ok(r == 0, "storage not released\n");
ok(DeleteFileA(filenameA), "failed to delete file\n"); ok(DeleteFileA(filenameA), "failed to delete file\n");
/* Verify that StgCreateStorageEx can accept a NULL pStgOptions */ /* Verify that StgCreateStorageEx can accept a NULL pStgOptions */
r = pStgCreateStorageEx( filename, r = StgCreateStorageEx( filename,
STGM_SHARE_EXCLUSIVE | STGM_READWRITE, STGM_SHARE_EXCLUSIVE | STGM_READWRITE,
STGFMT_STORAGE, STGFMT_STORAGE,
0, 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment