Home | Info | Community | Development | myReactOS | Contact Us
[static]
Definition at line 384 of file regsvr.c.
Referenced by OLEAUTPS_DllRegisterServer().
{ static const WCHAR backslash[] = {'\\',0}; HRESULT hr; ITypeLib *typelib; WCHAR *path; DWORD len; len = GetSystemDirectoryW( NULL, 0 ) + strlenW( name ) + 1; if (!(path = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return E_OUTOFMEMORY; GetSystemDirectoryW( path, len ); strcatW( path, backslash ); strcatW( path, name ); hr = LoadTypeLib( path, &typelib ); if (SUCCEEDED(hr)) { hr = RegisterTypeLib( typelib, path, NULL ); ITypeLib_Release( typelib ); } HeapFree( GetProcessHeap(), 0, path ); return hr; }