mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-15 16:49:06 +08:00
16 lines
500 B
C++
16 lines
500 B
C++
#include "metrics.h"
|
|
#include "vcpkg_Checks.h"
|
|
#include "vcpkg_Files.h"
|
|
#include <Windows.h>
|
|
|
|
using namespace vcpkg;
|
|
|
|
int WINAPI WinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPSTR, _In_ int)
|
|
{
|
|
int argCount;
|
|
LPWSTR * szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount);
|
|
|
|
Checks::check_exit(VCPKG_LINE_INFO, argCount == 2, "Requires exactly one argument, the path to the payload file");
|
|
Metrics::upload(Files::read_contents(szArgList[1]).value_or_exit(VCPKG_LINE_INFO));
|
|
}
|