Initial Commit

This commit is contained in:
2023-01-02 23:35:53 -05:00
parent a302b49950
commit ceee973ad7
150 changed files with 12229 additions and 89 deletions

60
platform/platform.c Normal file
View 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;
}