OK, so I went over it once more.
Step 1.
Deleted the whole SDK_R21 folder, and extracted the sdk.zip to
D:\Projects\Dev\SDK_R21
Step 2
Extracted the project tool
Step 3
created and executed a batch file to create the necessary project files for the frameworks
d:\Projects\dev\SDK_R21\cinema4d_r21_project_tool_20190903\kernel_app_64bit.exe g_updateproject=d:\Projects\dev\SDK_R21\frameworks
Step4
created and executed a batch file for the plugins
d:\Projects\dev\SDK_R21\cinema4d_r21_project_tool_20190903\kernel_app_64bit.exe g_updateproject=d:\Projects\dev\SDK_R21\plugins
Step 5
created and executed a batch file for the plugin solution
d:\Projects\dev\SDK_R21\cinema4d_r21_project_tool_20190903\kernel_app_64bit.exe g_updateproject=d:\Projects\dev\SDK_R21\plugins\project
(This batch file will be used when plugins are added, in order to update the plugins solution)
Step 6
Double click the created plugin.sln, which opens Visual Studio.
Step 7
Build the whole solution, which results in errors for every vcxproj, as it mentions that Windows SDK version 8.1 was not found. Since running on Windows 10 I retarget all the projects ... Visual Studio offers the available Windows SDK 10.0.17763.0
I do this for every framework and plugin in the solution.
Step 8
Rebuild whole solution -> no more build errors.
Step 9
I set the cinema4dsdk as startup project, add the Cinema4D executables as debugging property
Step 10
Launch debugger, wait for Cinema 4D to launch, open the console (Shift-F10), close Cinema 4D ...
Result: ALL GOOD, no memory leaks, no dangling references.
Pffewh! Now I am finally settled, ready to start.
I don't know what went wrong the first and second time, and I am not trying to figure out.