summaryrefslogtreecommitdiffstats
path: root/loader/registry.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-07-29 16:44:37 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-07-29 16:44:37 +0000
commiteb022882bf9c7beb4fb6c4cb7d19074c5b9cc13e (patch)
treeeb9f36cf81a7f924c26ffed5bbd1acd61d0dcbdc /loader/registry.c
parent0ac4042c147d2a5148c3aafef3564f8fc1206200 (diff)
downloadmpv-eb022882bf9c7beb4fb6c4cb7d19074c5b9cc13e.tar.bz2
mpv-eb022882bf9c7beb4fb6c4cb7d19074c5b9cc13e.tar.xz
partial avifile-CVS merge
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1417 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/registry.c')
-rw-r--r--loader/registry.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/loader/registry.c b/loader/registry.c
index 9c6b0a6450..b2234c9119 100644
--- a/loader/registry.c
+++ b/loader/registry.c
@@ -405,13 +405,43 @@ long RegCreateKeyExA(long key, const char* name, long reserved,
// return 0;
}
else
- if (status) *status=REG_OPENED_EXISTING_KEY;
+ {
+ // this is a hack as I don't know how RegEnumValueA works
+ if (strstr(fullname, "zlib") || strstr(fullname, "mszh"))
+ return 1;
+ if (status) *status=REG_OPENED_EXISTING_KEY;
+ }
t=insert_handle(generate_handle(), fullname);
*newkey=t->handle;
free(fullname);
return 0;
}
+
+long RegEnumValueA(HKEY hkey, DWORD index, LPSTR value, LPDWORD val_count,
+ LPDWORD reserved, LPDWORD type, LPBYTE data, LPDWORD count)
+{
+ // have no idea how this should work
+ //printf("Reg Enum 0x%x %d %p %d data: %p %d %d >%s<\n", hkey, index, value, *val_count, data, *count, reg_size, data);
+ {
+ reg_handle_t* t = find_handle(hkey);
+ if (t)
+ {
+ struct reg_value* v=find_value_by_name(t->name);
+ *count = v->len;
+ memcpy(data, v->value, *count);
+ *val_count = v->len;
+ memcpy(value, v->value, *val_count);
+ if (type)
+ *type = v->type;
+ //printf("Found handle %s\n", v->name);
+ return 0;
+ }
+ }
+
+ return -1;
+}
+
long RegSetValueExA(long key, const char* name, long v1, long v2, const void* data, long size)
{
struct reg_value* t;