/* Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2013-2017 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifndef TC_HEADER_Platform #define TC_HEADER_Platform #include "PlatformBase.h" #include "Buffer.h" #include "Exception.h" #include "Directory.h" #include "Event.h" #include "File.h" #include "FilesystemPath.h" #include "Finally.h" #include "ForEach.h" #include "Functor.h" #include "Memory.h" #include "Mutex.h" #include "SharedPtr.h" #include "SystemException.h" #include "Thread.h" #endif // TC_HEADER_Platform
aboutsummaryrefslogtreecommitdiff
path: root/src/COMReg/COMReg.cpp
blob: 9582b413471403a18f5d220f941db13933e06333 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "Tcdefs.h"
#include <windows.h>
#include "SelfExtract.h"

int APIENTRY _tWinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPTSTR    lpCmdLine,
                     int       nCmdShow)
{
	wchar_t SetupFilesDir[TC_MAX_PATH];
	wchar_t *s;
	UNREFERENCED_PARAMETER(hInstance);
	UNREFERENCED_PARAMETER(hPrevInstance);
	UNREFERENCED_PARAMETER(nCmdShow);

	if (lpCmdLine[0] == L'/' && lpCmdLine[1] == L'p')
	{
		SelfExtractStartupInit();
		GetModuleFileName (NULL, SetupFilesDir, ARRAYSIZE (SetupFilesDir));
		s = wcsrchr (SetupFilesDir, L'\\');
		if (s)
			s[1] = 0;

		/* Create self-extracting package */
		MakeSelfExtractingPackage (NULL, SetupFilesDir, TRUE);
	}

	return 0;
}