NO

Recent Posts

Pages: [1] 2 3 ... 10
1
Windows questions / Re: How to convert this sh*tcode to C?
« Last post by Vortex on Yesterday at 06:57:09 PM »
Hi Timo,

Thanks, your application works fine on Windows 7 with WebView2Loader.dll
2
Windows questions / Re: How to convert this sh*tcode to C?
« Last post by TimoVJL on Yesterday at 04:53:53 PM »
Those, who want to develop it further  :)
3
Beginner questions / Re: ListView Progressbar
« Last post by John Z on Yesterday at 01:45:08 PM »
Hi WiiLF23,

You did such a good job with your ListView ProgressBar I could not help myself but to tweak it a bit - sorry...

It was ready to be UNICODE with all the work that you did so I 'finished' it with minor changes to be UNICODE when:
#define UNICODE
#define _UNICODE
are included.

Without the two defines then it is in the original ANSI :)


Also add a bit of flexibility to color the 4 defined states text easier without changing the base routine.

Could also be interesting to color the progress bar the same as the text (but I've not done that  ;))

John Z

4
Bug reports / Re: Compiler bugs with PuTTY 0.79
« Last post by John Z on Yesterday at 10:58:14 AM »
OK thanks for finding the 'where'

I'm doing all development in 11 until the debugger is fixed. Later bugs may be 11 only.

You can still use the Find & Replace dropdowns and search fields int Pelles C 11 without re-typing the
whole entry.  If needed pick from the list then add and delete a space from the end of the search term.
This activates Find and Find Next without needing to reytpe everything.  Saves a bit of time and typing.

John Z
5
Beginner questions / Re: ListView Progressbar
« Last post by John Z on Yesterday at 10:52:26 AM »
Good work, nice visual.

John Z

P.S. When you come back to this code in 10 years having at least a few comments might be appreciated  :)
just a suggestion ......  ;)
6
Beginner questions / Re: ListView Progressbar
« Last post by WiiLF23 on Yesterday at 07:33:43 AM »
If anyone wants to play with another way, which in my project this paints directly and allows a lot more to customize.

Taken from:
https://www.codeproject.com/Articles/646482/Custom-Controls-in-Win-API-Control-Customization

7
Bug reports / Re: Compiler bugs with PuTTY 0.79
« Last post by severach on Yesterday at 06:08:45 AM »
fSDK only got a few files in before errors.
8
Bug reports / Re: Compiler bugs with PuTTY 0.79
« Last post by Vortex on November 28, 2023, 07:50:09 PM »
Hi severach,

Did you try Frankie's updated SDK for PellesC?

https://github.com/Frankie-PellesC/fsdk
9
Bug reports / Re: Compiler bugs with PuTTY 0.79
« Last post by severach on November 28, 2023, 06:48:17 PM »
I'm doing all development in 11 until the debugger is fixed. Later bugs may be 11 only.

PuTTY compiles cryptoapi.c without modification for me MinGW CYGWin and MinGW MSYS2. Tatham compiles in MSVC, clang, LCC and probably others. I looked in CYGWin include/w32api and the only place that has that constant is dpapi.h. It is in the include sequence somewhere. In Pelles it's not. Include dpapi.h doesn't work so I must add the constants at the top to compile.

Code: (putty.0.79.0004.cryptoapi.CRYPTPROTECTMEMORY_BLOCK_SIZE.patch) [Select]
diff -pNaru5 src.20230826_034018/windows/utils/cryptoapi.c src/windows/utils/cryptoapi.c
--- src.20230826_034018/windows/utils/cryptoapi.c 2023-08-26 03:40:17.000000000 -0400
+++ src/windows/utils/cryptoapi.c 2023-11-23 00:39:13.312861000 -0500
@@ -2,15 +2,22 @@
  * windows/utils/cryptoapi.c: implementation of cryptoapi.h.
  */
 
 #include "putty.h"
 
-#include "putty.h"
 #include "ssh.h"
 
 #include "cryptoapi.h"
 
+#ifndef CRYPTPROTECTMEMORY_BLOCK_SIZE
+#define CRYPTPROTECTMEMORY_BLOCK_SIZE  16
+
+#define CRYPTPROTECTMEMORY_SAME_PROCESS  0x00
+#define CRYPTPROTECTMEMORY_CROSS_PROCESS  0x01
+#define CRYPTPROTECTMEMORY_SAME_LOGON  0x02
+#endif
+
 DEF_WINDOWS_FUNCTION(CryptProtectMemory);
 
 bool got_crypt(void)
 {
     static bool attempted = false;

Many includes are not for including directly but are embedded in other includes you should be using. In CYGWin include/w32api it is found at the bottom of wincrypt.h
Code: (wincrypt.h) [Select]
#ifndef _WINCRYPT_NO_DPAPI
#include <dpapi.h>
#endif

In Pelles include it isn't found anywhere.
10
Bug reports / Re: Compiler bugs with PuTTY 0.79
« Last post by John Z on November 28, 2023, 01:52:50 PM »
This looks to me to be an issue with the putty windows sources not Pelles C.  According to Micro$oft, CRYPTPROTECTMEMORY_BLOCK_SIZE is to be defined in dpapi.h.  Pelles C has it defined there.  No where in the putty windows sources is dpapi.h included.

Bug: Windows Headers
Include sequence doesn't does not define CRYPTPROTECTMEMORY_BLOCK_SIZE found in dpapi.h
Code: [Select]
"c:\Program Files\PellesC\Bin\pocc.exe" -Tx86-coff -std:C17 -Zi -MT -Ob1 -fp:fast -W1 -Gd -Ze -Zx -DHAVE_STRTOUMAX=1 -DHAVE_GCP_RESULTSW=1 -DAPPNAME=PuTTY -DSSH=1 -DSERIAL=1 -DOTHERBACKENDS=1 -I"c:\Program Files\PellesC\Include\Win" -I"c:\Program Files\PellesC\Include" -Isrc -Isrc\windows -Isrc\terminal src\windows\utils\cryptoapi.c
src\windows\utils\cryptoapi.c(38): error #2048: Undeclared identifier 'CRYPTPROTECTMEMORY_BLOCK_SIZE' (did you mean: ?).
src\windows\utils\cryptoapi.c(66): error #2048: Undeclared identifier 'CRYPTPROTECTMEMORY_CROSS_PROCESS' (did you mean: ?).
Adding #include <dpapi.h> generates conflicts with wincrypt.h
Code: [Select]
c:\Program Files\PellesC\Include\Win\dpapi.h(48): error #2119: Redeclaration of '_CRYPTPROTECT_PROMPTSTRUCT', previously declared at c:\Program Files\PellesC\Include\Win\wincrypt.h(3400).
c:\Program Files\PellesC\Include\Win\dpapi.h(53): error #2119: Redeclaration of 'CRYPTPROTECT_PROMPTSTRUCT', previously declared at c:\Program Files\PellesC\Include\Win\wincrypt.h(3400).
c:\Program Files\PellesC\Include\Win\dpapi.h(53): error #2119: Redeclaration of 'PCRYPTPROTECT_PROMPTSTRUCT', previously declared at c:\Program Files\PellesC\Include\Win\wincrypt.h(3405).
c:\Program Files\PellesC\Include\Win\dpapi.h(74): error #2119: Redeclaration of 'CryptProtectData', previously declared at c:\Program Files\PellesC\Include\Win\wincrypt.h(3795).
c:\Program Files\PellesC\Include\Win\dpapi.h(75): error #2119: Redeclaration of 'CryptUnprotectData', previously declared at c:\Program Files\PellesC\Include\Win\wincrypt.h(3796).

What "Windows header" are you expecting it to be in?

As a possible workaround to see what else is wrong try adding
#define CRYPTPROTECTMEMORY_BLOCK_SIZE  16
to cryptoapi.c which is the only place this constant is referenced.

John Z
Pages: [1] 2 3 ... 10