Commit cea37419 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

msi: Make MsiViewGetColumnInfo() RPC-compatible.

parent 9ab15d4e
......@@ -603,8 +603,23 @@ UINT WINAPI MsiViewGetColumnInfo(MSIHANDLE hView, MSICOLINFO info, MSIHANDLE *hR
return ERROR_INVALID_PARAMETER;
query = msihandle2msiinfo( hView, MSIHANDLETYPE_VIEW );
if( !query )
return ERROR_INVALID_HANDLE;
if (!query)
{
struct wire_record *wire_rec = NULL;
MSIHANDLE remote;
if (!(remote = msi_get_remote(hView)))
return ERROR_INVALID_HANDLE;
r = remote_ViewGetColumnInfo(remote, info, &wire_rec);
if (!r)
{
r = unmarshal_record(wire_rec, hRec);
free_remote_record(wire_rec);
}
return r;
}
r = MSI_ViewGetColumnInfo( query, info, &rec );
if ( r == ERROR_SUCCESS )
......@@ -1091,3 +1106,14 @@ UINT __cdecl remote_ViewFetch(MSIHANDLE view, struct wire_record **rec)
MsiCloseHandle(handle);
return r;
}
UINT __cdecl remote_ViewGetColumnInfo(MSIHANDLE view, MSICOLINFO info, struct wire_record **rec)
{
MSIHANDLE handle;
UINT r = MsiViewGetColumnInfo(view, info, &handle);
*rec = NULL;
if (!r)
*rec = marshal_record(handle);
MsiCloseHandle(handle);
return r;
}
......@@ -263,6 +263,18 @@ static void test_db(MSIHANDLE hinst)
r = MsiDatabaseOpenViewA(hdb, "SELECT * FROM `Test`", &view);
ok(hinst, !r, "got %u\n", r);
r = MsiViewGetColumnInfo(view, MSICOLINFO_NAMES, &rec2);
ok(hinst, !r, "got %u\n", r);
sz = sizeof(buffer);
r = MsiRecordGetStringA(rec2, 1, buffer, &sz);
ok(hinst, !r, "got %u\n", r);
ok(hinst, sz == strlen(buffer), "got size %u\n", sz);
ok(hinst, !strcmp(buffer, "Name"), "got '%s'\n", buffer);
r = MsiCloseHandle(rec2);
ok(hinst, !r, "got %u\n", r);
r = MsiViewExecute(view, 0);
ok(hinst, !r, "got %u\n", r);
......
......@@ -27,6 +27,7 @@ typedef int INSTALLMESSAGE;
typedef int MSICONDITION;
typedef int MSIRUNMODE;
typedef int INSTALLSTATE;
typedef int MSICOLINFO;
#define MSIFIELD_NULL 0
#define MSIFIELD_INT 1
......@@ -59,6 +60,7 @@ interface IWineMsiRemote
UINT remote_ViewClose( [in] MSIHANDLE view );
UINT remote_ViewExecute( [in] MSIHANDLE view, [in, unique] struct wire_record *record );
UINT remote_ViewFetch( [in] MSIHANDLE view, [out] struct wire_record **record );
UINT remote_ViewGetColumnInfo( [in] MSIHANDLE view, [in] MSICOLINFO info, [out] struct wire_record **record );
MSICONDITION remote_DatabaseIsTablePersistent( [in] MSIHANDLE db, [in] LPCWSTR table );
HRESULT remote_DatabaseGetPrimaryKeys( [in] MSIHANDLE db, [in] LPCWSTR table, [out] MSIHANDLE *keys );
......
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