Skip to content

Commit d9d1171

Browse files
Merge pull request #3 from ywjywjywj528/patch-1
Update HelloWorld.c
2 parents 5e0b3f1 + 269d355 commit d9d1171

File tree

10 files changed

+42
-136
lines changed

10 files changed

+42
-136
lines changed

samples/C++/GeneralSettings/GeneralSettings.cpp

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,10 @@ int main()
2626
PublicRuntimeSettings settings;
2727
TextResultArray* barcodeResults = NULL;
2828

29-
// 1. Initialize license
30-
/*
31-
// By setting organization ID as "200001", a free public trial license will be used for license verification.
32-
// Note that network connection is required for this license to work.
33-
//
34-
// When using your own license, locate the following line and specify your Organization ID.
35-
// organizationID = "200001";
36-
//
37-
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
38-
*/
39-
DM_DLSConnectionParameters paramters;
40-
CBarcodeReader::InitDLSConnectionParameters(&paramters);
41-
paramters.organizationID = const_cast<char*>("200001"); // replace it with your organization ID
42-
errorCode = CBarcodeReader::InitLicenseFromDLS(&paramters, szErrorMsg, 256);
29+
// 1.Initialize license.
30+
// The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work.
31+
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
32+
errorCode = CBarcodeReader::InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", szErrorMsg, 256);
4333
if (errorCode != DBR_OK)
4434
{
4535
cout << szErrorMsg << endl;

samples/C++/HelloWorld/HelloWorld.cpp

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,10 @@ int main()
2525
char szErrorMsg[256];
2626
TextResultArray* barcodeResults = NULL;
2727

28-
// 1. Initialize license
29-
/*
30-
// By setting organization ID as "200001", a free public trial license will be used for license verification.
31-
// Note that network connection is required for this license to work.
32-
//
33-
// When using your own license, locate the following line and specify your Organization ID.
34-
// organizationID = "200001";
35-
//
36-
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
37-
*/
38-
DM_DLSConnectionParameters paramters;
39-
CBarcodeReader::InitDLSConnectionParameters(&paramters);
40-
paramters.organizationID = const_cast<char*>("200001"); // replace it with your organization ID
41-
errorCode = CBarcodeReader::InitLicenseFromDLS(&paramters, szErrorMsg, 256);
28+
// 1.Initialize license.
29+
// The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work.
30+
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
31+
errorCode = CBarcodeReader::InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", szErrorMsg, 256);
4232
if (errorCode != DBR_OK)
4333
{
4434
cout << szErrorMsg << endl;

samples/C++/Performance/AccuracyFirstSettings/AccuracyFirstSettings.cpp

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,20 +84,10 @@ int main() {
8484
int errorCode = 0;
8585
char szErrorMsg[256];
8686
TextResultArray* barcodeResults = NULL;
87-
// Initialize license
88-
/*
89-
// By setting organization ID as "200001", a free public trial license will be used for license verification.
90-
// Note that network connection is required for this license to work.
91-
//
92-
// When using your own license, locate the following line and specify your Organization ID.
93-
// organizationID = "200001";
94-
//
95-
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
96-
*/
97-
DM_DLSConnectionParameters paramters;
98-
CBarcodeReader::InitDLSConnectionParameters(&paramters);
99-
paramters.organizationID = const_cast<char*>("200001"); // replace it with your organization ID
100-
errorCode = CBarcodeReader::InitLicenseFromDLS(&paramters, szErrorMsg, 256);
87+
// 1.Initialize license.
88+
// The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work.
89+
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
90+
errorCode = CBarcodeReader::InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", szErrorMsg, 256);
10191
if (errorCode != DBR_OK)
10292
{
10393
cout << szErrorMsg << endl;

samples/C++/Performance/BatchDecode/BatchDecode.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,16 @@ char *stdin_get_str(char *str, int len)
3030
}
3131
int main(int argc, char* argv[])
3232
{
33-
33+
char szErrorMsg[256];
34+
// 1.Initialize license.
35+
// The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work.
36+
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
37+
int errorCode = dynamsoft::dbr::CBarcodeReader::InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", szErrorMsg, 256);
38+
if (errorCode != DBR_OK)
39+
{
40+
std::cout << szErrorMsg << endl;
41+
}
42+
3443
CDbrBarcodeFileReader *barcodeFileReader = new CDbrBarcodeFileReader();
3544

3645
if (argc >= 3 && argc%2==1)

samples/C++/Performance/BatchDecode/DbrBarcodeFileReader.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,6 @@
1818

1919
CDbrBarcodeFileReader::CDbrBarcodeFileReader()
2020
{
21-
// Initialize license
22-
/*
23-
// By setting organization ID as "200001", a free public trial license will be used for license verification.
24-
// Note that network connection is required for this license to work.
25-
//
26-
// When using your own license, locate the following line and specify your Organization ID.
27-
// organizationID = "200001";
28-
//
29-
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
30-
*/
31-
int errorCode = 0;
32-
char szErrorMsg[256];
33-
DM_DLSConnectionParameters paramters;
34-
dynamsoft::dbr::CBarcodeReader::InitDLSConnectionParameters(&paramters);
35-
paramters.organizationID = const_cast<char*>("200001"); // replace it with your organization ID
36-
errorCode = dynamsoft::dbr::CBarcodeReader::InitLicenseFromDLS(&paramters, szErrorMsg, 256);
37-
if (errorCode != DBR_OK)
38-
{
39-
cout << szErrorMsg << endl;
40-
}
41-
4221
m_pBarcodeReader = new dynamsoft::dbr::CBarcodeReader();
4322
}
4423

samples/C++/Performance/ReadRateFirstSettings/ReadRateFirstSettings.cpp

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -126,20 +126,10 @@ int main() {
126126
char szErrorMsg[256];
127127
TextResultArray* barcodeResults = NULL;
128128

129-
// Initialize license
130-
/*
131-
// By setting organization ID as "200001", a free public trial license will be used for license verification.
132-
// Note that network connection is required for this license to work.
133-
//
134-
// When using your own license, locate the following line and specify your Organization ID.
135-
// organizationID = "200001";
136-
//
137-
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
138-
*/
139-
DM_DLSConnectionParameters paramters;
140-
CBarcodeReader::InitDLSConnectionParameters(&paramters);
141-
paramters.organizationID = const_cast<char*>("200001"); // replace it with your organization ID
142-
errorCode = CBarcodeReader::InitLicenseFromDLS(&paramters, szErrorMsg, 256);
129+
// 1.Initialize license.
130+
// The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work.
131+
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
132+
errorCode = CBarcodeReader::InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", szErrorMsg, 256);
143133
if (errorCode != DBR_OK)
144134
{
145135
cout << szErrorMsg << endl;

samples/C++/Performance/SpeedFirstSettings/SpeedFirstSettings.cpp

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -140,21 +140,10 @@ int main() {
140140
char szErrorMsg[256];
141141
TextResultArray* barcodeResults = NULL;
142142

143-
// Initialize license
144-
/*
145-
// By setting organization ID as "200001", a free public trial license will be used for license verification.
146-
// Note that network connection is required for this license to work.
147-
//
148-
// When using your own license, locate the following line and specify your Organization ID.
149-
// organizationID = "200001";
150-
//
151-
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
152-
*/
153-
DM_DLSConnectionParameters paramters;
154-
CBarcodeReader::InitDLSConnectionParameters(&paramters);
155-
paramters.organizationID = const_cast<char*>("200001"); // replace it with your organization ID
156-
errorCode = CBarcodeReader::InitLicenseFromDLS(&paramters, szErrorMsg, 256);
157-
if (errorCode != DBR_OK)
143+
// 1.Initialize license.
144+
// The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work.
145+
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
146+
errorCode = CBarcodeReader::InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", szErrorMsg, 256);
158147
{
159148
cout << szErrorMsg << endl;
160149
}

samples/C++/VideoDecoding/VideoDecoding.cpp

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80,22 +80,11 @@ int main()
8080
}
8181

8282
int iRet = -1;
83-
84-
// Initialize license
85-
/*
86-
// By setting organization ID as "200001", a free public trial license will be used for license verification.
87-
// Note that network connection is required for this license to work.
88-
//
89-
// When using your own license, locate the following line and specify your Organization ID.
90-
// organizationID = "200001";
91-
//
92-
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
93-
*/
9483
char szErrorMsg[256];
95-
DM_DLSConnectionParameters paramters;
96-
CBarcodeReader::InitDLSConnectionParameters(&paramters);
97-
paramters.organizationID = const_cast<char*>("200001"); // replace it with your organization ID
98-
iRet = CBarcodeReader::InitLicenseFromDLS(&paramters, szErrorMsg, 256);
84+
// Initialize license.
85+
// The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work.
86+
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
87+
iRet = CBarcodeReader::InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", szErrorMsg, 256);
9988
if (iRet != DBR_OK)
10089
{
10190
cout << szErrorMsg << endl;

samples/C/GeneralSettings/GeneralSettings.c

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,10 @@ void main()
2626
TextResultArray* barcodeResults = NULL;
2727
int index;
2828

29-
// 1. Initialize license
30-
/*
31-
// By setting organization ID as "200001", a free public trial license will be used for license verification.
32-
// Note that network connection is required for this license to work.
33-
//
34-
// When using your own license, locate the following line and specify your Organization ID.
35-
// organizationID = "200001";
36-
//
37-
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
38-
*/
39-
DM_DLSConnectionParameters paramters;
40-
DBR_InitDLSConnectionParameters(&paramters);
41-
paramters.organizationID = "200001"; // replace it with your organization ID
42-
errorCode = DBR_InitLicenseFromDLS(&paramters, szErrorMsg, 256);
29+
// 1.Initialize license.
30+
// The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work.
31+
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
32+
errorCode = DBR_InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", szErrorMsg, 256);
4333
if (errorCode != DBR_OK)
4434
{
4535
printf("%s\r\n", szErrorMsg);

samples/C/HelloWorld/HelloWorld.c

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,10 @@ void main()
2525
TextResultArray* barcodeResults = NULL;
2626
int index;
2727

28-
// 1. Initialize license
29-
/*
30-
// By setting organization ID as "200001", a free public trial license will be used for license verification.
31-
// Note that network connection is required for this license to work.
32-
//
33-
// When using your own license, locate the following line and specify your Organization ID.
34-
// organizationID = "200001";
35-
//
36-
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
37-
*/
38-
DM_DLSConnectionParameters paramters;
39-
DBR_InitDLSConnectionParameters(&paramters);
40-
paramters.organizationID = "200001"; // replace it with your organization ID
41-
errorCode = DBR_InitLicenseFromDLS(&paramters, szErrorMsg, 256);
28+
// 1.Initialize license.
29+
// The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work.
30+
// If you don't have a license yet, you can request a trial from https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=c_cpp
31+
errorCode = DBR_InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", szErrorMsg, 256);
4232
if (errorCode != DBR_OK)
4333
{
4434
printf("%s\r\n", szErrorMsg);

0 commit comments

Comments
 (0)