Download src/test/probe_main.cpp from fava21/hf_repo4: direct link, hf CLI and curl.
- Browser
- Download file 1.63 kB
-
https://huggingface.co/datasets/fava21/hf_repo4/resolve/main/src/test/probe_main.cpp
- Command line
-
hf download hf://datasets/fava21/hf_repo4/src/test/probe_main.cpp
-
curl -L -o probe_main.cpp https://huggingface.co/datasets/fava21/hf_repo4/resolve/main/src/test/probe_main.cpp
1.63 kB
| // FCS Glass - src/test/probe_main.cpp | |
| // | |
| // The console entry point for fcs_selftest (REQ sec 16). | |
| // | |
| // This lives in its own file rather than in platform.cpp for a concrete reason: | |
| // platform.cpp is in FCS_CORE_SOURCES, which BOTH executables link. fcs_glass is | |
| // a WIN32-subsystem app whose entry point is wWinMain (src/app/main.cpp), so a | |
| // `main` in a shared translation unit would put a second entry point into the GUI | |
| // binary. Keeping the probe's main separate means each target has exactly one. | |
| // | |
| // It had never been linked by CMake at all - every earlier M0a build supplied its | |
| // own main() from a temporary harness - which is why the canonical build reported | |
| // LNK2019 unresolved external `main`. | |
| // | |
| // COM is initialised here rather than inside the probe: apartment selection is a | |
| // per-thread contract and does not carry to another thread, and the probe creates | |
| // the D3D/DComp objects on this one. COINIT_APARTMENTTHREADED matches what the UI | |
| // process wants (HC3/D-5: the UI is its own process and never a COM server). | |
| namespace fcs { | |
| int ProbeMain(HINSTANCE instance); // defined in src/test/probe.cpp | |
| } // namespace fcs | |
| int main() { | |
| fcs::ScopedCoInitialize com(COINIT_APARTMENTTHREADED); | |
| if (!com.ok()) { | |
| std::fprintf(stderr, "CoInitializeEx failed; the probe cannot run (hr=0x%08lX)\n", | |
| static_cast<unsigned long>(com.hr())); | |
| return 2; | |
| } | |
| // The probe's exit code is the scriptable result: 0 only when no row FAILed. | |
| return fcs::ProbeMain(::GetModuleHandleW(nullptr)); | |
| } | |