98 lines
2.4 KiB
C
98 lines
2.4 KiB
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include <stdarg.h>
|
|
#include <string.h>
|
|
#include <uchar.h>
|
|
#include <err.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include "fake-lib.h"
|
|
|
|
uint32_t MsiGetFileVersionW(const char16_t *filename,
|
|
char16_t *version, uint32_t *version_size,
|
|
char16_t *language, uint32_t *language_size)
|
|
{
|
|
warnx("FIXME: MsiGetFileVersion(%s)", ascii(filename, true));
|
|
if (version) {
|
|
c16cpy(version, version_size, "0.1.2.3");
|
|
}
|
|
if (language) {
|
|
c16cpy(language, language_size, "2057");
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
uint32_t MsiOpenDatabaseW(const char16_t *filename,
|
|
const char16_t *persist,
|
|
void **handle)
|
|
{
|
|
char *file = ascii(filename, true);
|
|
warnx("FIXME: MsiOpenDatabaseW(%s,%p)", file, persist);
|
|
close(open(file, O_WRONLY | O_CREAT, 0666));
|
|
*handle = (void *)1;
|
|
return 0;
|
|
}
|
|
|
|
uint32_t MsiCloseHandle(void *handle)
|
|
{
|
|
warnx("FIXME: MsiCloseHandle(%p)", handle);
|
|
return 0;
|
|
}
|
|
|
|
uint32_t MsiDatabaseImportW(void *handle, const char16_t *folder,
|
|
const char16_t *file)
|
|
{
|
|
warnx("FIXME: MsiDatabaseImport(%p,%s,%s)", handle, ascii(folder, true),
|
|
ascii(file, true));
|
|
return 0;
|
|
}
|
|
|
|
uint32_t MsiDatabaseOpenViewW(void *handle, const char16_t *query,
|
|
void **outhandle)
|
|
{
|
|
warnx("FIXME: MsiDatabaseOpenView(%p,%s)", handle, ascii(query, false));
|
|
*outhandle = (void *)2;
|
|
return 0;
|
|
}
|
|
|
|
uint32_t MsiViewExecute(void *handle, void *params)
|
|
{
|
|
warnx("FIXME: MsiViewExecute(%p)", handle);
|
|
return 0;
|
|
}
|
|
|
|
void *MsiCreateRecord(uint32_t nparams)
|
|
{
|
|
warnx("FIXME: MsiCreateRecord(%u)", (unsigned)nparams);
|
|
return (void *)3;
|
|
}
|
|
|
|
uint32_t MsiRecordSetStringW(void *handle, uint32_t field, char16_t *value)
|
|
{
|
|
warnx("FIXME: MsiRecordSetString(%p,%u,%s)", handle, (unsigned)field,
|
|
ascii(value, false));
|
|
return 0;
|
|
}
|
|
|
|
uint32_t MsiRecordSetStreamW(void *handle, uint32_t field, char16_t *path)
|
|
{
|
|
warnx("FIXME: MsiRecordSetStream(%p,%u,%s)", handle, (unsigned)field,
|
|
ascii(path, true));
|
|
return 0;
|
|
}
|
|
|
|
uint32_t MsiViewModify(void *vhandle, uint32_t mode, void *rechandle)
|
|
{
|
|
warnx("FIXME: MsiViewModify(%p,%u,%p)",
|
|
vhandle, (unsigned)mode, rechandle);
|
|
return 0;
|
|
}
|
|
|
|
uint32_t MsiDatabaseCommit(void *handle)
|
|
{
|
|
warnx("FIXME: MsiDatabaseCommit(%p)", handle);
|
|
return 0;
|
|
}
|