4 * Copyright 1997 Marcus Meissner
21 /****************************************************************************
22 * QueryPathOfRegTypeLib (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%04x,%p),can't handle non-string guids.\n",xguid
,wMaj
,wMin
,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 * QueryPathOfRegTypeLib (OLEAUT32.164)
64 QueryPathOfRegTypeLib32(
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 LPBSTR32 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%04x,%p),stub!\n",xguid
,wMaj
,wMin
,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
99 * Docs: OLECHAR FAR* szFile
100 * Docs: iTypeLib FAR* FAR* pptLib
106 HRESULT WINAPI
LoadTypeLib(
107 void *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_a(szFile
),pptLib
);
115 /****************************************************************************
116 * OABuildVersion (TYPELIB.15)
120 DWORD WINAPI
OABuildVersion()
122 return MAKELONG(0xbd3, 0x3);