Initial Commit
This commit is contained in:
60
platform/platform.c
Normal file
60
platform/platform.c
Normal file
@ -0,0 +1,60 @@
|
||||
#include "platform/platform.h"
|
||||
|
||||
HRESULT platform_hook_init(
|
||||
const struct platform_config *cfg,
|
||||
enum platform_type type,
|
||||
jvs_provider_t jvs,
|
||||
HMODULE redir_mod
|
||||
)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
assert(cfg != NULL);
|
||||
assert(redir_mod != NULL);
|
||||
|
||||
hr = netenv_hook_init(&cfg->netenv);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = locale_hook_init(&cfg->locale);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = clock_hook_init(&cfg->clock);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = dns_platform_hook_init(&cfg->dns);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
if (jvs != NULL) {
|
||||
hr = jvs_hook_init(&cfg->jvs, jvs);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
}
|
||||
|
||||
hr = misc_hook_init(&cfg->misc);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = vfs_hook_init(&cfg->vfs);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
Reference in New Issue
Block a user