[Sumover-dev] [svn commit] r4478 - vic/branches/mpeg4/win32
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Wed Jul 15 10:43:55 BST 2009
Author: douglask
Date: Wed Jul 15 10:43:41 2009
New Revision: 4478
Modified:
vic/branches/mpeg4/win32/win32.c
Log:
Get rid of RegGetValue() function which isn't used elsewhere in VIC and clashes with Vista's RegGetValue() implementation.
Modified: vic/branches/mpeg4/win32/win32.c
==============================================================================
--- vic/branches/mpeg4/win32/win32.c (original)
+++ vic/branches/mpeg4/win32/win32.c Wed Jul 15 10:43:41 2009
@@ -45,8 +45,8 @@
#include <malloc.h>
#include <string.h>
#include <stdio.h>
+#include <stdlib.h>
#include <time.h>
-//#include <winsock.h>
#include <tk.h>
int
@@ -157,8 +157,6 @@
extern void TkWinXInit(HINSTANCE hInstance);
extern int main(int argc, const char *argv[]);
-extern int __argc;
-extern char **__argv;
static char argv0[255]; /* Buffer used to hold argv0. */
@@ -227,6 +225,7 @@
level | MB_OK | MB_TASKMODAL | MB_SETFOREGROUND);
}
+#if 0
static char szTemp[4096];
int
@@ -287,6 +286,8 @@
LocalFree((HLOCAL)msgBuf);
}
}
+#endif
+
/* Taken from Tcl_PutsObjCmd(); It outputs to stdout or stderr only
* if a file arg is supplied it [used to] does nothing - ie empty file!
* Now works with other files.
@@ -495,31 +496,3 @@
return TCL_OK;
}
-int
-RegGetValue(HKEY* key, char *subkey, char *value, char *dst, int dlen)
-{
- HKEY lkey;
- LONG r;
- LONG len;
- DWORD type;
-
- r = RegOpenKeyEx(*key, subkey, 0, KEY_READ, &lkey);
-
- if (ERROR_SUCCESS == r) {
- r = RegQueryValueEx(lkey, value, 0, &type, NULL, &len);
- if (ERROR_SUCCESS == r && len <= dlen && type == REG_SZ) {
- type = REG_SZ;
- r = RegQueryValueEx(lkey, value, 0, &type, dst, &len);
- } else {
- SetLastError(r);
- perror("");
- }
- } else {
- SetLastError(r);
- perror("");
- return FALSE;
- }
- RegCloseKey(lkey);
- return TRUE;
-}
-
More information about the Sumover-dev
mailing list