Bevan E 0 Posted April 27, 2023 I have several applications I maintain which use the Overbyte ICS components. I recently updated to the latest release and have managed to build all the packages for C++Builder v11.x. But when I try to recompile my applications, I get all sorts of conflicts about ambiguity between Overbyteicswndcontrol and Ics::Fmx::Overbyteicswndcontrol, ambiguity between PCERT_BLOB and Winapi::Windows;:PCERT_BLOB, etc. I also tried building the Delphi v11.0 version of the libraries and using those - but the C++ header files contained all sorts of errors and bad references as well. Does anyone else use the components with C++Builder and have managed to use the latest version successfully? Share this post Link to post
FPiette 383 Posted April 27, 2023 2 hours ago, Bevan E said: I get all sorts of conflicts about ambiguity between Overbyteicswndcontrol and Ics::Fmx::Overbyteicswndcontrol, ambiguity Looks like you have two ICS versions. Share this post Link to post
Bevan E 0 Posted April 28, 2023 I have built the Common library, in Run and Design mode, and I have built both VCL and FMX libraries, in Run and Design mode. This is a VCL application, and the project only references the VCL and Common libraries. Share this post Link to post
FPiette 383 Posted April 28, 2023 Could you try with one of the sample provided with ICS? And/or create a simple test project with only a single form and a TWSocket component dropped on it, nothing else? Make sure you use ICS from the latest nightly snapshot or from the SVN repository. Share this post Link to post
Angus Robertson 574 Posted April 28, 2023 If you only use VCL, you don't need to build or install the common, vcl or fmx libraries, or use any units with fmx in the name. Try CBD101Install.groupproj instead which builds OverbyteIcsCBD101Run and OverbyteIcsCBD101Desgn. Currently there are no CBD packages for later versions of C++ because they have not been contributed by C++ users, but hopefully that will get fixed in May. Angus Share this post Link to post
Bevan E 0 Posted May 2, 2023 Thanks for the comments/suggestions. Just to confirm, it's the HttpServer component that appears to be causing the issues. I created a new C++Builder VCL Form project and added two buttons (Start/Stop) and the ICS HttpServer component. It generated lots of errors during compile. So I opened the CBXE2 OverbyteIcsHttpTst project (not realising it was HttpClient) and that compiled fine. I then opened the CBXE2 OverbyteIcsWebServ project and that too generated lots of errors, but this time to do with unresolved externals (perhaps because it's XE2 rather than 11.3) Going back to my basic THttpServer project mentioned above, there are 262 errors, starting with "unknown type name '__NCRYPT_UI_POLICY_BLOB'" in OverbyteIcsWinCrypt.hpp. In fact, now that I think about it, all of the errors I have encountered appear to be do with that particular file. Any further thoughts/suggestions would be greatly appreciated. Share this post Link to post
Angus Robertson 574 Posted May 2, 2023 No quick answer, you are using 10 year old C++ samples with the latest Delphi components. Try undefining AUTO_X509_CERTS, build the library and see if that is any better. Angus Share this post Link to post
David P 3 Posted May 2, 2023 In my experience, the Delphi/BCB hpp generator sometimes duplicates declarations already defined in wincrypt.h and other Embarcadero shipped headers. In these cases, I just comment out he offending declaration in the third-party component .hpp files. I'm running ICS v8.69 with BCB 11.3. Share this post Link to post
Bevan E 0 Posted May 3, 2023 Thanks for the comments, both of you. Going back to my original project, I commented out things in the .hpp files that were replications and/or invalid declarations, and such. It finally gets based all of the header errors, but now I'm getting these errors during link. Unresolved external '__fastcall Overbyteicswsocket::TCustomWSocket::ReceiveTB(System::DynamicArray<unsigned char>&, int)' referenced from ... OVERBYTEICSWSOCKETS.OBJ And about 17 more of those. Share this post Link to post
Angus Robertson 574 Posted May 3, 2023 ReceiveTB was added in V8.70 but is used by (I believe) only one other component, not the HTTP applications. What were you building when you got those errors. Although the error message you posted about does not say ReceiveTB but has a strange unicode character embedded. Angus Share this post Link to post
Bevan E 0 Posted May 3, 2023 I have a service application which starts a thread, and that thread uses THttpServer. It includes OverbyteIcsHttpSrv.hpp and uses #pramga link "crypt32.lib" and #pragma link "cryptui.lib" When the thread starts, it creates a new THttpServer, sets some basic settings, then calls the Start() method. It implements handlers for OnBgException, OnServerStarted, OnServerStopped, OnClientConnecct, OnClientDisconnect, OnGetDocument, OnPostDocument, OnPutDocument, OnDeleteDocument, OnPostedData, and OnUnknownRequestMethod. There are no other references to ICS in the entire project. Share this post Link to post
FPiette 383 Posted May 4, 2023 18 hours ago, Bevan E said: Unresolved external '__fastcall Overbyteicswsocket::TCustomWSocket::ReceiveTB(System::DynamicArray<unsigned char>&, int)' referenced from ... OVERBYTEICSWSOCKETS.OBJ This message means the compiler doesn't find ReceiveTB method implementation. Since it has been introduced not long ago (In V8.70), I suspect you have and old OVERBYTEICSWSOCKETS.OBJ hanging somewhere in the search path. Or maybe C++ compiler doesn't understand correctly the overloaded ReceiveTB method? I suggest you create a test application having a single form with a TWSocket and TButton dropped on it and a call to both overloaded version of ReceiveTB from the button's OnClick event handler. The code doesn't need to do anything useful neither to run correctly. The goal is only to understand with the simplest code possible if the compiler and linker understand/find ReceiveTB method. Share this post Link to post
Bevan E 0 Posted May 4, 2023 I have a service application which starts a thread, and that thread uses THttpServer. It includes OverbyteIcsHttpSrv.hpp and uses #pramga link "crypt32.lib" and #pragma link "cryptui.lib" When the thread starts, it creates a new THttpServer, sets some basic settings, then calls the Start() method. It implements handlers for OnBgException, OnServerStarted, OnServerStopped, OnClientConnecct, OnClientDisconnect, OnGetDocument, OnPostDocument, OnPutDocument, OnDeleteDocument, OnPostedData, and OnUnknownRequestMethod. There are no other references to ICS in the entire project. Share this post Link to post
Bevan E 0 Posted May 4, 2023 I just realised that the IcsVclCB110Design.bpl project didn't build properly because it came up with a linker error for VCL.EDGE.OBJ - so I was using the latest Common by and older VCL library. So, where can I get this VCL.EDGE.OBJ file from? I have scoured the Embarcadero installation and can't find it anywhere. Share this post Link to post
FPiette 383 Posted May 4, 2023 2 hours ago, Bevan E said: So, where can I get this VCL.EDGE.OBJ file from? Maybe the answer is in this article : https://blogs.embarcadero.com/new-in-getit-aws-sdk-for-delphi-and-edgebrowser-updates/ Also interesting: https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution Share this post Link to post
Angus Robertson 574 Posted May 4, 2023 The poster has yet to say which version of ICS he is trying to install. The latest V8.70 release does not access Edge or Web Browser so won't need them. The unreleased SVN and overnight zip version does use Edge, but only has packages for Delphi 2007, 10.4 and 11, nothing for C++ which might explain all the errors. It should be released later this month when the hundreds of package files for dozens of compilers will be updated. Angus Share this post Link to post
Bevan E 0 Posted May 4, 2023 I did mention that I upgraded to the latest release but, just to confirm, that is v8.70. The files for v8.70 include CB110InstallVclFmx.groupproj (in the Install directory), which appears to be for C++Builder. In trunk\source\OverbyteIcsOAuthFormVcl.pas it references Vcl.Edge for COMPILER27_UP, which includes C++Builder v11.3. I don't use this component in my project, but it's trying to include the .obj file anyway. I have installed the EdgeView2 SDK and the latest EdgeBrowser Demo and Imports Update. I have built the Demo project and tried to run it, but it gives the error "Failed to initialise Edge loader". I've been working with these things for long enough to know what I'm doing, but this has got me stumped - not necessarily only an ICS issue, most likely C++Builder as well, but it's very frustrating. Share this post Link to post
FPiette 383 Posted May 5, 2023 9 hours ago, Bevan E said: I have installed the EdgeView2 SDK and the latest EdgeBrowser Demo and Imports Update. I have built the Demo project and tried to run it, but it gives the error "Failed to initialise Edge loader". Do you mean Microsoft demo project? If it is, first check your WebView2 setup (Use release version, see https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/versioning). Share this post Link to post
Bevan E 0 Posted May 5, 2023 (edited) I feel like we have gotten off track. The point was, because I'm using C++Builder v11.3 and ICS v8.70, my application is being forced to use Vcl.Edge, because it using the THttpServer component. But this dependency requires a .obj file that doesn't exist anywhere in the C++Builder installation. On the one hand, it's only used for OAuth, so why should my application be required to include it anyway? But then OAuth is probably standard for THttpServer, so that might answer that question. Do I need to look at replacing THttpServer with TWSocket and implement my own header/body processing, since the current/latest THttpServer seems to be incomplete? It's a lot of work, but it could be significantly less than trying to get THttpServer working. I don't need SSL for this application either, so then all the crypto requirements disappear too. But I still can't build IcsVclCB110Design.bpl or IcsVclCB110Run.bpl because of this issue. Perhaps I need to go back to an earlier release of ICS? Someone said they are using v8.69 with C++Builder, perhaps that's the answer? Edited May 5, 2023 by Bevan E Share this post Link to post
Angus Robertson 574 Posted May 5, 2023 There are several points here. The HTTP server does not support OAuth2. The THttpServer component does not even handle SSL. That is TSSslHttpServer. OAuth2 in V8.70 does not support any embedded browsers, and does not use Edge. I've just searched the 560 files in the ics\packages directory, vcl.edge does not appear anywhere, vcledge does appear in packages for the next release only. So I've no idea why your installation requires vcl.edge. Angus Share this post Link to post
Bevan E 0 Posted May 5, 2023 Thanks to you both for your perseverance with this. Today I have reverted my entire ICS source directory to the HEAD version from the repository, which appears to be v8.71 now. I have successfully built IcsCommonCB110Run.cbproj, IcsCommonCB110Design.cbproj, and IcsVclCB110Run.cbproj. When I try to build IcsVclCB110Design.cbproj I get the linker error "Unable to open file 'SHDOCVW.OBJ'" I have searched my system and can't find this file anywhere. Now when I build my original project (because I don't need the design packages), I get unresolved externals for NCryptGetProperty NCryptExportKey, etc referenced by ICSVCLCB110RUN.LIB|OverbyteIcsMsSslUtils. I'll come back to this later, but there appears to have been some progress by completely reverting my ICS source. Share this post Link to post
FPiette 383 Posted May 6, 2023 FYI: SHDOCVW.OBJ is Microsoft's Shell Doc Object and Control Library (Implemented in SHDOCVW.DLL), part of Internet Explorer (Encapsulated by Embarcadero TWebBrowser component). SHDocVw.pas, SHDocVw.dcu, SHDocVw.hpp are delivered by Embarcadero and there is also a SHDocVw.lib that you may need to link with your application? Share this post Link to post
Angus Robertson 574 Posted May 6, 2023 I've explained the latest version in SVN will not build on C++, the packages are not complete. You would be better with V8.70. For a web server application, the MsSslUtils and wincrypt units are only needed to support Let's Encrypt certificates, so undefining AUTO_X509_CERTS in OverbyteIcsDefs.inc will avoid all those problems. Angus Share this post Link to post
Bevan E 0 Posted May 7, 2023 I commented out the define for AUTO_X509_CERTS and I found SHDOCVW_OCX.OBJ in Studio\22.0\lib\win32\release, which I copied to SHDOCVW.OBJ. This got me over the link error with that file, but now it's giving another link error for VCL.EDGE.OBJ. I know you say it's not used, but then it wouldn't be trying to link that file. In that lib\win32\release directory there is Vcl.Edge.dcu, but no Vcl.Edge.obj file. Share this post Link to post