mshtml: Don't use typeof as it's not portable.
This commit is contained in:
parent
e658b79965
commit
26ad119d3a
|
@ -133,7 +133,7 @@ static BOOL install_cab(LPCWSTR file_name)
|
||||||
{
|
{
|
||||||
HMODULE advpack;
|
HMODULE advpack;
|
||||||
char install_dir[MAX_PATH];
|
char install_dir[MAX_PATH];
|
||||||
typeof(ExtractFilesA) *pExtractFilesA;
|
HRESULT (WINAPI *pExtractFilesA)(LPCSTR,LPCSTR,DWORD,LPCSTR,LPVOID,DWORD);
|
||||||
LPSTR file_name_a;
|
LPSTR file_name_a;
|
||||||
DWORD res, len;
|
DWORD res, len;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
@ -158,7 +158,7 @@ static BOOL install_cab(LPCWSTR file_name)
|
||||||
}
|
}
|
||||||
|
|
||||||
advpack = LoadLibraryW(wszAdvpack);
|
advpack = LoadLibraryW(wszAdvpack);
|
||||||
pExtractFilesA = (typeof(ExtractFilesA)*)GetProcAddress(advpack, "ExtractFiles");
|
pExtractFilesA = (void *)GetProcAddress(advpack, "ExtractFiles");
|
||||||
|
|
||||||
len = WideCharToMultiByte(CP_ACP, 0, file_name, -1, NULL, 0, NULL, NULL);
|
len = WideCharToMultiByte(CP_ACP, 0, file_name, -1, NULL, 0, NULL, NULL);
|
||||||
file_name_a = heap_alloc(len);
|
file_name_a = heap_alloc(len);
|
||||||
|
|
|
@ -369,7 +369,7 @@ static HRESULT register_server(BOOL do_register)
|
||||||
{
|
{
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
HMODULE hAdvpack;
|
HMODULE hAdvpack;
|
||||||
typeof(RegInstallA) *pRegInstall;
|
HRESULT (WINAPI *pRegInstall)(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable);
|
||||||
STRTABLEA strtable;
|
STRTABLEA strtable;
|
||||||
STRENTRYA pse[35];
|
STRENTRYA pse[35];
|
||||||
static CLSID const *clsids[35];
|
static CLSID const *clsids[35];
|
||||||
|
@ -427,7 +427,7 @@ static HRESULT register_server(BOOL do_register)
|
||||||
strtable.pse = pse;
|
strtable.pse = pse;
|
||||||
|
|
||||||
hAdvpack = LoadLibraryW(wszAdvpack);
|
hAdvpack = LoadLibraryW(wszAdvpack);
|
||||||
pRegInstall = (typeof(RegInstallA)*)GetProcAddress(hAdvpack, "RegInstall");
|
pRegInstall = (void *)GetProcAddress(hAdvpack, "RegInstall");
|
||||||
|
|
||||||
hres = pRegInstall(hInst, do_register ? "RegisterDll" : "UnregisterDll", &strtable);
|
hres = pRegInstall(hInst, do_register ? "RegisterDll" : "UnregisterDll", &strtable);
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ static BOOL load_xpcom(const PRUnichar *gre_path)
|
||||||
}
|
}
|
||||||
|
|
||||||
#define NS_DLSYM(func) \
|
#define NS_DLSYM(func) \
|
||||||
func = (typeof(func))GetProcAddress(hXPCOM, #func); \
|
func = (void *)GetProcAddress(hXPCOM, #func); \
|
||||||
if(!func) \
|
if(!func) \
|
||||||
ERR("Could not GetProcAddress(" #func ") failed\n")
|
ERR("Could not GetProcAddress(" #func ") failed\n")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue