I am looking for API to create user context and query the all accessible cameras’ information under that user, using c++. Can you guide me if there is any such API available?
Once you have made a login to a Milestone server the configuration you will receive are the cameras the logged in user has access to.
Perhaps the MediaLiveService C++ sample is the best way to see a login.
As the description of the MediaLiveService C++ sample explains:
You need to modify the source code with a correct GUID for the camera id, and a set of working credentials and server address. The vmsServer and VmsServerPort is usually something the user types in, while the vmsRecorderUri is found in the configuration for the specific camera, either in SystemInfo.xml or the response from the GetConfiguration() method on the ServerCommandService soap service (Corporate).
The GetConfiguration / SystemInfo can be seen in the TCPVideoViewer sample which is C# but easily translated to C++.