Getting Started with Transactional Entity Framework
This guide illustrates how to create an HTTP handler for the TEF Server ( tentity_svr.exe ).
- Create a new empty project:
- On the File menu, select the New > Project
- In the New Project dialog, select the Visual C++ > Win32 and then select the Win32 Project
- Enter the Name
tef_getting_started
- Click the OK button to create the new project
- In the Win32 Application Wizard, click the Next button
- On the Application Settings page, under the Application type, choose the DLL type
- Click the Finish button to create the project.
- Configure the project for 64-bit platform:
- On the Project menu, select the Properties
- Click the Configuration Manager button to open the Configuration Manager dialog
- In the Configuration Manager dialog, in the Active solution platform drop-down list, select the <New...> option
- In the New Solution Platform dialog, in the Type or select the new platform drop-down list, select the x64 option, and click the OK button
- Close the Configuration Manager dialog.
- Configure other project's properties:
- In the Configuration Properties > Linker > General > Additional Library Directories, enter
"$(TEF_SDK)\lib\$(Configuration)\$(Platform)"
- In the Configuration Properties > C/C++ > General > Additional Include Directories, enter
"$(TEF_SDK)\include"
- In the Configuration Properties > C/C++ > Code Generation > Runtime Library, select the Multi-threaded Debug (/MTd) option
- In the Configuration Properties > Debugging > Command, enter
"$(TEF_SDK)\bin\$(Configuration)\$(Platform)\tentity_svr.exe"
- In the Configuration Properties > Debugging > Command Arguments, enter
"$(TargetDir)"
- Click the OK button to close the project's properties dialog.
- Add the following code to the
tef_getting_started.cpp :
- Compile (F7) and run the project (F5). It starts the
tentity_svr.exe (note: run Visual Studio as Administrator since the tentity_svr.exe uses HTTP Server API which requires Administrator privileges to be configured).
- In the browser, navigate to
http://127.0.0.1:42580/helloworld . The following image depicts the output:
Next |
|