Skip to content

Commit e3dcad2

Browse files
authored
Update BatchDecode.cpp
1 parent 419d983 commit e3dcad2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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)

0 commit comments

Comments
 (0)