Posts

Showing posts from December, 2020

How to Call Webservice through C++ Dynamic Link Library (DLL) in Visual Studio 2019 Using C++ Rest SDK

Image
 Introduction DLL is a one of the most useful Windows Components. In UNIX systems known as shared libraries DLL is used to share code and resources It can reduce the size of your applications Requirements Windows 7 or Later (Windows 10 Ideal) Check Desktop Development ith C++ Workload in the Visual Studio Installer Create Python Flask WebService Open Pycharm IDE Create a project with a virtual enviornment pip install flask Implement a webservice (Returns a JSON response) import flask from flask import request , jsonify app = flask.Flask(__name__) app.config[ "DEBUG" ] = True prediction = { "prediction" : { 'id' : 0 , 'title' : 'A Fire Upon the Deep' , 'author' : 'Vernor Vinge' , 'first_sentence' : 'The coldsleep itself was dreamless.' , 'year_published' : '1992' } } # A

How to build CppRestSDK using Vcpkg in Visual Studio 2019 (X64 windows & X86 windows)

Image
  C++ REST SDK The C++ REST SDK is developed by Microsoft. It's a   modern asynchronous C++ API design   for cloud-based client-server communication in native code.  By using this project  C++ developers can connect to and interact with services. C++ REST SDK can be installed on Windows by using VCPKG Download C++ Rest SDK GitHub Repo - Microsoft Original Repository Install packages with VCPKG  Install Visual Studio with C++  Install Windows SDK  git clone  https://github.com/microsoft/cpprestsdk.git Go inside VCPKG folder .\ vcpkg \bootstrap-vcpkg.bat   To use vcpkg with Visual Studio, Run the command below. .\ vcpkg \ vcpkg  integrate install   Run Following command to install the libraries list  zlib  , openssl  ,boost-system, boost-date-time ,boost-regex, boost- interprocess,   websocketpp,   brotli X64  vcpkg install --triplet x64-windows  zlib   openssl  boost-system boost-date-time boost-regex boost- interprocess   websocketpp   brotli X86 vcpkg install --triplet x86-windows