4 * Copyright 1997 Marcus Meissner
14 #include "wine/winbase16.h"
16 #include "wine/obj_base.h"
18 #include "winversion.h"
20 /****************************************************************************
21 * QueryPathOfRegTypeLib16 [TYPELIB.14]
23 * the path is "Classes\Typelib\<guid>\<major>.<minor>\<lcid>\win16\"
28 QueryPathOfRegTypeLib16(
29 REFGUID guid
, /* [in] referenced guid */
30 WORD wMaj
, /* [in] major version */
31 WORD wMin
, /* [in] minor version */
32 LCID lcid
, /* [in] locale id */
33 LPBSTR16 path
/* [out] path of typelib */
36 char typelibkey
[100],pathname
[260];
40 WINE_StringFromCLSID(guid
,xguid
);
41 sprintf(typelibkey
,"SOFTWARE\\Classes\\Typelib\\%s\\%d.%d\\%ld\\win16",
42 xguid
,wMaj
,wMin
,lcid
&0xff
45 sprintf(xguid
,"<guid 0x%08lx>",(DWORD
)guid
);
46 FIXME(ole
,"(%s,%d,%d,0x%04lx,%p),can't handle non-string guids.\n",xguid
,wMaj
,wMin
,(DWORD
)lcid
,path
);
49 plen
= sizeof(pathname
);
50 if (RegQueryValue16(HKEY_LOCAL_MACHINE
,typelibkey
,pathname
,&plen
)) {
51 FIXME(ole
,"key %s not found\n",typelibkey
);
54 *path
= SysAllocString16(pathname
);
58 /****************************************************************************
59 * QueryPathOfRegTypeLib32 [OLEAUT32.164]
64 QueryPathOfRegTypeLib(
65 REFGUID guid
, /* [in] referenced guid */
66 WORD wMaj
, /* [in] major version */
67 WORD wMin
, /* [in] minor version */
68 LCID lcid
, /* [in] locale id */
69 LPBSTR path
/* [out] path of typelib */
72 char typelibkey
[100],pathname
[260];
77 WINE_StringFromCLSID(guid
,xguid
);
78 sprintf(typelibkey
,"SOFTWARE\\Classes\\Typelib\\%s\\%d.%d\\%ld\\win32",
79 xguid
,wMaj
,wMin
,lcid
&0xff
82 sprintf(xguid
,"<guid 0x%08lx>",(DWORD
)guid
);
83 FIXME(ole
,"(%s,%d,%d,0x%04lx,%p),stub!\n",xguid
,wMaj
,wMin
,(DWORD
)lcid
,path
);
86 plen
= sizeof(pathname
);
87 if (RegQueryValue16(HKEY_LOCAL_MACHINE
,typelibkey
,pathname
,&plen
)) {
88 FIXME(ole
,"key %s not found\n",typelibkey
);
91 *path
= HEAP_strdupAtoW(GetProcessHeap(),0,pathname
);
95 /******************************************************************************
96 * LoadTypeLib [TYPELIB.3] Loads and registers a type library
98 * Docs: OLECHAR32 FAR* szFile
99 * Docs: iTypeLib FAR* FAR* pptLib
105 HRESULT WINAPI
LoadTypeLib16(
106 OLECHAR
*szFile
, /* [in] Name of file to load from */
107 void * *pptLib
) /* [out] Pointer to pointer to loaded type library */
109 FIXME(ole
, "('%s',%p): stub\n",debugstr_w((LPWSTR
)szFile
),pptLib
);
117 /******************************************************************************
118 * LoadTypeLib32 [OLEAUT32.161]
119 * Loads and registers a type library
121 * Docs: OLECHAR32 FAR* szFile
122 * Docs: iTypeLib FAR* FAR* pptLib
128 HRESULT WINAPI
LoadTypeLib(
129 OLECHAR
*szFile
, /* [in] Name of file to load from */
130 void * *pptLib
) /* [out] Pointer to pointer to loaded type library */
132 FIXME(ole
, "('%s',%p): stub\n",debugstr_w(szFile
),pptLib
);
140 /******************************************************************************
141 * LoadRegTypeLib [OLEAUT32.162]
143 HRESULT WINAPI
LoadRegTypeLib(
145 unsigned short wVerMajor
,
146 unsigned short wVerMinor
,
150 FIXME(ole
, "(): stub\n");
158 /******************************************************************************
159 * RegisterTypeLib32 [OLEAUT32.163]
160 * Adds information about a type library to the System Registry
162 * Docs: ITypeLib FAR * ptlib
163 * Docs: OLECHAR32 FAR* szFullPath
164 * Docs: OLECHAR32 FAR* szHelpDir
170 HRESULT WINAPI
RegisterTypeLib(
171 ITypeLib
* ptlib
, /*[in] Pointer to the library*/
172 OLECHAR
* szFullPath
, /*[in] full Path of the library*/
173 OLECHAR
* szHelpDir
) /*[in] dir to the helpfile for the library, may be NULL*/
174 { FIXME(ole
, "(%p,%s,%s): stub\n",ptlib
, debugstr_w(szFullPath
),debugstr_w(szHelpDir
));
175 return S_OK
; /* FIXME: pretend everything is OK */
178 /****************************************************************************
179 * OABuildVersion (TYPELIB.15)
183 DWORD WINAPI
OABuildVersion16(void)
185 WINDOWS_VERSION ver
= VERSION_GetVersion();
189 return MAKELONG(0xbd0, 0xa); /* Win95A */
191 return MAKELONG(0xbd3, 0x3); /* WfW 3.11 */
193 FIXME(ole
, "Version value not known yet. Please investigate it !");
194 return MAKELONG(0xbd0, 0xa); /* return Win95A for now */