From 2f0e20a5829a22ebe738d9ce8216fcd02591344c Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 16 Apr 2005 17:08:46 +0000 Subject: [PATCH] replaced WinMain with main git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3964 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/Library/LibraryLocal/LibraryLocal.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Contrib/Library/LibraryLocal/LibraryLocal.cpp b/Contrib/Library/LibraryLocal/LibraryLocal.cpp index 95fd503d..7c676749 100644 --- a/Contrib/Library/LibraryLocal/LibraryLocal.cpp +++ b/Contrib/Library/LibraryLocal/LibraryLocal.cpp @@ -13,16 +13,12 @@ using namespace std; -int APIENTRY WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpCmdLine, - int nCmdShow) +int main(int argc, char* argv[]) { - // Parse the command line + // Parse the command line string cmdline; - cmdline = lpCmdLine; string mode; string filename; @@ -30,13 +26,13 @@ int APIENTRY WinMain(HINSTANCE hInstance, int filefound = 0; - if (cmdline.length() >= 3) + if (argc == 3) { // Get the full path of the local file - mode = cmdline.substr(0, 1); - filename = cmdline.substr(2); + mode = argv[1]; + filename = argv[2]; char buf[MAX_PATH]; GetCurrentDirectory(MAX_PATH, buf);