+ _index = 0;
+
+ _list = new List<VoiceCommand>();
+ _callback = (IntPtr vcCommand, IntPtr userData) =>
+ {
+ SafeCommandHandle cmdHandle = new SafeCommandHandle(vcCommand);
+ cmdHandle._ownership = false;
+ _list.Add(new VoiceCommand(cmdHandle));
+ return true;
+ };
+ ErrorCode error = VcCmdListForeachCommands(_handle, _callback, IntPtr.Zero);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "GetAllCommands Failed with error " + error);
+ throw ExceptionFactory.CreateException(error);
+ }