4 * Copyright 1997 Marcus Meissner
11 #include "wine/winbase16.h"
16 #include "wine/obj_base.h"
19 #include "winversion.h"
21 /****************************************************************************
22 * QueryPathOfRegTypeLib16 [TYPELIB.14]
24 * the path is "Classes\Typelib\<guid>\<major>.<minor>\<lcid>\win16\"
29 QueryPathOfRegTypeLib16(
30 REFGUID guid
, /* [in] referenced guid */
31 WORD wMaj
, /* [in] major version */
32 WORD wMin
, /* [in] minor version */
33 LCID lcid
, /* [in] locale id */
34 LPBSTR16 path
/* [out] path of typelib */
37 char typelibkey
[100],pathname
[260];
41 WINE_StringFromCLSID(guid
,xguid
);
42 sprintf(typelibkey
,"SOFTWARE\\Classes\\Typelib\\%s\\%d.%d\\%ld\\win16",
43 xguid
,wMaj
,wMin
,lcid
&0xff
46 sprintf(xguid
,"<guid 0x%08lx>",(DWORD
)guid
);
47 FIXME(ole
,"(%s,%d,%d,0x%04lx,%p),can't handle non-string guids.\n",xguid
,wMaj
,wMin
,(DWORD
)lcid
,path
);
50 plen
= sizeof(pathname
);
51 if (RegQueryValue16(HKEY_LOCAL_MACHINE
,typelibkey
,pathname
,&plen
)) {
52 FIXME(ole
,"key %s not found\n",typelibkey
);
55 *path
= SysAllocString16(pathname
);
59 /****************************************************************************
60 * QueryPathOfRegTypeLib32 [OLEAUT32.164]
65 QueryPathOfRegTypeLib(
66 REFGUID guid
, /* [in] referenced guid */
67 WORD wMaj
, /* [in] major version */
68 WORD wMin
, /* [in] minor version */
69 LCID lcid
, /* [in] locale id */
70 LPBSTR path
/* [out] path of typelib */
73 char typelibkey
[100],pathname
[260];
78 WINE_StringFromCLSID(guid
,xguid
);
79 sprintf(typelibkey
,"SOFTWARE\\Classes\\Typelib\\%s\\%d.%d\\%ld\\win32",
80 xguid
,wMaj
,wMin
,lcid
&0xff
83 sprintf(xguid
,"<guid 0x%08lx>",(DWORD
)guid
);
84 FIXME(ole
,"(%s,%d,%d,0x%04lx,%p),stub!\n",xguid
,wMaj
,wMin
,(DWORD
)lcid
,path
);
87 plen
= sizeof(pathname
);
88 if (RegQueryValue16(HKEY_LOCAL_MACHINE
,typelibkey
,pathname
,&plen
)) {
89 FIXME(ole
,"key %s not found\n",typelibkey
);
92 *path
= HEAP_strdupAtoW(GetProcessHeap(),0,pathname
);
96 /******************************************************************************
97 * LoadTypeLib [TYPELIB.3] Loads and registers a type library
99 * Docs: OLECHAR32 FAR* szFile
100 * Docs: iTypeLib FAR* FAR* pptLib
106 HRESULT WINAPI
LoadTypeLib16(
107 OLECHAR
*szFile
, /* [in] Name of file to load from */
108 void * *pptLib
) /* [out] Pointer to pointer to loaded type library */
110 FIXME(ole
, "('%s',%p): stub\n",debugstr_w((LPWSTR
)szFile
),pptLib
);
118 /******************************************************************************
119 * LoadTypeLib32 [OLEAUT32.161]
120 * Loads and registers a type library
122 * Docs: OLECHAR32 FAR* szFile
123 * Docs: iTypeLib FAR* FAR* pptLib
129 HRESULT WINAPI
LoadTypeLib(
130 OLECHAR
*szFile
, /* [in] Name of file to load from */
131 void * *pptLib
) /* [out] Pointer to pointer to loaded type library */
133 FIXME(ole
, "('%s',%p): stub\n",debugstr_w(szFile
),pptLib
);
141 /******************************************************************************
142 * LoadRegTypeLib [OLEAUT32.162]
144 HRESULT WINAPI
LoadRegTypeLib(
146 unsigned short wVerMajor
,
147 unsigned short wVerMinor
,
151 FIXME(ole
, "(): stub\n");
159 /******************************************************************************
160 * RegisterTypeLib32 [OLEAUT32.163]
161 * Adds information about a type library to the System Registry
163 * Docs: ITypeLib FAR * ptlib
164 * Docs: OLECHAR32 FAR* szFullPath
165 * Docs: OLECHAR32 FAR* szHelpDir
171 HRESULT WINAPI
RegisterTypeLib(
172 ITypeLib
* ptlib
, /*[in] Pointer to the library*/
173 OLECHAR
* szFullPath
, /*[in] full Path of the library*/
174 OLECHAR
* szHelpDir
) /*[in] dir to the helpfile for the library, may be NULL*/
175 { FIXME(ole
, "(%p,%s,%s): stub\n",ptlib
, debugstr_w(szFullPath
),debugstr_w(szHelpDir
));
176 return S_OK
; /* FIXME: pretend everything is OK */
179 /****************************************************************************
180 * OABuildVersion (TYPELIB.15)
184 DWORD WINAPI
OABuildVersion16(void)
186 WINDOWS_VERSION ver
= VERSION_GetVersion();
190 return MAKELONG(0xbd0, 0xa); /* Win95A */
192 return MAKELONG(0xbd3, 0x3); /* WfW 3.11 */
194 FIXME(ole
, "Version value not known yet. Please investigate it !");
195 return MAKELONG(0xbd0, 0xa); /* return Win95A for now */