#include "base/fscapi.h"
#include "base/Log.h"
#include "base/util/utils.h"
-#include "spdm/spdmutils.h"
#include "spdm/constants.h"
#include "spdm/ManagementNode.h"
#include "spdm/DeviceManagementNode.h"
+#include "base/globalsdef.h"
+
+USE_NAMESPACE
#ifdef _WIN32_WCE
#define HKEY_DM_ROOT HKEY_LOCAL_MACHINE
);
if (key == 0) {
- lastErrorCode = ERR_INVALID_CONTEXT;
- sprintf(lastErrorMsg, "Invalid context path: %ls", fullContext);
+ //lastErrorCode = ERR_INVALID_CONTEXT;
+ //sprintf(lastErrorMsg, "Invalid context path: %ls", fullContext);
+ setErrorF(ERR_INVALID_CONTEXT, "Invalid context path: %ls", fullContext);
goto finally;
}
);
if (key == 0) {
- lastErrorCode = ERR_INVALID_CONTEXT;
- sprintf(lastErrorMsg, "Invalid context path: %s", fullContext);
+ //lastErrorCode = ERR_INVALID_CONTEXT;
+ //sprintf(lastErrorMsg, "Invalid context path: %s", fullContext);
+ setErrorF(ERR_INVALID_CONTEXT, "Invalid context path: %s", fullContext);
goto finally;
}
);
if (key == 0) {
- lastErrorCode = ERR_INVALID_CONTEXT;
- sprintf(lastErrorMsg, "Invalid context path: %s", fullContext);
+ //lastErrorCode = ERR_INVALID_CONTEXT;
+ //sprintf(lastErrorMsg, "Invalid context path: %s", fullContext);
+ setErrorF(ERR_INVALID_CONTEXT, "Invalid context path: %s", fullContext);
goto finally;
}
break;
}
else {
- lastErrorCode = GetLastError();
- strcpy(lastErrorMsg, "Error enumerating children nodes");
+ //lastErrorCode = GetLastError();
+ //strcpy(lastErrorMsg, "Error enumerating children nodes");
+ setError(GetLastError(), "Error enumerating children nodes");
goto finally;
}
}
if (key == 0) {
- lastErrorCode = ERR_INVALID_CONTEXT;
- sprintf(lastErrorMsg, "Invalid context path: %s", fullContext);
+ //lastErrorCode = ERR_INVALID_CONTEXT;
+ //sprintf(lastErrorMsg, "Invalid context path: %s", fullContext);
+ setErrorF(ERR_INVALID_CONTEXT, "Invalid context path: %s", fullContext);
goto finally;
}