Quantcast
Channel: Gemalto Sentinel Customer Discussions
Viewing all articles
Browse latest Browse all 1619

getSessionInfo() not behaving the same as getInfo() (C++)

$
0
0
My understanding is that this:
  1.          std::string info;

            const char* scope =
                "<haspscope>"
                "   <product id=\"102\"/>"
                "</haspscope>");

            const char* format =
                "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
                "<haspformat root=\"hasp_info\">"
                "    <feature>"
                "        <element name=\"license\" />"
                "    </feature>"
                "</haspformat>"
                "";

            haspStatus Status = Chasp::getInfo(scope, format, vendorCode, info);
should behave the same as:
  1.         std::string info;

            const char* format =
                "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
                "<haspformat root=\"hasp_info\">"
                "    <feature>"
                "        <element name=\"license\" />"
                "    </feature>"
                "</haspformat>"
                "";

            ChaspFeature feature = ChaspFeature::fromFeature(102);
            Chasp hasp(feature);
            haspStatus Status = hasp.getSessionInfo(format, info);
But Status is HASP_INV_HND for hasp.getSessionInfo() while getInfo() does what I expect it to. Is there any reason for this? I've tried using hasp.login(vendorEMSCode) before using hasp.getSessionInfo(), and it doesn't make a difference.

We are using hasp_api_cpp.h v 1.16 and hasp_api.h Copyright 2013

Thanks.

Viewing all articles
Browse latest Browse all 1619

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>