4 * Copyright 1997 Marcus Meissner
14 #include "wine/winbase16.h"
16 #include "wine/obj_base.h"
18 #include "winversion.h"
20 DEFAULT_DEBUG_CHANNEL(ole
)
22 /****************************************************************************
23 * QueryPathOfRegTypeLib16 [TYPELIB.14]
25 * the path is "Classes\Typelib\<guid>\<major>.<minor>\<lcid>\win16\"
30 QueryPathOfRegTypeLib16(
31 REFGUID guid
, /* [in] referenced guid */
32 WORD wMaj
, /* [in] major version */
33 WORD wMin
, /* [in] minor version */
34 LCID lcid
, /* [in] locale id */
35 LPBSTR16 path
/* [out] path of typelib */
38 char typelibkey
[100],pathname
[260];
42 WINE_StringFromCLSID(guid
,xguid
);
43 sprintf(typelibkey
,"SOFTWARE\\Classes\\Typelib\\%s\\%d.%d\\%ld\\win16",
44 xguid
,wMaj
,wMin
,lcid
&0xff
47 sprintf(xguid
,"<guid 0x%08lx>",(DWORD
)guid
);
48 FIXME(ole
,"(%s,%d,%d,0x%04lx,%p),can't handle non-string guids.\n",xguid
,wMaj
,wMin
,(DWORD
)lcid
,path
);
51 plen
= sizeof(pathname
);
52 if (RegQueryValue16(HKEY_LOCAL_MACHINE
,typelibkey
,pathname
,&plen
)) {
53 FIXME(ole
,"key %s not found\n",typelibkey
);
56 *path
= SysAllocString16(pathname
);
60 /****************************************************************************
61 * QueryPathOfRegTypeLib32 [OLEAUT32.164]
66 QueryPathOfRegTypeLib(
67 REFGUID guid
, /* [in] referenced guid */
68 WORD wMaj
, /* [in] major version */
69 WORD wMin
, /* [in] minor version */
70 LCID lcid
, /* [in] locale id */
71 LPBSTR path
/* [out] path of typelib */
74 char typelibkey
[100],pathname
[260];
79 WINE_StringFromCLSID(guid
,xguid
);
80 sprintf(typelibkey
,"SOFTWARE\\Classes\\Typelib\\%s\\%d.%d\\%ld\\win32",
81 xguid
,wMaj
,wMin
,lcid
&0xff
84 sprintf(xguid
,"<guid 0x%08lx>",(DWORD
)guid
);
85 FIXME(ole
,"(%s,%d,%d,0x%04lx,%p),stub!\n",xguid
,wMaj
,wMin
,(DWORD
)lcid
,path
);
88 plen
= sizeof(pathname
);
89 if (RegQueryValue16(HKEY_LOCAL_MACHINE
,typelibkey
,pathname
,&plen
)) {
90 FIXME(ole
,"key %s not found\n",typelibkey
);
93 *path
= HEAP_strdupAtoW(GetProcessHeap(),0,pathname
);
97 /******************************************************************************
98 * LoadTypeLib [TYPELIB.3] Loads and registers a type library
100 * Docs: OLECHAR32 FAR* szFile
101 * Docs: iTypeLib FAR* FAR* pptLib
107 HRESULT WINAPI
LoadTypeLib16(
108 OLECHAR
*szFile
, /* [in] Name of file to load from */
109 void * *pptLib
) /* [out] Pointer to pointer to loaded type library */
111 FIXME(ole
, "('%s',%p): stub\n",debugstr_w((LPWSTR
)szFile
),pptLib
);
119 /******************************************************************************
120 * LoadTypeLib32 [OLEAUT32.161]
121 * Loads and registers a type library
123 * Docs: OLECHAR32 FAR* szFile
124 * Docs: iTypeLib FAR* FAR* pptLib
130 HRESULT WINAPI
LoadTypeLib(
131 OLECHAR
*szFile
, /* [in] Name of file to load from */
132 void * *pptLib
) /* [out] Pointer to pointer to loaded type library */
134 FIXME(ole
, "('%s',%p): stub\n",debugstr_w(szFile
),pptLib
);
142 /******************************************************************************
143 * LoadRegTypeLib [OLEAUT32.162]
145 HRESULT WINAPI
LoadRegTypeLib(
147 unsigned short wVerMajor
,
148 unsigned short wVerMinor
,
152 FIXME(ole
, "(): stub\n");
160 /******************************************************************************
161 * RegisterTypeLib32 [OLEAUT32.163]
162 * Adds information about a type library to the System Registry
164 * Docs: ITypeLib FAR * ptlib
165 * Docs: OLECHAR32 FAR* szFullPath
166 * Docs: OLECHAR32 FAR* szHelpDir
172 HRESULT WINAPI
RegisterTypeLib(
173 ITypeLib
* ptlib
, /*[in] Pointer to the library*/
174 OLECHAR
* szFullPath
, /*[in] full Path of the library*/
175 OLECHAR
* szHelpDir
) /*[in] dir to the helpfile for the library, may be NULL*/
176 { FIXME(ole
, "(%p,%s,%s): stub\n",ptlib
, debugstr_w(szFullPath
),debugstr_w(szHelpDir
));
177 return S_OK
; /* FIXME: pretend everything is OK */
180 /****************************************************************************
181 * OABuildVersion (TYPELIB.15)
185 DWORD WINAPI
OABuildVersion16(void)
187 WINDOWS_VERSION ver
= VERSION_GetVersion();
191 return MAKELONG(0xbd0, 0xa); /* Win95A */
193 return MAKELONG(0xbd3, 0x3); /* WfW 3.11 */
195 FIXME(ole
, "Version value not known yet. Please investigate it !");
196 return MAKELONG(0xbd0, 0xa); /* return Win95A for now */