diff --git a/crypto/crypto.c b/crypto/crypto.c index 509ffb02b..64dd2a98d 100644 --- a/crypto/crypto.c +++ b/crypto/crypto.c @@ -21,6 +21,8 @@ see ecryption-doc.txt for details #include "rijndael-api-fst.h" #include "crypto.h" +extern HINSTANCE g_hInstance; + #define WKEY_LEN 256 #define KEY_LEN 512 #define PAD_SLOP 16 diff --git a/crypto/notepadcrypt.c b/crypto/notepadcrypt.c index 3b850c6fb..f860c1c49 100644 --- a/crypto/notepadcrypt.c +++ b/crypto/notepadcrypt.c @@ -261,8 +261,10 @@ int main(int argc, char *argv[]) err++; } if (err) { - printf("notepadcrypt - command line file encrypt/decrypt compatible with notepad2\n" - "Usage: notepadcrypt {ef em df dm} source destination {passphrase} {passphrase}\n\n"); + printf("\n%s - command line file encrypt/decrypt compatible with Notepad3\n\n" + "Usage: %s {ef em df dm} source destination {passphrase} {passphrase}\n", argv[0], argv[0]); + printf(" ef - encrypt w/filekey\n em - encrypt w/masterkey\n" + " df - decrypt w/filekey\n dm - decrypt w/masterkey\n\n"); } return err; diff --git a/minipath/minipath_VS2017.vcxproj b/minipath/minipath_VS2017.vcxproj index 0618794b0..d6aa3ecdf 100644 --- a/minipath/minipath_VS2017.vcxproj +++ b/minipath/minipath_VS2017.vcxproj @@ -22,7 +22,7 @@ {781B17E7-427F-488F-A8E9-360BA38A10F3} - 8.1 + 7.0 minipath @@ -61,22 +61,22 @@ ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\ - ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\minipath\ + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\$(ProjectName)\ true ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\ - ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\minipath\ + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\$(ProjectName)\ true ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\ - ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\minipath\ + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\$(ProjectName)\ true ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\ - ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\minipath\ + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\$(ProjectName)\ true diff --git a/np3encrypt/ReadMe.txt b/np3encrypt/ReadMe.txt new file mode 100644 index 000000000..2adeb5213 --- /dev/null +++ b/np3encrypt/ReadMe.txt @@ -0,0 +1,32 @@ +======================================================================== + KONSOLENANWENDUNG: np3encrypt-Projektübersicht +======================================================================== + +Diese np3encrypt-Anwendung wurde vom Anwendungs-Assistenten für Sie erstellt. + +Diese Datei bietet eine Übersicht über den Inhalt der einzelnen Dateien, aus +denen Ihre np3encrypt-Anwendung besteht. + + +np3encrypt.vcxproj + Dies ist die Hauptprojektdatei für VC++-Projekte, die mit dem Anwendungs-Assistenten generiert werden. Sie enthält Informationen über die Version von Visual C++, mit der die Datei generiert wurde, sowie über die Plattformen, Konfigurationen und Projektfunktionen, die im Anwendungs-Assistenten ausgewählt wurden. + +np3encrypt.vcxproj.filters + Dies ist die Filterdatei für VC++-Projekte, die mithilfe eines Anwendungs-Assistenten erstellt werden. Sie enthält Informationen über die Zuordnung zwischen den Dateien im Projekt und den Filtern. Diese Zuordnung wird in der IDE zur Darstellung der Gruppierung von Dateien mit ähnlichen Erweiterungen unter einem bestimmten Knoten verwendet (z. B. sind CPP-Dateien dem Filter "Quelldateien" zugeordnet). + +np3encrypt.cpp + Dies ist die Hauptquelldatei der Anwendung. + +///////////////////////////////////////////////////////////////////////////// +Andere Standarddateien: + +StdAfx.h, StdAfx.cpp + Mit diesen Dateien werden eine vorkompilierte Headerdatei (PCH) mit dem Namen np3encrypt.pch und eine vorkompilierte Typendatei mit dem Namen StdAfx.obj erstellt. + +///////////////////////////////////////////////////////////////////////////// +Weitere Hinweise: + +Der Anwendungs-Assistent weist Sie mit "TODO:"-Kommentaren auf Teile des +Quellcodes hin, die Sie ergänzen oder anpassen sollten. + +///////////////////////////////////////////////////////////////////////////// diff --git a/np3encrypt/np3encrypt.cpp b/np3encrypt/np3encrypt.cpp new file mode 100644 index 000000000..1aa2d92d0 --- /dev/null +++ b/np3encrypt/np3encrypt.cpp @@ -0,0 +1,6 @@ +// np3encrypt.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung. +// + +#include "stdafx.h" + +//#include "../crypto/notepadcrypt.c" diff --git a/np3encrypt/np3encrypt.vcxproj b/np3encrypt/np3encrypt.vcxproj new file mode 100644 index 000000000..5d0287741 --- /dev/null +++ b/np3encrypt/np3encrypt.vcxproj @@ -0,0 +1,171 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {0210F830-26C6-40FC-BFD1-6ED833B90830} + Win32Proj + np3encrypt + 7.0 + + + + Application + true + v141_xp + Unicode + + + Application + false + v141_xp + true + Unicode + + + Application + true + v141_xp + Unicode + + + Application + false + v141_xp + true + Unicode + + + + + + + + + + + + + + + + + + + + + false + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\ + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\$(ProjectName)\ + + + true + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\ + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\$(ProjectName)\ + + + true + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\ + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\$(ProjectName)\ + + + false + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\ + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\$(ProjectName)\ + + + + Level3 + + + MaxSpeed + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + + + + + + + Level3 + Disabled + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/np3encrypt/np3encrypt.vcxproj.filters b/np3encrypt/np3encrypt.vcxproj.filters new file mode 100644 index 000000000..23124a7bd --- /dev/null +++ b/np3encrypt/np3encrypt.vcxproj.filters @@ -0,0 +1,63 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {3f9cf2f1-2454-45d8-a2ed-02e3a66581e8} + + + + + + + + Headerdateien + + + Headerdateien + + + crypto + + + crypto + + + crypto + + + crypto + + + + + Quelldateien + + + Quelldateien + + + crypto + + + crypto + + + crypto + + + crypto + + + \ No newline at end of file diff --git a/np3encrypt/stdafx.cpp b/np3encrypt/stdafx.cpp new file mode 100644 index 000000000..ed629c589 --- /dev/null +++ b/np3encrypt/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : Quelldatei, die nur die Standard-Includes einbindet. +// np3encrypt.pch ist der vorkompilierte Header. +// stdafx.obj enthält die vorkompilierten Typinformationen. + +#include "stdafx.h" + +// TODO: Auf zusätzliche Header verweisen, die in STDAFX.H +// und nicht in dieser Datei erforderlich sind. diff --git a/np3encrypt/stdafx.h b/np3encrypt/stdafx.h new file mode 100644 index 000000000..8d827e828 --- /dev/null +++ b/np3encrypt/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h: Includedatei für Standardsystem-Includedateien +// oder häufig verwendete projektspezifische Includedateien, +// die nur in unregelmäßigen Abständen geändert werden. +// + +#pragma once + +#include "targetver.h" + +#include +#include + + + +// TODO: Hier auf zusätzliche Header, die das Programm erfordert, verweisen. diff --git a/np3encrypt/targetver.h b/np3encrypt/targetver.h new file mode 100644 index 000000000..a76541351 --- /dev/null +++ b/np3encrypt/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Durch Einbeziehen von"SDKDDKVer.h" wird die höchste verfügbare Windows-Plattform definiert. + +// Wenn Sie die Anwendung für eine frühere Windows-Plattform erstellen möchten, schließen Sie "WinSDKVer.h" ein, und +// legen Sie das _WIN32_WINNT-Makro auf die zu unterstützende Plattform fest, bevor Sie "SDKDDKVer.h" einschließen. + +#include diff --git a/src/Edit.c b/src/Edit.c index e38db9486..56020bd09 100644 --- a/src/Edit.c +++ b/src/Edit.c @@ -34,6 +34,7 @@ #include "SciCall.h" #include "../crypto/crypto.h" +extern UINT16 g_uWinVer; extern HWND hwndMain; extern HWND hwndEdit; extern HINSTANCE g_hInstance; diff --git a/src/Helpers.c b/src/Helpers.c index 0afec039c..3cc39db61 100644 --- a/src/Helpers.c +++ b/src/Helpers.c @@ -28,6 +28,8 @@ #include "helpers.h" #include "resource.h" +extern HINSTANCE g_hInstance; +extern UINT16 g_uWinVer; //============================================================================= // diff --git a/src/Helpers.h b/src/Helpers.h index eaa959b02..61a7b9d57 100644 --- a/src/Helpers.h +++ b/src/Helpers.h @@ -13,11 +13,6 @@ * * *******************************************************************************/ -#include "scintilla.h" - -extern HINSTANCE g_hInstance; -extern UINT16 g_uWinVer; - #define UNUSED(expr) (void)(expr) #define COUNTOF(ar) ARRAYSIZE(ar) //#define COUNTOF(ar) (sizeof(ar)/sizeof(ar[0])) @@ -49,18 +44,9 @@ __inline BOOL IniSectionSetInt(LPWSTR lpCachedIniSection,LPCWSTR lpName,int i) { } -extern HWND hwndEdit; -__inline void BeginWaitCursor() -{ - SendMessage(hwndEdit,SCI_SETCURSOR,(WPARAM)SC_CURSORWAIT,0); -} -__inline void EndWaitCursor() -{ - POINT pt; - SendMessage(hwndEdit,SCI_SETCURSOR,(WPARAM)SC_CURSORNORMAL,0); - GetCursorPos(&pt); - SetCursorPos(pt.x,pt.y); -} +//extern HWND hwndEdit; +#define BeginWaitCursor() SendMessage(hwndEdit,SCI_SETCURSOR,(WPARAM)SC_CURSORWAIT,0) +#define EndWaitCursor() { POINT pt; SendMessage(hwndEdit,SCI_SETCURSOR,(WPARAM)SC_CURSORNORMAL,0); GetCursorPos(&pt); SetCursorPos(pt.x,pt.y); } #define Is2k() (g_uWinVer >= 0x0500) diff --git a/src/Print.cpp b/src/Print.cpp index f89c8063d..82ca8dca6 100644 --- a/src/Print.cpp +++ b/src/Print.cpp @@ -33,7 +33,7 @@ extern "C" { extern "C" HINSTANCE g_hInstance; - +extern "C" HWND hwndEdit; // Global settings... extern "C" int iPrintHeader; diff --git a/src/Styles.c b/src/Styles.c index b63671fdb..a8a43c73d 100644 --- a/src/Styles.c +++ b/src/Styles.c @@ -32,6 +32,7 @@ #include "resource.h" #include "SciCall.h" +extern HINSTANCE g_hInstance; extern int iEncoding;