commit cb29b9fd429e6af8315a2856eb56cb48002b782f Author: xiongcz Date: Fri Jun 6 13:40:09 2025 +0800 first commit diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..463c03e --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# ĬϺԵļ +/shelf/ +/workspace.xml +# ڱ༭ HTTP ͻ +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..937db7d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,64 @@ + + + + + + + + JUnit + + + JVM 语言 + + + Java + + + Java 5Java 语言级别迁移帮助Java + + + Java 8Java 语言级别迁移帮助Java + + + Java 语言级别迁移帮助Java + + + JavadocJava + + + Spring + + + Spring AOPSpring + + + TestNGJava + + + 代码成熟度Java + + + 性能Java + + + 数值问题Java + + + 类结构Java + + + 线程问题Java + + + 编译器问题Java + + + + + 用户定义 + + + + + + \ No newline at end of file diff --git a/.vs/zf_itk_c/FileContentIndex/f6aa88e4-1428-4aea-9b7c-dc1e63c45c3d.vsidx b/.vs/zf_itk_c/FileContentIndex/f6aa88e4-1428-4aea-9b7c-dc1e63c45c3d.vsidx new file mode 100644 index 0000000..2ad7c44 Binary files /dev/null and b/.vs/zf_itk_c/FileContentIndex/f6aa88e4-1428-4aea-9b7c-dc1e63c45c3d.vsidx differ diff --git a/.vs/zf_itk_c/FileContentIndex/read.lock b/.vs/zf_itk_c/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/.vs/zf_itk_c/config/applicationhost.config b/.vs/zf_itk_c/config/applicationhost.config new file mode 100644 index 0000000..269dc55 --- /dev/null +++ b/.vs/zf_itk_c/config/applicationhost.config @@ -0,0 +1,1021 @@ + + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.vs/zf_itk_c/v16/.suo b/.vs/zf_itk_c/v16/.suo new file mode 100644 index 0000000..6cc6b25 Binary files /dev/null and b/.vs/zf_itk_c/v16/.suo differ diff --git a/.vs/zf_itk_c/v16/Browse.VC.db b/.vs/zf_itk_c/v16/Browse.VC.db new file mode 100644 index 0000000..ca1f0ee Binary files /dev/null and b/.vs/zf_itk_c/v16/Browse.VC.db differ diff --git a/.vs/zf_itk_c/v16/ipch/AutoPCH/556239f240a91029/ZF_SENDGYLXTOERP.ipch b/.vs/zf_itk_c/v16/ipch/AutoPCH/556239f240a91029/ZF_SENDGYLXTOERP.ipch new file mode 100644 index 0000000..670bd55 Binary files /dev/null and b/.vs/zf_itk_c/v16/ipch/AutoPCH/556239f240a91029/ZF_SENDGYLXTOERP.ipch differ diff --git a/.vs/zf_itk_c/v16/ipch/AutoPCH/bbf8fd58b3bb2351/ZF_ITK_C.ipch b/.vs/zf_itk_c/v16/ipch/AutoPCH/bbf8fd58b3bb2351/ZF_ITK_C.ipch new file mode 100644 index 0000000..82b1e1a Binary files /dev/null and b/.vs/zf_itk_c/v16/ipch/AutoPCH/bbf8fd58b3bb2351/ZF_ITK_C.ipch differ diff --git a/.vs/zf_itk_c/v17/.suo b/.vs/zf_itk_c/v17/.suo new file mode 100644 index 0000000..e6ab194 Binary files /dev/null and b/.vs/zf_itk_c/v17/.suo differ diff --git a/.vs/zf_itk_c/v17/Browse.VC.db b/.vs/zf_itk_c/v17/Browse.VC.db new file mode 100644 index 0000000..6505fd0 Binary files /dev/null and b/.vs/zf_itk_c/v17/Browse.VC.db differ diff --git a/x64/Release/zf_itk_c.dll b/x64/Release/zf_itk_c.dll new file mode 100644 index 0000000..ab7c93f Binary files /dev/null and b/x64/Release/zf_itk_c.dll differ diff --git a/x64/Release/zf_itk_c.exp b/x64/Release/zf_itk_c.exp new file mode 100644 index 0000000..4d07146 Binary files /dev/null and b/x64/Release/zf_itk_c.exp differ diff --git a/x64/Release/zf_itk_c.lib b/x64/Release/zf_itk_c.lib new file mode 100644 index 0000000..a1be971 Binary files /dev/null and b/x64/Release/zf_itk_c.lib differ diff --git a/x64/Release/zf_itk_c.pdb b/x64/Release/zf_itk_c.pdb new file mode 100644 index 0000000..da6c6a1 Binary files /dev/null and b/x64/Release/zf_itk_c.pdb differ diff --git a/zf_itk_c.sdf b/zf_itk_c.sdf new file mode 100644 index 0000000..66b9c16 Binary files /dev/null and b/zf_itk_c.sdf differ diff --git a/zf_itk_c.sln b/zf_itk_c.sln new file mode 100644 index 0000000..831ce10 --- /dev/null +++ b/zf_itk_c.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.6.33723.286 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zf_itk_c", "zf_itk_c\zf_itk_c.vcxproj", "{68DDF508-8D60-4777-994C-369E7A4B18C1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {68DDF508-8D60-4777-994C-369E7A4B18C1}.Debug|x64.ActiveCfg = Release|x64 + {68DDF508-8D60-4777-994C-369E7A4B18C1}.Debug|x64.Build.0 = Release|x64 + {68DDF508-8D60-4777-994C-369E7A4B18C1}.Debug|x86.ActiveCfg = Debug|Win32 + {68DDF508-8D60-4777-994C-369E7A4B18C1}.Debug|x86.Build.0 = Debug|Win32 + {68DDF508-8D60-4777-994C-369E7A4B18C1}.Release|x64.ActiveCfg = Release|x64 + {68DDF508-8D60-4777-994C-369E7A4B18C1}.Release|x64.Build.0 = Release|x64 + {68DDF508-8D60-4777-994C-369E7A4B18C1}.Release|x86.ActiveCfg = Release|Win32 + {68DDF508-8D60-4777-994C-369E7A4B18C1}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {7C7AB596-AE43-42DF-B813-ECE2B7B321BD} + EndGlobalSection +EndGlobal diff --git a/zf_itk_c.v11.suo b/zf_itk_c.v11.suo new file mode 100644 index 0000000..197b8c9 Binary files /dev/null and b/zf_itk_c.v11.suo differ diff --git a/zf_itk_c/ZF_SendBZGXToERP.cpp b/zf_itk_c/ZF_SendBZGXToERP.cpp new file mode 100644 index 0000000..43b9081 --- /dev/null +++ b/zf_itk_c/ZF_SendBZGXToERP.cpp @@ -0,0 +1,1193 @@ +#include "ZF_SendPart.h" +#include + +// д־Ϣļ writeLog("ǰʱ: "+ std::to_string(totalGs)); +void writeLog(const std::string& message) { + string printMSG = message + "\n"; + printf(printMSG.c_str()); + std::ofstream logFile(logFilePath, std::ios_base::app); // ׷ģʽļ + if (logFile.is_open()) { + std::string logEntry = "[" + getCurrentTime() + "] " + message + "\n"; + logFile << logEntry; + logFile.close(); + } + else { + std::cerr << "޷־ļ" << std::endl; + } +} + + +/* +* ݴdelimiterַstr +*/ +std::vector splitStringByDelimiter(const std::string& str, char delimiter) { + std::vector tokens; + std::stringstream ss(str); + std::string token; + + while (std::getline(ss, token, delimiter)) { + tokens.push_back(token); + } + + return tokens; +} + +//ɾļ +void removeFileNew(string path) { + writeLog("removeFileNewΣpath" + path); + if (path.empty()) { + std::cerr << "removeFileNewδ: ɾļ·Ϊգ" << std::endl; + writeLog("removeFileNewδ: ɾļ·Ϊգ"); + return; + } + + try { + fs::path filePath(path); + + // ļǷ + if (fs::exists(filePath)) { + fs::remove(filePath); + writeLog("ļɾ: " + path); + std::cout << "ļɾ: " << filePath << std::endl; + } + else { + writeLog("ļ: " + path); + std::cout << "ļ: " << filePath << std::endl; + } + } + catch (const fs::filesystem_error& e) { + // 񲢴ļϵͳص쳣 + writeLog("ļʧ: " + std::string(e.what())); + std::cerr << "ļʧ: " << e.what() << std::endl; + } + catch (const std::exception& e) { + // ׼쳣 + writeLog("쳣: " + std::string(e.what())); + std::cerr << "쳣: " << e.what() << std::endl; + } +} + + +/* +* ̬ key value ֵԣָ· +* @param jsonString: ԭjson +* @param path: ԭjsonݵ· +* @param newValue: ӵjson +*/ +std::string addKeyValueByPath(const std::string& jsonString, const std::string& path, const std::string& newValue) { + writeLog("addKeyValueByPathΣjsonString" + jsonString + ",path" + path + ",newValue" + newValue); + string returnResultStr = ""; + // ԭʼΪջոֱӷ¼ֵ + if (jsonString.empty() || jsonString.find_first_not_of(" \t\n\r") == std::string::npos) { + returnResultStr = "{\"" + path + "\":\"" + newValue + "\"}"; + } + else { + // JSON Ƿ '{' ͷ '}' β + if (jsonString.front() != '{' || jsonString.back() != '}') { + writeLog("addKeyValueByPathθʽjsonString" + jsonString); + throw std::invalid_argument("Invalid JSON format"); + } + + // ȥβĻŲȡ + std::string trimmedJson = jsonString.substr(1, jsonString.size() - 2); + + // µļֵ + std::string newEntry = "\"" + path + "\":\"" + newValue + "\""; + + // ԭʼ JSON ݲΪգӶŷָ + if (!trimmedJson.empty()) { + newEntry = "," + newEntry; + } + + + // ظº JSON ַ + returnResultStr = "{" + trimmedJson + newEntry + "}"; + } + + writeLog("addKeyValueByPathֵ" + returnResultStr); + + return returnResultStr; +} + + +/* +* ޸ض· key valueֵ +* @param jsonData: ޸ĵjson +* @param path: ޸valuekeyλ +* @param newValue: µvalueֵ +*/ +//void updateValueByPath(json& jsonData, const std::string& path, const json& newValue) { +// // · '.' ָɼб磬"details.name" -> ["details", "name"] +// std::vector keys; +// std::string temp; +// for (char c : path) { +// if (c == '.') { +// keys.push_back(temp); +// temp.clear(); +// } +// else { +// temp += c; +// } +// } +// keys.push_back(temp); // һ +// +// // JSON ṹҵ +// json* current = &jsonData; +// for (size_t i = 0; i < keys.size() - 1; ++i) { +// if ((*current).contains(keys[i]) && (*current)[keys[i]].is_object()) { +// current = &((*current)[keys[i]]); // ƶһ +// } +// else { +// writeLog("updateValueByPathpath" + path + "Ч򲻴ڡ"); +// std::cerr << ": · '" << path << "' Ч򲻴ڡ\n"; +// return; +// } +// } +// +// // Ŀֵ +// std::string targetKey = keys.back(); +// if ((*current).contains(targetKey)) { +// (*current)[targetKey] = newValue; +// std::cout << " '" << targetKey << "' · '" << path << "' ɹ¡\n"; +// } +// else { +// std::cerr << ": · '" << path << "' δҵ '" << targetKey << "'\n"; +// } +//} + + +/* +* jsonȡdataȡdataݺʣಿ +* @param inputJson: ȡjson +* @param extractedData: ȡdata +* @param remainingJson: ʣಿ֣dataݣ +* @return: Ƿȡɹ +*/ +bool extractDataFromJson(const json& inputJson, json& extractedData, json& remainingJson) { + try { + // Ƿ payload.std_data.parameter.data + if (!inputJson.contains("payload") || + !inputJson["payload"].contains("std_data") || + !inputJson["payload"]["std_data"].contains("parameter") || + !inputJson["payload"]["std_data"]["parameter"].contains("data")) { + writeLog("extractDataFromJsonνṹinputJsonпܲpayload.std_data.parameter.dataҪǶ׽ṹ \n" + inputJson.dump()); + std::cerr << "Error: 'data' not found in the JSON structure." << std::endl; + return false; // false ʾȡʧ + } + + // ȡ data + extractedData = inputJson["payload"]["std_data"]["parameter"]["data"]; + + // Ƴ data ֣datakey + remainingJson = inputJson; + remainingJson["payload"]["std_data"]["parameter"].erase("data"); + + return true; // true ʾȡɹ + } + catch (const std::exception& e) { + writeLog("extractDataFromJsonjsonʱִ" + std::string(e.what())); + std::cerr << "Error occurred while processing JSON: " << e.what() << std::endl; + return false; // 쳣 false + } +} + + +/* +* ݴjsonģuidjsonģļjson +* +*/ +json parseJson(char* jsonTemplateUID) { + printf("ʼjsonģ\n"); + writeLog("ʼjsonģ塣"); + json jsonData; + tag_t templateDataSet = NULLTAG, + * ref_object = NULLTAG; + int n_found = 0; + char* fileName = NULL; + + try { + ITK__convert_uid_to_tag(jsonTemplateUID, &templateDataSet); + if (templateDataSet == NULLTAG) + { + writeLog("ʱ쳣޷ UID תΪݼǩ"); + throw std::runtime_error("޷ UID תΪݼǩ"); + } + if (templateDataSet != NULLTAG) + { + ITKCALL(AE_ask_dataset_named_refs(templateDataSet, &n_found, &ref_object)); + if (ref_object == NULLTAG || n_found == 0) { + writeLog("ʱ쳣δҵjsonģļݼö"); + throw std::runtime_error("δҵjsonģļݼö"); + } + + //֯ģļŵı· + ITKCALL(AOM_ask_value_string(templateDataSet, "object_name", &fileName)); + if (fileName == NULL) { + writeLog("ʱ쳣jsonģļΪգ"); + throw std::runtime_error("jsonģļΪգ"); + } + + std::string tempPath = getenv("TEMP"); + if (tempPath.empty()) { + writeLog("ʱ쳣 TEMP δ"); + throw std::runtime_error(" TEMP δ"); + } + std::string fullPath = tempPath + "\\" + fileName; + removeFileNew(fullPath); + // ļ· + if (IMF_export_file(ref_object[0], fullPath.c_str()) != 0) { + writeLog("jsonģļ·" + fullPath + "ʧܣ"); + EMH_store_error_s1(EMH_severity_error, ITK_err, "ļʧ"); + return json();// ؿ JSON + } + else { + // ļ + std::ifstream file_stream(fullPath); + if (!file_stream.is_open()) { + writeLog("jsonģļʧ: " + fullPath); + throw std::runtime_error("ļʧ: " + fullPath); + } + + // ȡļ + std::string file_content( + (std::istreambuf_iterator(file_stream)), + std::istreambuf_iterator()); + + // JSON + jsonData = json::parse(file_content); + + } + } + MEM_free(fileName); + MEM_free(ref_object); + return jsonData; + } + catch (const std::exception& e) { + writeLog("parseJsonjsonģʱִ" + std::string(e.what())); + printf(": %s\n", e.what()); + return json(); // ؿ JSON + } +} + + +/* +* ָ·² +* @param jsonData: ޸ĵjson +* @param fullPath: · +* @param newItem: +* @return: ޷ֵ +*/ +//void insertIntoNestedArray(json& jsonData, const std::string& fullPath, const json& newItem) { +// // ·ŷָɶ֣磺"level1.level2.data" -> ["level1", "level2", "data"] +// printf("insertIntoNestedArrayʼִСδĵ·%s\n json%s\n jsonData%s\n",fullPath.c_str(),newItem.dump().c_str(),jsonData.dump(4).c_str()); +// std::vector keys; +// std::string tempKey; +// for (char c : fullPath) { +// if (c == '.') { +// if (!tempKey.empty()) { +// keys.push_back(tempKey); // ǰʱΪգ뵽keys +// tempKey.clear(); // ʱ׼һ +// } +// } +// else { +// tempKey += c; // ƴַγһļ +// } +// } +// if (!tempKey.empty()) { // δļ뵽keys +// keys.push_back(tempKey); +// } +// +// // JSONṹҵ򴴽Ŀ +// json* current = &jsonData; // ǰָָJSON +// for (size_t i = 0; i < keys.size() - 1; ++i) { // ֱڶ +// if (!(*current).contains(keys[i])) { +// (*current)[keys[i]] = json::object(); // ڣ򴴽һն +// } +// if ((*current)[keys[i]].is_object()) { +// current = &((*current)[keys[i]]); // ǰָƶӶ +// } +// else { +// std::cerr << "· '" << fullPath << "' ڲ '" << keys[i] << "' Ч\n"; +// return; // ·м䲿ֲǶ򱨴˳ +// } +// } +// +// // ·һӦĿ +// std::string targetKey = keys.back(); // ȡ·еһ +// if (!(*current).contains(targetKey)) { +// (*current)[targetKey] = json::array(); // Ŀ鲻ڣ򴴽һ +// } +// if ((*current)[targetKey].is_array()) { +// (*current)[targetKey].push_back(newItem); // Ԫز뵽Ŀ +// std::cout << "Ԫѳɹӵ· '" << fullPath << "' С\n"; +// } +// else { +// std::cerr << "· '" << fullPath << "' δָһ顣\n"; // Ŀ겻飬򱨴 +// } +//} +// JSON · + +// JSON · +std::vector parsePath(const std::string& fullPath) { + std::vector path; + std::stringstream ss(fullPath); + std::string segment; + while (std::getline(ss, segment, '.')) { + path.push_back(segment); + } + return path; +} + +// Ҽλã򴴽 +size_t findOrCreateKey(std::string& jsonData, const std::string& key, size_t startPos, bool isLastKey) { + std::string searchKey = "\"" + key + "\":"; + size_t pos = jsonData.find(searchKey, startPos); + + if (pos == std::string::npos) { + // ҵǰ㼶Ľλ + size_t endBrace = jsonData.find('}', startPos); + if (endBrace == std::string::npos) { + throw std::runtime_error("Invalid JSON structure: Cannot find closing brace."); + } + std::string insertValue = isLastKey ? "[]" : "{}"; + // ǰһַǷΪ '{'ʾǿն󣬲Ҫ + if (endBrace > 0 && jsonData[endBrace - 1] == '{') { + jsonData.insert(endBrace, "\"" + key + "\": " + insertValue); + } + else { + jsonData.insert(endBrace, ", \"" + key + "\": " + insertValue); + } + pos = jsonData.find(searchKey, startPos); + } + return pos + searchKey.length(); +} + +// һ򴴽Ƕ׶ +size_t findOrCreateNestedObject(std::string& jsonData, const std::vector& path, size_t startPos = 0) { + size_t currentPos = startPos; + for (size_t i = 0; i < path.size(); ++i) { + bool isLastKey = (i == path.size() - 1); + currentPos = findOrCreateKey(jsonData, path[i], currentPos, isLastKey); + if (!isLastKey) { + // ҵһ㼶ʼλ + size_t nextStart = jsonData.find('{', currentPos); + if (nextStart == std::string::npos) { + throw std::runtime_error("Invalid JSON structure: Cannot find opening brace."); + } + currentPos = nextStart; + } + } + return currentPos; +} + +// ݵ +void insertDataIntoArray(std::string& jsonData, size_t start, size_t end, const std::string& newItem) { + if (start + 1 == end) { + // + jsonData.insert(end, newItem.substr(1, newItem.length() - 2)); + } + else { + // ǿ + jsonData.insert(end, ", " + newItem.substr(1, newItem.length() - 2)); + } +} + +// +/* +* ݵǶ JSON +* ָ·² +* @param jsonData: ޸ĵjson +* @param fullPath: · +* @param newItem: +* @return: ޷ֵ +*/ +std::string insertIntoNestedArray(const std::string& jsonData, const std::string& fullPath, const std::string& newItem) { + writeLog("insertIntoNestedArrayʼִСδ޸ĵjsonjsonData" + jsonData + "\n ĵ·fullPath" + fullPath + "\n jsonnewItem" + newItem + "\n"); + std::vector path = parsePath(fullPath); + std::string result = jsonData; + + size_t insertPos = findOrCreateNestedObject(result, path); + + // ҵʼͽλ + size_t start = result.find('[', insertPos); + size_t end = result.find(']', start); + if (start == std::string::npos || end == std::string::npos) { + writeLog("insertIntoNestedArrayjsonDataṹ쳣޷ҵ飡"); + throw std::runtime_error("Invalid JSON structure: Cannot find array."); + } + + insertDataIntoArray(result, start, end, newItem); + writeLog("insertIntoNestedArrayִнֵ" + result + "\n"); + return result; +} + + + + + + + +//json appendToObjectArray(json& jsonData, const json& newItem) { +// try { +// // У +// if (!jsonData.is_array()) { +// std::cerr << "jsonData һ顣\n"; +// return jsonData; // ԭʼ jsonData +// } +// +// // ӡϢ +// std::cout << "appendToObjectArray ʼִС\n" +// << " jsonData\n" << jsonData.dump(4) << "\n" +// << "¶\n" << newItem.dump(4) << "\n"; +// +// // ֱӽ¶׷ӵĩβ +// jsonData.push_back(newItem); +// +// std::cout << "¶ѳɹ׷ӵ jsonData С\n" +// << "º jsonData\n" << jsonData.dump(4) << "\n"; +// +// // ƴӺ JSON +// return jsonData; +// } +// catch (const json::exception& e) { +// std::cerr << "JSON 쳣" << e.what() << "\n"; +// return jsonData; // ԭʼ jsonData +// } +// catch (...) { +// std::cerr << "δ֪쳣\n"; +// return jsonData; // ԭʼ jsonData +// } +//} +/* +* ݵǶ JSON +* @param jsonData: ޸ĵjson +* @param newItem: +*/ +std::string appendToObjectArray(const std::string& jsonDataStr, const std::string& newItemStr) { + writeLog("appendToObjectArrayʼִСδ޸ĵjsonjsonData" + jsonDataStr + "\n newItem" + newItemStr + "\n"); + try { + // УǷǺϷ JSON + if (jsonDataStr.empty() || jsonDataStr.front() != '[' || jsonDataStr.back() != ']') { + writeLog("appendToObjectArrayjsonData쳣jsonDataǺϷJSON飡"); + std::cerr << "jsonData һϷ JSON 顣\n"; + return jsonDataStr; // ԭʼַ + } + + // ȥβķţȡ + std::string arrayContent = jsonDataStr.substr(1, jsonDataStr.size() - 2); + + // ΪգֱӲ¶ + if (arrayContent.empty()) { + return "[" + newItemStr + "]"; + } + + // ĩβ׷¶󣬲öŷָ + return "[" + arrayContent + "," + newItemStr + "]"; + } + catch (...) { + std::cerr << "δ֪쳣\n"; + writeLog("appendToObjectArrayִзδ֪쳣ֵ" + jsonDataStr + "\n"); + return jsonDataStr; // ԭʼַ + } +} + + +// ȥַβĿո +std::string trimNew(const std::string& str) { + // ҵһǿոַλ + size_t start = str.find_first_not_of(" \t"); + + // ȫǿոַΪգֱӷؿַ + if (start == std::string::npos) { + return ""; + } + + // ҵһǿոַλ + size_t end = str.find_last_not_of(" \t"); + + // ȷ end ЧģδΪ + if (end == std::string::npos || end < start) { + return ""; + } + + // ȡַעⳤȼȷ + return str.substr(start, end - start + 1); +} + + +/* +* Է=ָsegmentö +* @param segment: öΣ磺"key=value" +* @param key: ļ +* @param value: ֵ +* @return: ɹ true򷵻 false +*/ +bool parseSegment(const std::string& segment, std::string& key, std::string& value) { + size_t equalPos = segment.find('='); + if (equalPos == std::string::npos || equalPos == 0 || equalPos == segment.length() - 1) { + // ʽϷ false + writeLog("parseSegmentsegmentδԷš=ָʽϷ" + segment); + return false; + } + key = trimNew(segment.substr(0, equalPos)); + value = trimNew(segment.substr(equalPos + 1)); + return true; +} + +/** + * ַһֵӳС + * @param input ַ: "key1=value1;key2=value2;key3=value3" + * @param configMap һӳ䣬ڴ洢ļֵԡ: {{"key1", "value1"}, {"key2", "value2"}, {"key3", "value3"}} + */ +void parseConfigString(const std::string& input, + std::map& configMap) { + + writeLog("parseConfigStringʼִСδַinput" + input); + // ʹ find substr stringstream + size_t pos = 0; + size_t nextPos = 0; + while ((nextPos = input.find(';', pos)) != std::string::npos) { + std::string segment = input.substr(pos, nextPos - pos); + if (!segment.empty()) { // Կն + std::string key, value; + if (parseSegment(segment, key, value)) { + configMap[key] = value; // 뵽 map + } + else { + //ѡ¼Ƿʽ־׳쳣 + writeLog("parseConfigStringsegmentʽϷ" + segment); + std::cerr << "Invalid segment: " << segment << std::endl; + } + } + pos = nextPos + 1; + } + + // һ + if (pos < input.length()) { + std::string segment = input.substr(pos); + if (!segment.empty()) { + std::string key, value; + if (parseSegment(segment, key, value)) { + configMap[key] = value; // 뵽 map + } + else { + // ѡ¼Ƿʽ־׳쳣 + writeLog("parseConfigStringsegmentʽϷ" + segment); + std::cerr << "Invalid segment: " << segment << std::endl; + } + } + } +} + + +/* +* ݹjsonеļΪkeyToUpdateֵΪnewValue +* @param jsonData: µjson +* @param keyToUpdate: ·ɼ +* @param newValue: µֵ +* @return: ޷ֵ +*/ +void updateAllKeys(json& jsonData, const std::string& keyToUpdate, const json& newValue) { + // ӡȴ JSON + std::cout << "ȴ JSON ݣ" << newValue.dump(4) << "\n"; + writeLog("updateAllKeysʼִСδµjsonjsonData" + jsonData.dump(4) + "\n ·ɼkeyToUpdate" + keyToUpdate + "\n ȴ JSON ݣ" + newValue.dump(4) + "\n"); + // jsonData ǷΪ + if (!jsonData.is_object() && !jsonData.is_array()) { + writeLog("updateAllKeysjsonData쳣jsonDataǶ飡"); + std::cerr << "Error: jsonData Ƕ顣\n"; + return; + } + + // JSON + if (jsonData.is_object()) { + for (auto it = jsonData.begin(); it != jsonData.end(); ++it) { + std::string key = it.key(); + std::cout << " JSON ݵ key=" << key << "·ɵ key=" << keyToUpdate << "\n"; + + // ƥ䣬ֵ + if (key == keyToUpdate) { + std::cout << "ƥɹʼ JSON ݣ\n"; + writeLog("ƥɹʼ JSON ݣ"); + jsonData[key] = newValue; + std::cout << "Key '" << key << "' ³ɹ\n"; + writeLog("Key '" + key + "' ³ɹ"); + } + + // newValue еݹ + if (it.value().is_structured() && it.value() != newValue) { + updateAllKeys(it.value(), keyToUpdate, newValue); + } + } + } + else if (jsonData.is_array()) { + // еÿԪ + for (auto& item : jsonData) { + if (item.is_structured()) { // ֻ + updateAllKeys(item, keyToUpdate, newValue); + } + } + } + + // ӡյ JSON + std::cout << "updateAllKeys JSON ݣ" << jsonData.dump(4) << "\n"; +} + + +/** +* жǷͬԴ +*/ +bool isTypeOf1(tag_t objtag, const char* type_name) { + // ʼͱ + tag_t type = NULLTAG; + // úȡ + TCTYPE_ask_object_type(objtag, &type); + + // ʼͱ + tag_t item_type = NULLTAG; + // Ʋ + TCTYPE_find_type(type_name, "", &item_type); + + // ʼǷͬͱ־ + bool is_type = false; + // Чһ + if (item_type != NULLTAG) { + // ʼ߼жϱ + logical isok = FALSE; + // úж϶Ƿͬ + TCTYPE_is_type_of(type, item_type, &isok); + // ͬñ־Ϊ + if (isok) { + is_type = true; + } + } + // Ƿͬ͵жϽ + return is_type; +} + +/** +* @brief ݲȷ͵tag_t󣬻ȡitemitemRev +* @param check_tag +* @param item_tag +* @param rev_tag +* @return +*/ +int get_item_and_rev(tag_t check_tag, tag_t* item_tag, tag_t* rev_tag) { + int ifail = ITK_ok; + if (isTypeOf1(check_tag, "Item")) { + writeLog("ǰĶitem"); + printf("====ǰĶitem\n"); + *item_tag = check_tag; + ITEM_ask_latest_rev(*item_tag, rev_tag); + } + else if (isTypeOf1(check_tag, "ItemRevision")) { + writeLog("ǰĶRevision"); + printf("====ǰĶRevision\n"); + *rev_tag = check_tag; + ITEM_ask_item_of_rev(*rev_tag, item_tag); + } + return ifail; +} + +char* dateToString(const date_t* date) { + // ַij + size_t len = snprintf(NULL, 0, "%04d-%02d-%02d %02d:%02d:%02d", + date->year, date->month, date->day, date->hour, date->minute, date->second); + // ڴ + char* str = (char*)malloc(len + 1); + if (str == NULL) { + return NULL; // ڴʧ + } + // ʽַ + snprintf(str, len + 1, "%04d-%02d-%02d %02d:%02d:%02d", + date->year, date->month, date->day, date->hour, date->minute, date->second); + return str; +} + +/* +* ƻȡͬ͵ֵ +* @param function_tag ȡֵĶ +* @param attrName +* @param attrValue ȡֵ +* @return +*/ +int getAttrValue(tag_t function_tag, const char* attrName, char** attrValue) { + printf("getAttrValuestartattrName=%s\n", attrName); + writeLog("getAttrValuestartattrName=" + std::string(attrName)); + int ifail = ITK_ok; + char createDate[128] = ""; + char* propertyValue1 = NULL; + char* propertyValue2 = NULL; + char* propertyValue3 = NULL; + + PROP_value_type_t propertyType; + char* valtype_n = NULL; + + // ȡ + ITKCALL(ifail = AOM_ask_value_type(function_tag, attrName, &propertyType, &valtype_n)); + if (ifail != ITK_ok) { + writeLog("ȡԡ" + std::string(attrName) + "ʧܣ"); + printf("ȡԡ%sʧܣ\n", attrName); + MEM_free(valtype_n); + return ifail; + } + printf("ȡԡ%sɣʼ·ɻȡֵ\n", attrName); + writeLog("ȡԡ" + std::string(attrName) + "ɣʼ·ɻȡֵ"); + + switch (propertyType) { + case PROP_date: { + printf("Ϊdate\n"); + writeLog("Ϊdate"); + date_t propertyValue = NULLDATE; + ITKCALL(ifail = AOM_ask_value_date(function_tag, attrName, &propertyValue)); + if (ifail == ITK_ok && propertyValue.year != 0) { + sprintf_s(createDate, sizeof(createDate), "%04d-%02d-%02d %02d:%02d:%02d", + propertyValue.year, propertyValue.month + 1, propertyValue.day, + propertyValue.hour, propertyValue.minute, propertyValue.second); + *attrValue = (char*)MEM_alloc(strlen(createDate) + 1); + strcpy(*attrValue, createDate); + } + else { + *attrValue = (char*)MEM_alloc(1); + (*attrValue)[0] = ' '; + } + break; + } + case PROP_string: { + printf("Ϊstring\n"); + writeLog("Ϊstring"); + ITKCALL(ifail = AOM_ask_value_string(function_tag, attrName, &propertyValue1)); + if (ifail == ITK_ok && propertyValue1 != NULL) { + *attrValue = (char*)MEM_alloc(strlen(propertyValue1) + 1); + strcpy(*attrValue, propertyValue1); + MEM_free(propertyValue1); + } + else { + *attrValue = (char*)MEM_alloc(1); + (*attrValue)[0] = ' '; + } + break; + } + case PROP_untyped_reference: { + printf("Ϊuntyped_reference\n"); + writeLog("Ϊuntyped_reference"); + ITKCALL(ifail = AOM_UIF_ask_value(function_tag, attrName, &propertyValue2)); + if (ifail == ITK_ok && propertyValue2 != NULL) { + *attrValue = (char*)MEM_alloc(strlen(propertyValue2) + 1); + strcpy(*attrValue, propertyValue2); + MEM_free(propertyValue2); + } + else { + *attrValue = (char*)MEM_alloc(1); + (*attrValue)[0] = ' '; + } + break; + } + default: { + printf("Ϊ%dִĬϷȡֵ\n", propertyType); + writeLog("Ϊ" + std::to_string(propertyType) + "ִĬϷȡֵ"); + ITKCALL(ifail = AOM_UIF_ask_value(function_tag, attrName, &propertyValue3)); + if (ifail == ITK_ok && propertyValue3 != NULL) { + *attrValue = (char*)MEM_alloc(strlen(propertyValue3) + 1); + strcpy(*attrValue, propertyValue3); + MEM_free(propertyValue3); + } + else { + *attrValue = (char*)MEM_alloc(1); + (*attrValue)[0] = ' '; + } + break; + } + } + + printf("ȡɣ[%s]=[%s]\n", attrName, *attrValue); + writeLog("ȡɣ[" + std::string(attrName) + "]=" + std::string(*attrValue)); + MEM_free(valtype_n); + return ifail; +} + + +// char* תΪ std::string +std::string CharToString(const char* charArray) { + // ǷΪָ + if (charArray == nullptr) { + return ""; // ؿַ + } + // ʹ std::string Ĺ캯ת + return std::string(charArray); +} + + +// ȡ 17 λʱ string +std::string get17BitTimestamp() { + auto now = std::chrono::high_resolution_clock::now(); + auto nanoseconds = std::chrono::time_point_cast(now).time_since_epoch().count(); + return std::to_string(nanoseconds); +} + +/* +* jsonļjsonģе +* @param json_pre_data ǰjson +* @param json_config_list ѡеùһ㶼һdata滻򣬵ڶǸݵǰȡdataݹ +* @param gx_tag +* @return +*/ +std::string updateJson(json json_pre_data, vector json_config_list, tag_t gx_tag) { + writeLog("ʼjsonģ"); + writeLog("updateJsonjson_pre_data: " + json_pre_data.dump(4)); + try { + tag_t item_tag = NULLTAG; + tag_t rev_tag = NULLTAG; + tag_t function_tag = NULLTAG; + string json_result = ""; + string dataJsonStr = ""; + // ȡdata + json data_json; + //ȡdatajson + json reamin_data_json; + std::map jsonConfigMapHead; + //ѡõjson򣺰ֶ + std::map jsonConfigMapData; + extractDataFromJson(json_pre_data, data_json, reamin_data_json); + writeLog("ȡdatajsonݣ" + reamin_data_json.dump(4)); + writeLog("ȡdataݣ" + data_json.dump(4)); + //data_json.clear(); + writeLog("dataݣ" + data_json.dump(4)); + //ȡӦitemitemRev + get_item_and_rev(gx_tag, &item_tag, &rev_tag); + + + if (json_config_list.size() > 0 && json_config_list.size() == 2) + { + //TODO 1.ʼdatajson + writeLog(">>>ʼdatajson"); + string config1 = json_config_list[0]; + parseConfigString(config1, jsonConfigMapHead); + //jsonùĵһУ³datajson + for (const auto& pair : jsonConfigMapHead) { + writeLog("dataù=Key: " + pair.first + ", Value: " + pair.second); + const std::string& key = pair.first; + const std::string& value = pair.second; + //ùеֶ + if (value == "TimeStamp") { + writeLog("json⴦TimeStampȡǰʱ17λʱ"); + updateAllKeys(reamin_data_json, key, get17BitTimestamp()); + } + else if (value == "CurrentDate") { + writeLog("json⴦CurrentDateȡǰʱ"); + updateAllKeys(reamin_data_json, key, getTime()); + } + else { + updateAllKeys(reamin_data_json, key, value); + } + } + + + //TODO 2.ʼdataڵjson + writeLog(">>>ʼdataڵjson"); + string config2 = json_config_list[1]; + parseConfigString(config2, jsonConfigMapData); + //˴keyΪеģֶΣvalueΪֶεֵ + //json newDataJson;//ǰ֯һµdataµjson + string newDataJson = "{}"; + dataJsonStr = data_json.dump(); + if (jsonConfigMapData.size() > 0) { + for (const auto& pair : jsonConfigMapData) { + writeLog("dataù=Key: " + pair.first + ", Value: " + pair.second); + const std::string& key = pair.first; + const std::string& value = pair.second; + + size_t dotPos = value.find('.'); + if (dotPos != std::string::npos) { + + std::string attrType = value.substr(0, dotPos);//ͣItemRev + std::string attrName = value.substr(dotPos + 1);//Եʵ + // 建洢ֵ + char* attrValue = (char*)MEM_alloc(1028 * sizeof(char)); + char* attrValue1 = NULL; + writeLog("jsonУattrType" + attrType + ", attrName" + attrName); + if (attrType == "Item") { + writeLog("ǰΪItemԣ"); + if (item_tag != NULLTAG) { + function_tag = item_tag; + } + } + else if (attrType == "Rev") { + writeLog("ǰΪRevԣ"); + if (rev_tag != NULLTAG) + { + function_tag = rev_tag; + } + } + else { + //attrValue + writeLog("ֱӸֵ"); + tc_strcpy(attrValue, value.c_str()); + + } + //TODO ƣݲͬͣȡֵûҵȡֵΪգ + if (function_tag != NULLTAG) { + writeLog("ݶӦtagȡֵ"); + getAttrValue(function_tag, attrName.c_str(), &attrValue1); + if (attrValue1 != NULL) { + writeLog("ȡֵ" + CharToString(attrValue1)); + tc_strcpy(attrValue, attrValue1); + } + else + { + writeLog("ȡ[" + attrName + "]ֵʧܣ\n"); + } + + } + + //TODO newDataJsonм + newDataJson = addKeyValueByPath(newDataJson, key, attrValue); + + + if (attrValue1 != NULL) { MEM_free(attrValue1); } + if (attrValue != NULL) { MEM_free(attrValue); } + } + else + { + newDataJson = addKeyValueByPath(newDataJson, key, value); + } + + } + writeLog("appendToObjectArrayִǰ=newDataJson:" + dataJsonStr); + dataJsonStr = appendToObjectArray(dataJsonStr, newDataJson); + writeLog("appendToObjectArrayִк=newDataJson:" + dataJsonStr); + } + else { + writeLog("ȡõjson¹쳣 -option õѡеϢǷȷ\n"); + } + + + } + else { + writeLog("ȡõjson¹쳣 -option õѡеϢǷȷ\n"); + } + + //ºaddjsonݺƴjsonģ + writeLog("ºaddjsonݺ󣬸ºdataݣ" + reamin_data_json.dump(4) + "֯dataݣ%s" + dataJsonStr); + json_result = insertIntoNestedArray(reamin_data_json.dump(), "payload.std_data.parameter.data", dataJsonStr); + writeLog("ºaddjsonݺƴӵjsonģݣ" + json_result); + + return json_result; + } + catch (const json::exception& e) { + writeLog("updateJson JSON 쳣: " + std::string(e.what())); + } + catch (const std::exception& e) { + writeLog("updateJson׼쳣:" + std::string(e.what())); + } + catch (...) { + writeLog("updateJsonδ֪쳣\n"); + } + +} + +/* +* ص +*/ +size_t WriteCallback1(void* contents, size_t size, size_t nmemb, void* userp) { + size_t totalSize = size * nmemb; + std::string* response = static_cast(userp); + if (response) { + response->append(static_cast(contents), totalSize); + } + return totalSize; +} + + +string sendRequestToErp(const std::string& url, std::string& jsonData) { + // POST + writeLog("ʼPost"); + writeLog("jsonData:" + jsonData); + writeLog("url:" + url); + std::string tempPath = getenv("TEMP"); + string jsonFileName = generate_uuid_v4(); + std::string jsonFilePath = tempPath + "\\" + jsonFileName + ".txt"; + writeJsonToFile(jsonFilePath, jsonData); + writeLog("jsonļѱ浽: " + jsonFilePath); + + string cmd = "java -jar %ZF_ROOT%\\bin\\sendGXtoERP.jar " + std::string(url) + " " + jsonFilePath; + + string result; + char buf[8000] = { 0 }; + //logf("popen"); + FILE* pf = _popen(cmd.c_str(), "r"); + while (fgets(buf, sizeof buf, pf)) { + result.append(buf); + } + _pclose(pf); + writeLog("result:" + result); + return result; +} + +bool checkErrorMessage(const std::string& str) { + size_t pos = str.find("Ϣ:"); + if (pos != std::string::npos) { + // ҵ "Ϣ:" 󣬼Ƿзǿհַ + pos += std::string("Ϣ:").length(); + while (pos < str.length() && std::isspace(str[pos])) { + ++pos; + } + return pos == str.length(); + } + return false; +} + + +/* +* ׼ͬ +*/ +int ZF_SendBZGXToERP(EPM_action_message_t msg) { + logFilePath = getLogFilePath("ZF_SendBZGXToERP_"); + writeLog("=========================׼ͬ Start==================="); + // + int argCnt = 0, + attachmentCount = 0, + num1 = 0, + num2 = 0; + char* arg = NULL, + * argName = NULL, + * argValue = NULL; + //handlerõ-typeҪݵİ汾ʵֵ + std::vector types; + //handlerõ-optionѡƣȡѡõjsonϢ + std::vector configs; + //¼jsonֶԶչϵѡ + char preferenceName[1024] = ""; + tag_t rootTask = NULLTAG, + attachmentTag = NULLTAG; + tag_t* attachmentTags = NULL; + char* attachmentType = NULL; + char* templateDatasetUID = NULL; + //ģݼUID + char** jsonTemplateUID = NULL; + char** referList = NULL; + + writeLog("־ļ\n"); + int ifail = ITK_ok; + //ȡµ + argCnt = TC_number_of_arguments(msg.arguments); + if (argCnt <= 0) { + writeLog("ǰδκβã"); + EMH_store_error_s1(EMH_severity_error, EMH_USER_error_base, "ǰδκβã"); + } + else + { + //ȡõIJϢ + writeLog("start ȡõIJϢ!\n"); + for (int i = 0; i < argCnt; i++) { + arg = TC_next_argument(msg.arguments); + ITKCALL(ifail = ITK_ask_argument_named_value((const char*)arg, &argName, &argValue)); + writeLog("ȡϢkey:value=" + std::string(argName) + ":" + std::string(argValue)); + if (tc_strcmp(argName, "option") == 0) { + writeLog("ȡõoptionϢ\n"); + //if (argValue != NULL) { tc_strcpy(preferenceName, argValue); } + if (argValue != NULL) { + tc_strncpy(preferenceName, argValue, sizeof(preferenceName) - 1); + preferenceName[sizeof(preferenceName) - 1] = '\0'; // ȷֹ + } + else { + preferenceName[0] = '\0'; // ֱÿ + } + } + if (tc_strcmp(argName, "type") == 0) + { + writeLog("ȡõtypeϢ\n"); + std::string argStr(argValue); + types = splitStringByDelimiter(argStr, ';');//ȡõ-type + //break; + } + + MEM_free(argName); argName = NULL; + MEM_free(argValue); argValue = NULL; + } + printf("ȡõѡƣpreferenceName=%s\n", preferenceName); + //TODO3 ȡhandlerе-optionϢѡ + if (preferenceName != NULL) { + //=====================================1===================================================================== + //TODO4 ȡѡָƵϢ-JSON + ITKCALL(ifail = PREF_ask_char_values(preferenceName, &num2, &referList)); + + if (num2 <= 0) { + EMH_store_error_s1(EMH_severity_error, EMH_USER_error_base, "̲-optionõѡ쳣ã"); + writeLog("̲-optionõѡ쳣ã"); + } + else + { + + //бѡjson򣬲ִжӦ + for (int k = 0; k < num2; k++) { + referList[k]; + configs.push_back(referList[k]); + } + //========================================================================================== + //TODO2 ȡѡָUIDjsonģ + ITKCALL(ifail = PREF_ask_char_values("ZF_SendBZGXToERP_Template", &num1, &jsonTemplateUID)); + if (num1 <= 0) + { + EMH_store_error_s1(EMH_severity_error, EMH_USER_error_base, "δȡѡ-ZF_SendBZGXToERP_TemplateϢã"); + writeLog("ѡ-ZF_SendBZGXToERP_Templateȡjsonģuidʧܣã"); + + } + else + { + //====================================2======================================================================== + //uidȡJSONģ, + json json_data = parseJson(jsonTemplateUID[0]); + string json_data_str = ""; + writeLog("ģUIDȡjsonģݣ\n" + json_data.dump(4)); + + //ȡǰµж + ITKCALL(ifail = EPM_ask_root_task(msg.task, &rootTask)); + ITKCALL(ifail = EPM_ask_attachments(rootTask, EPM_target_attachment, &attachmentCount, &attachmentTags)); + for (int j = 0; j < attachmentCount; j++) { + attachmentTag = attachmentTags[j]; + //ȡ¶ͣȽϣƥִһ + ITKCALL(ifail = AOM_ask_value_string(attachmentTag, "object_type", &attachmentType)); + if (attachmentType != NULL) { + //õͼϣ뵱ǰ̶ͽбȽ + if (inArray(types, attachmentType)) { + json_data_str = updateJson(json_data, configs, attachmentTag); + } + } + } + + writeLog("͵json_data:\n" + json_data_str); + //ȡѡõĽӿڵַ + char* url; + ITKCALL(ifail = PREF_ask_char_value("ZF_SendBZGXToERP_URL", 0, &url)); + if (url != NULL) + { + std::string response; + string result = sendRequestToErp(url, json_data_str); + writeLog("ZF_SendBZGXToERP\n" + result); + + if (checkErrorMessage(result)) { + writeLog("ZF_SendBZGXToERPɹ!"); + } + else { + string showMessage = "ZF_SendBZGXToERPʧܣ\n" + result; + EMH_store_error_s1(EMH_severity_error, ITK_err, (showMessage).c_str()); + //return -1; + } + } + if (url != NULL) { MEM_free(url); }; + } + } + } + else { + EMH_store_error_s1(EMH_severity_error, EMH_USER_error_base, "̲-option쳣ã"); + writeLog("̲-option쳣ã"); + } + } + //if (preferenceName != NULL) { MEM_free(preferenceName); }; + if (referList != NULL) { MEM_free(referList); }; + if (jsonTemplateUID != NULL) { MEM_free(jsonTemplateUID); }; + if (attachmentType != NULL) { MEM_free(attachmentType); }; + if (attachmentTags != NULL) { MEM_free(attachmentTags); }; + return ifail; +} + diff --git a/zf_itk_c/ZF_SendGYLXToERP.cpp b/zf_itk_c/ZF_SendGYLXToERP.cpp new file mode 100644 index 0000000..fbb6258 --- /dev/null +++ b/zf_itk_c/ZF_SendGYLXToERP.cpp @@ -0,0 +1,740 @@ +#include "ZF_SendPart.h" + +namespace SendGYLX { + + struct Host { + std::string prod; + std::string ip; + std::string lang; + std::string acct; + std::string timestamp; + }; + + struct Service { + std::string prod; + std::string name; + std::string ip; + std::string id; + }; + + struct DataKey { + std::string EntId; + std::string CompanyId; + }; + + struct ProcessItem { + std::string ecbb003; // + std::string ecbb004; // 豸 + std::string ecbb005; // ˳ + std::string ecbb025; // ׼ʱ + std::string ecbb013; // ʼ + std::string ecbb012; // + std::string ecbb017; // + std::string ecbastus; // ״̬ + }; + + struct ProductionParameter { + std::string ecba001; // + std::string ecba002; // ƻ + std::string ecba003; // + std::vector data; // + }; + + struct StdData { + ProductionParameter parameter; + }; + + struct Payload { + StdData std_data; + }; + + + struct Root { + std::string key; // Կ + std::string type; // ͬ + Host host; // Դϵͳ + Service service; // Ŀ + DataKey datakey; // + Payload payload; // ҵ + }; + + // л/л + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Host, prod, ip, lang, acct, timestamp) + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Service, prod, name, ip, id) + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(DataKey, EntId, CompanyId) + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(ProcessItem, ecbb003, ecbb004, ecbb005, ecbb025, ecbb013, ecbb012, ecbb017, ecbastus) + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(ProductionParameter, ecba001, ecba002, ecba003, data) + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(StdData, parameter) + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Payload, std_data) + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Root, key, type, host, service, datakey, payload) + + + // ļȡ + Root parseJson(const std::string& file_path) { + try { + // ļ + std::ifstream file_stream(file_path); + if (!file_stream.is_open()) { + throw std::runtime_error("ļʧ: " + file_path); + } + + // ȡļ + std::string file_content( + (std::istreambuf_iterator(file_stream)), + std::istreambuf_iterator()); + + // JSON + json j = json::parse(file_content); + return j.get(); + } + catch (const json::exception& e) { + std::cerr << "JSON[" << e.id << "]: " << e.what() << std::endl; + throw; + } + catch (const std::exception& e) { + std::cerr << "ϵͳ쳣: " << e.what() << std::endl; + throw; + } + } + + + // д־Ϣļ writeLog("ǰʱ: "+ std::to_string(totalGs)); + void writeLog(const std::string& message) { + std::ofstream logFile(logFilePath, std::ios_base::app); // ׷ģʽļ + if (logFile.is_open()) { + std::string logEntry = "[" + getCurrentTime() + "] " + message + "\n"; + logFile << logEntry; + logFile.close(); + } + else { + std::cerr << "޷־ļ" << std::endl; + } + } + + std::map parseConfigString(const std::string& configString, tag_t top_line) { + int ifail = ITK_ok; + std::map configMap; + std::stringstream ss(configString); + std::string keyValuePair; + + tag_t attachmentTag = NULLTAG; + tag_t attachTagRev = NULLTAG; + ITKCALL(ifail = AOM_ask_value_tag(top_line, bomAttr_lineItemTag, &attachmentTag)); + ITKCALL(ifail = AOM_ask_value_tag(top_line, bomAttr_lineItemRevTag, &attachTagRev)); + int count = 0; + // relationValues ==> ӦϵµӶ + tag_t* relationValues = NULLTAG; + tag_t form = NULLTAG; + // attachmentTag ==> ǰµĶ + ITKCALL(ifail = AOM_ask_value_tags(attachTagRev, "IMAN_master_form_rev", &count, &relationValues)); + if (count != 0) { + form = relationValues[0]; + } + + int innerCount = 0; + tag_t* children_line; + ITKCALL(ifail = BOM_line_ask_all_child_lines(top_line, &innerCount, &children_line)); + + char* propValue = NULL; + date_t dateValue; + // ʹ÷ֺŷֵָ + while (std::getline(ss, keyValuePair, ';')) { + try { + std::stringstream pairStream(keyValuePair); + std::string key, value; + + // ʹõȺŷֵָ + if (std::getline(pairStream, key, '=') && std::getline(pairStream, value)) { + writeLog("ǰkey ==> " + key); + + std::string obj, prop, lastProp; + // ʹ stringstream getline зָ + std::stringstream ss(value); + if (std::getline(ss, obj, '.') && std::getline(ss, prop, '.')) { + writeLog("obj: " + obj); + writeLog("prop: " + prop); + if (obj == "Item") { + if (!isPropertyExist(attachmentTag, prop.c_str())) { + printf("prop %s \n", prop.c_str()); + configMap[key] = ""; + continue; + } + + if (strcmp(prop.c_str(), "uom_tag") == 0) { + ITKCALL(ifail = AOM_UIF_ask_value(attachmentTag, prop.c_str(), &propValue)); + writeLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + else { + ITKCALL(ifail = AOM_ask_value_string(attachmentTag, prop.c_str(), &propValue)); + writeLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + + } + else if (obj == "Rev") { + if (!isPropertyExist(attachTagRev, prop.c_str())) { + printf("prop %s \n", prop.c_str()); + configMap[key] = ""; + continue; + } + + if (strcmp(prop.c_str(), "creation_date") == 0) { + writeLog("date"); + ITKCALL(ifail = AOM_ask_value_date(attachTagRev, prop.c_str(), &dateValue)); + char createDate[128] = ""; + sprintf_s(createDate, "%04d-%02d-%02d %02d:%02d:%02d", dateValue.year, dateValue.month + 1, dateValue.day, dateValue.hour, dateValue.minute, dateValue.second); + propValue = createDate; + } + else if ((strcmp(prop.c_str(), "zf6_cpxsyb") == 0)) { + writeLog("cpxsyb"); + /*int cpxsybNum = 0; + char** propValues = NULL; + AOM_ask_value_strings(attachTagRev, prop.c_str(), &cpxsybNum, &propValues);*/ + + int tempNum = 0; + char** tempValues = NULL; + std::string tempValue = ""; + ITKCALL(ifail = AOM_UIF_ask_values(attachTagRev, prop.c_str(), &tempNum, &tempValues)); + for (int i = 0; i < tempNum; i++) { + tempValue += tempValues[i]; + tempValue += ";"; + } + writeLog("ǰpropValue ==> " + tempValue); + configMap[key] = tempValue; + DOFREE(tempValues); + } + else { + ITKCALL(ifail = AOM_ask_value_string(attachTagRev, prop.c_str(), &propValue)); + writeLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + } + else if (count != 0 && obj == "Form") { + if (!isPropertyExist(form, prop.c_str())) { + printf("prop %s \n", prop.c_str()); + configMap[key] = ""; + continue; + } + + if (!isPropertyExist(form, prop.c_str())) { + printf("prop %s \n", prop.c_str()); + configMap[key] = ""; + continue; + } + ITKCALL(ifail = AOM_ask_value_string(form, prop.c_str(), &propValue)); + writeLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + else if (obj == "BomLine") { + ITKCALL(ifail = AOM_ask_value_string(top_line, prop.c_str(), &propValue)); + writeLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + else if (obj == "Part") { + // ⴦ecba001=Part.Item.item_id + tag_t relation_type = NULLTAG; + GRM_find_relation_type("ZF6_R_GYLX", &relation_type); + int gx_num = 0; + tag_t* gx_tags = NULL; + ITKCALL(ifail = GRM_list_primary_objects_only(attachTagRev, relation_type, &gx_num, &gx_tags)); + + if (gx_num != 0) { + tag_t partItem = NULLTAG; + ITKCALL(ifail = ITEM_ask_item_of_rev(gx_tags[0], &partItem)); + AOM_ask_value_string(partItem, "item_id", &propValue); + writeLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + else { + writeLog("[ warning : ]ǰ⴦㼶ûйϵ"); + } + DOFREE(gx_tags); + } + else if (obj == "GYLX") { + if (std::getline(ss, lastProp, '.')) { + writeLog("lastProp: " + lastProp); + if (prop == "Item") { + if (key == "ecba002") { + AOM_ask_value_string(attachmentTag, "item_id", &propValue); + writeLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + else if (key == "ecba003") { + std::string finalValue; + AOM_ask_value_string(attachTagRev, "object_name", &propValue); + finalValue = propValue; + ITKCALL(ifail = AOM_UIF_ask_value(attachTagRev, "zf6_zfsyb", &propValue)); + finalValue += propValue; + writeLog("ǰpropValue ==> " + finalValue); + configMap[key] = finalValue; + } + else { + configMap[key] = "GYLX"; + writeLog("ǰpropValueʹĬֵGYLX"); + } + } + else if (prop == "BomLine") { + ITKCALL(ifail = AOM_ask_value_string(top_line, lastProp.c_str(), &propValue)); + writeLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + else { + configMap[key] = "GYLX"; + writeLog("ǰpropValueʹĬֵGYLX"); + } + } + } + else if (obj == "SCX") { + if (std::getline(ss, lastProp, '.')) { + writeLog("lastProp: " + lastProp); + if (prop == "Rev") { + tag_t childRev = NULLTAG; + if (innerCount != 0) { + ITKCALL(ifail = AOM_ask_value_tag(children_line[0], bomAttr_lineItemRevTag, &childRev)); + + if (!isPropertyExist(childRev, lastProp.c_str())) { + printf("prop %s \n", lastProp.c_str()); + configMap[key] = ""; + continue; + } + ITKCALL(ifail = AOM_ask_value_string(childRev, lastProp.c_str(), &propValue)); + writeLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + else { + writeLog("ǰ汾²Bomṹ"); + } + } + else { + configMap[key] = "SCX"; + writeLog("ǰpropValueʹĬֵSCX1"); + } + } + else { + configMap[key] = "SCX"; + writeLog("ǰpropValueʹĬֵSCX2"); + } + } + else { + configMap[key] = value; + writeLog("ǰpropValueʹĬֵ1: " + value); + } + } + else { + writeLog("Value ==> " + std::string(value)); + // ûȷָѡ洢ԭʼֵ + if (value == "TimeStamp") { + std::string time = getCurrentTimestamp17(); + configMap[key] = time; + writeLog("ǰpropValue ==> " + time); + } + else if (value == "BZGXNo") { + ITKCALL(ifail = AOM_ask_value_string(attachTagRev, "object_name", &propValue)); + //ִвѯ + tag_t query; + int n_found = 0; + ITKCALL(ifail = QRY_find2("...", &query)); + tag_t* tags; + char* qry_entries[2] = { "" ,"" }, + * qry_values[2] = { propValue ,"ZF6_BZGX" }; + ITKCALL(ifail = QRY_execute(query, 2, qry_entries, qry_values, &n_found, &tags)); + if (n_found != 0) { + ITKCALL(ifail = AOM_ask_value_string(tags[0], "item_id", &propValue)); + writeLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + else { + writeLog("ͨƲδѯö ==> " + std::string(propValue)); + configMap[key] = ""; + } + DOFREE(tags); + } + else if (value == "MaterialClass") { + if (innerCount != 0) { + writeLog("ǰpropValue ==> A"); + configMap[key] = "A"; + } + else { + writeLog("ǰpropValue ==> M"); + configMap[key] = "M"; + } + DOFREE(children_line); + } + else { + configMap[key] = value; + writeLog("ǰpropValueʹĬֵ2: " + value); + } + } + + + } + } + catch (const std::exception& e) { + writeLog("Error: " + std::string(e.what())); + } + } + + DOFREE(relationValues); + DOFREE(propValue); + DOFREE(children_line); + + return configMap; + } + + Root exportHeadItem(Root data, std::map outerConfigMap) { + + for (const auto& pair : outerConfigMap) { + const std::string& key = pair.first; + const std::string& value = pair.second; + + if (key == "key") { + data.key = value; + } + else if (key == "type") { + data.type = value; + } + else if (key == "prod") { + data.host.prod = value; + } + else if (key == "lang") { + data.host.lang = value; + } + else if (key == "acct") { + data.host.acct = value; + } + else if (key == "timestamp") { + data.host.timestamp = value; + } + else if (key == "prod") { + data.service.prod = value; + } + else if (key == "name") { + data.service.name = value; + } + else if (key == "id") { + data.service.id = value; + } + else if (key == "EntId") { + data.datakey.EntId = value; + } + else if (key == "CompanyId") { + data.datakey.CompanyId = value; + } + else if (key == "ecba001") { + data.payload.std_data.parameter.ecba001 = value; + } + else if (key == "ecba002") { + data.payload.std_data.parameter.ecba002 = value; + } + else if (key == "ecba003") { + data.payload.std_data.parameter.ecba003 = value; + } + } + return data; + } + + std::string writeJsonToString(Root data) { + std::ostringstream oss; + + // ӡ Root + oss << "{\n"; + oss << " \"key\": \"" << data.key << "\",\n"; + oss << " \"type\": \"" << data.type << "\",\n"; + + // ӡ Host + oss << " \"host\": {\n"; + oss << " \"prod\": \"" << data.host.prod << "\",\n"; + oss << " \"ip\": \"" << data.host.ip << "\",\n"; + oss << " \"lang\": \"" << data.host.lang << "\",\n"; + oss << " \"acct\": \"" << data.host.acct << "\",\n"; + oss << " \"timestamp\": \"" << data.host.timestamp << "\"\n"; + oss << " },\n"; + + // ӡ Service + oss << " \"service\": {\n"; + oss << " \"prod\": \"" << data.service.prod << "\",\n"; + oss << " \"name\": \"" << data.service.name << "\",\n"; + oss << " \"ip\": \"" << data.service.ip << "\",\n"; + oss << " \"id\": \"" << data.service.id << "\"\n"; + oss << " },\n"; + + // ӡ DataKey + oss << " \"datakey\": {\n"; + oss << " \"EntId\": \"" << data.datakey.EntId << "\",\n"; + oss << " \"CompanyId\": \"" << data.datakey.CompanyId << "\"\n"; + oss << " },\n"; + + // ӡ Payload StdData + oss << " \"payload\": {\n"; + oss << " \"std_data\": {\n"; + oss << " \"parameter\": {\n"; + oss << " \"ecba001\": \"" << data.payload.std_data.parameter.ecba001 << "\",\n"; + oss << " \"ecba002\": \"" << data.payload.std_data.parameter.ecba002 << "\",\n"; + oss << " \"ecba003\": \"" << data.payload.std_data.parameter.ecba003 << "\",\n"; + oss << " \"data\": [\n"; + + // ӡÿ ProcessItem + for (size_t i = 0; i < data.payload.std_data.parameter.data.size(); ++i) { + const ProcessItem& di = data.payload.std_data.parameter.data[i]; + oss << " {\n"; + oss << " \"ecbb003\": \"" << di.ecbb003 << "\",\n"; + oss << " \"ecbb004\": \"" << di.ecbb004 << "\",\n"; + oss << " \"ecbb005\": \"" << di.ecbb005 << "\",\n"; + oss << " \"ecbb025\": \"" << di.ecbb025 << "\",\n"; + oss << " \"ecbb013\": \"" << di.ecbb013 << "\",\n"; + oss << " \"ecbb012\": \"" << di.ecbb012 << "\",\n"; + oss << " \"ecbb017\": \"" << di.ecbb017 << "\",\n"; + oss << " \"ecbastus\": \"" << di.ecbastus << "\""; + if (i != data.payload.std_data.parameter.data.size() - 1) { + oss << "\n },\n"; + } + else { + oss << "\n }\n"; + } + } + oss << " ]\n"; + oss << " }\n"; + oss << " }\n"; + oss << " }\n"; + oss << "}\n"; + + return oss.str(); + } + + ProcessItem exportDateItem(std::map innerConfigMap) { + ProcessItem& dataItem = ProcessItem(); + + for (const auto& pair : innerConfigMap) { + const std::string& key = pair.first; + const std::string& value = pair.second; + + if (key == "ecbb003") { + dataItem.ecbb003 = value; + } + else if (key == "ecbb004") { + dataItem.ecbb004 = value; + } + else if (key == "ecbb005") { + dataItem.ecbb005 = value; + } + else if (key == "ecbb025") { + dataItem.ecbb025 = value; + } + else if (key == "ecbb013") { + dataItem.ecbb013 = value; + } + else if (key == "ecbb012") { + dataItem.ecbb012 = value; + } + else if (key == "ecbb017") { + dataItem.ecbb017 = value; + } + else if (key == "ecbastus") { + dataItem.ecbastus = value; + } + } + return dataItem; + } +} + +using namespace SendGYLX; + + +int ZF_SendGYLXToERP(EPM_action_message_t msg) { + // ȡ־ļĿ¼· + // ȡ־ļĿ¼· + logFilePath = getLogFilePath("ZF_SendGYLXToERP_"); + + writeLog("=========================·ͬ Start==================="); + int ifail = ITK_ok; + char* url = NULL, * templateUid = NULL; + ITKCALL(PREF_ask_char_value("ZF_SendGYLXToERP_URL", 0, &url)); + writeLog("url : " + std::string(url)); + ITKCALL(PREF_ask_char_value("ZF_SendGYLXToERP_Template", 0, &templateUid)); + char* argName = NULL, * argValue = NULL, * arg = NULL; + char objTypes[1024] = ""; + bool isExistRev = false; + int arg_cnt = TC_number_of_arguments(msg.arguments); + writeLog("Ϊ" + std::to_string(arg_cnt)); + if (arg_cnt > 0) + { + for (int i = 0; i < arg_cnt; i++) + { + arg = TC_next_argument(msg.arguments); + ITKCALL(ifail = ITK_ask_argument_named_value((const char*)arg, &argName, &argValue)); + if (strcmp(argName, "type") == 0) + { + if (argValue != NULL) + { + strcpy(objTypes, argValue); + } + } + } + } + MEM_free(argName); + MEM_free(argValue); + std::vector typeVector; + getVector(objTypes, typeVector, ';'); + + tag_t attachmentTag = NULLTAG; + int attachmentCount = 0; + tag_t rootTask = NULLTAG, * attachmentTags = NULLTAG; + ITKCALL(ifail = EPM_ask_root_task(msg.task, &rootTask)); + ITKCALL(ifail = EPM_ask_attachments(rootTask, EPM_target_attachment, &attachmentCount, &attachmentTags)); + + // ȡѡ + tag_t templateDataSet = NULLTAG; + char* fileName = NULL; + ITK__convert_uid_to_tag(templateUid, &templateDataSet); + + ITKCALL(ifail = AOM_ask_value_string(templateDataSet, "object_name", &fileName)); + + int n_found = 0; + tag_t* ref_object = NULLTAG; + const char* ref_name = "Text"; + //AE_reference_type_t reference_type; + ITKCALL(AE_ask_dataset_named_refs(templateDataSet, &n_found, &ref_object)); + //ITKCALL(ifail = AE_ask_dataset_named_ref2(templateDataSet, ref_name, &reference_type, &ref_object)); + + // ʹ std::string ַƴ + std::string tempPath = getenv("TEMP"); + std::string fullPath = tempPath + "\\" + fileName; + removeFile(fullPath); + // ļ· + if (IMF_export_file(ref_object[0], fullPath.c_str()) != 0) { + writeLog("ļʧܣ·: " + fullPath); + EMH_store_error_s1(EMH_severity_error, ITK_err, "ļʧ"); + return 1; + } + else { + writeLog("ļѳɹ: " + fullPath); + } + + char** erpConfig; + int configNum; + ITKCALL(ifail = PREF_ask_char_values("ZF_SendGYLXToERP_Config", &configNum, &erpConfig)); + + + writeLog("ʼjson"); + Root data = parseJson(fullPath); + std::vector dataItems; + // erpConfig ַ + std::map outerConfigMap; + std::map innerConfigMap; + + tag_t processUser = NULLTAG; + char* processUserName = NULL; + ITKCALL(AOM_ask_value_tag(rootTask, "owning_user", &processUser)); + ITKCALL(AOM_ask_value_string(processUser, "user_id", &processUserName)); + + //еĿµĶ + char* itemType = NULL; + tag_t* children_line; + writeLog(std::to_string(attachmentCount)); + for (int i = 0; i < attachmentCount; i++) { + attachmentTag = attachmentTags[i]; + if (!isTypeOf(attachmentTag, "ItemRevision")) { + continue; + } + + ITKCALL(ifail = AOM_ask_value_string(attachmentTag, "object_type", &itemType)); + if (inArrays(typeVector, itemType)) { + tag_t windowTag = NULLTAG, + topLineTag = NULLTAG; + tag_t itemTag = NULLTAG; + ITKCALL(ifail = ITEM_ask_item_of_rev(attachmentTag, &itemTag);); + //Window + ITKCALL(ifail = BOM_create_window(&windowTag)); + //öBOMline + // itemTag==> revisionTag==>汾 topLineTog==>BOM + ITKCALL(ifail = BOM_set_window_top_line(windowTag, itemTag, attachmentTag, NULLTAG, &topLineTag)); + + int innerCount = 0; + //tag_t childRev = NULLTAG; + ITKCALL(ifail = BOM_line_ask_all_child_lines(topLineTag, &innerCount, &children_line)); + + writeLog("ǰ" + innerCount); + if (innerCount == 0) { + writeLog("ǰ·û"); + EMH_store_error_s1(EMH_severity_error, ITK_err, "·ûй򣬲"); + return -1; + } + + writeLog("ErpConfig[0]: " + string(erpConfig[0])); + outerConfigMap = parseConfigString(erpConfig[0], topLineTag); + for (i = 0; i < innerCount; i++) { + //ITKCALL(AOM_ask_value_tag(children_line[i], bomAttr_lineItemRevTag, &childRev)); + writeLog("ErpConfig[1]: " + string(erpConfig[1])); + innerConfigMap = parseConfigString(erpConfig[1], children_line[i]); + + ProcessItem item = exportDateItem(innerConfigMap); + dataItems.push_back(item); + } + } + else { + continue; + } + + try { + if (string(erpConfig[0]).find("OwningUser") != std::string::npos) { + data.host.acct = processUserName; + } + data.payload.std_data.parameter.data = dataItems; + + // innerConfigMap ProcessItem + data = exportHeadItem(data, outerConfigMap); + + writeLog("ʼƴjson ==>"); + std::string jsonStr = writeJsonToString(data); + writeLog(jsonStr); + writeLog("jsonƴӳɹ <=="); + + writeLog("ʼȡjsonļ"); + + // POST + writeLog("ʼPost"); + string jsonFileName = generate_uuid_v4(); + std::string jsonFilePath = tempPath + "\\" + jsonFileName + ".txt"; + writeJsonToFile(jsonFilePath, jsonStr); + writeLog("jsonļѱ浽: " + jsonFilePath); + + string cmd = "java -jar %ZF_ROOT%\\bin\\SendERP.jar " + std::string(url) + " " + jsonFilePath; + + string result; + char buf[8000] = { 0 }; + //logf("popen"); + FILE* pf = _popen(cmd.c_str(), "r"); + while (fgets(buf, sizeof buf, pf)) { + result.append(buf); + } + _pclose(pf); + + writeLog("result:" + result); + + if (result.length() > 1) { + EMH_store_error_s1(EMH_severity_error, ITK_err, result.c_str()); + return -1; + } + else { + writeLog("ͳɹ"); + } + } + catch (const json::exception& e) { + writeLog("JSONл: " + std::string(e.what())); + return -1; + } + catch (const std::exception& e) { + writeLog("׼쳣: " + std::string(e.what())); + return -1; + } + } + DOFREE(attachmentTags); + DOFREE(url); + DOFREE(templateUid); + DOFREE(fileName); + DOFREE(ref_object); + DOFREE(itemType); + + return ifail; +} \ No newline at end of file diff --git a/zf_itk_c/ZF_SendPart.cpp b/zf_itk_c/ZF_SendPart.cpp new file mode 100644 index 0000000..4dc6116 --- /dev/null +++ b/zf_itk_c/ZF_SendPart.cpp @@ -0,0 +1,181 @@ +#include "ZF_SendPart.h" + + + + +// صӦ +size_t write_callback(char* ptr, size_t size, size_t nmemb, std::string* data) { + data->append(ptr, size * nmemb); + return size * nmemb; +} + +// POST +bool send_post_request(const std::string& url, const std::string& json_data, std::string& response) { + CURL* curl = curl_easy_init(); + if (!curl) return false; + + // ѡ + curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); + curl_easy_setopt(curl, CURLOPT_POST, 1L); + curl_easy_setopt(curl, CURLOPT_POSTFIELDS, json_data.c_str()); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response); + + // HTTP ͷ + struct curl_slist* headers = nullptr; + headers = curl_slist_append(headers, "Content-Type: application/json"); + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); + + // ִ + CURLcode res = curl_easy_perform(curl); + + // Դ + curl_slist_free_all(headers); + curl_easy_cleanup(curl); + + return (res == CURLE_OK); +} + +bool inArrays(const std::vector& vec, const std::string& value) { + for (const auto& item : vec) { + if (item == value) { + return true; + } + } + return false; +} + +void getVector(const char* value, std::vector& targetVector, char delimiter) { + std::string strValue(value); + std::stringstream ss(strValue); + std::string item; + + // ָķַָָ + if (std::getline(ss, item, delimiter)) { + // ܳɹָָʣಿ + targetVector.push_back(item); + while (std::getline(ss, item, delimiter)) { + targetVector.push_back(item); + } + } + else { + // ָܷַӵvector + targetVector.push_back(strValue); + } +} + +// ȡǰʱַʾ +std::string getCurrentTime() { + std::time_t now = std::time(nullptr); + std::tm* now_tm = std::localtime(&now); + char buffer[20]; + std::strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", now_tm); + return std::string(buffer); +} + +std::string getCurrentTimestamp17() { + // ȡǰʱʱ + auto now = std::chrono::system_clock::now(); + + // ʱתΪʱ뼶 + auto seconds = std::chrono::duration_cast(now.time_since_epoch()).count(); + + // ȡ뼶 + auto milliseconds = std::chrono::duration_cast(now.time_since_epoch()).count() % 1000; + + // ʱתΪ std::time_t + std::time_t now_time_t = std::chrono::system_clock::to_time_t(now); + + // std::time_t תΪ std::tm ṹ + std::tm now_tm = *std::localtime(&now_time_t); + + // һַʽʱ + std::ostringstream oss; + + // ʽʱ + oss << std::put_time(&now_tm, "%Y%m%d%H%M%S") + // Ӻ벿 + << std::setw(3) << std::setfill('0') << milliseconds; + + return oss.str(); +} + +void removeFile(string path) { + fs::path filePath(path); + if (fs::exists(filePath)) { + fs::remove(filePath); + std::cout << "ļɾ: " << filePath << std::endl; + } + else { + std::cout << "ļ: " << filePath << std::endl; + } +} + +// ȡ־ļ· +std::string getLogFilePath(const std::string& name) { + std::string tempPath = getenv("TEMP"); + std::string logFolder = tempPath + "\\ERPLog"; + std::string timestamp = getCurrentTimestamp17(); + std::string logFileName = name + timestamp + ".txt"; + std::string logFilePath = logFolder + "\\" + logFileName; + + // ȷļдڣ򴴽 + if (!fs::exists(logFolder)) { + fs::create_directories(logFolder); + } + + return logFilePath; +} + +std::string generate_uuid_v4() { + static std::random_device rd; + static std::mt19937 gen(rd()); + static std::uniform_int_distribution<> dis(0, 15); + static std::uniform_int_distribution<> dis2(8, 11); + + std::stringstream ss; + int i; + ss << std::hex; + for (i = 0; i < 10; i++) { + ss << dis(gen); + } + return ss.str(); +} + +// ʵ +void writeJsonToFile(const std::string& jsonFilePath, const std::string& jsonStr) { + std::ofstream outFile(jsonFilePath, std::ios::out | std::ios::trunc); // ʹ ios::trunc ļ + if (outFile.is_open()) { + outFile << jsonStr; + outFile.close(); + std::cout << "ļдɹ: " << jsonFilePath << std::endl; + } + else { + std::cerr << "޷ļ: " << jsonFilePath << std::endl; + } +} + +int isPropertyExist(tag_t object_tag, const char* target_prop_name) { + int ifail = ITK_ok; + int prop_count = 0; + char** prop_names = NULL; + + // ȡ + ifail = AOM_ask_prop_names(object_tag, &prop_count, &prop_names); + if (ifail != ITK_ok || prop_count == 0) { + return 0; // Բڻȡʧ + } + + // бĿ + int exists = 0; + for (int i = 0; i < prop_count; i++) { + if (strcmp(prop_names[i], target_prop_name) == 0) { + exists = 1; + break; + } + } + + // ͷڴ + MEM_free(prop_names); + return exists; +} diff --git a/zf_itk_c/ZF_SendPart.h b/zf_itk_c/ZF_SendPart.h new file mode 100644 index 0000000..847c50c --- /dev/null +++ b/zf_itk_c/ZF_SendPart.h @@ -0,0 +1,94 @@ +#pragma once +#include "kutil.h" +#define debug true +#define ITK_err 919012 +#define TC_SEND_ERP_URL "TC_SEND_ERP_URL" +#include +#include +#include +#include +#include +#include +#define debug true +#define ITK_err 919012 +#include +#include +#include +#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING +#include +namespace fs = std::experimental::filesystem; +#include +#include +#include +#include +#include +#include +#include +using json = nlohmann::json; +static string logFilePath; + +struct ResponseData { + std::string imaa001; + std::string fields; + std::string notes; +}; + +struct Execution { + std::string code; + std::string sql_code; + std::string description; +}; + +// ׼ݽṹ +struct ResponseStdData { + Execution execution; + std::vector data; // ݼ +}; + +// ṹ +struct ResponsePayload { + ResponseStdData std_data; +}; + +// Ӧ +struct ResponseResult { + std::string srvver; + std::string srvcode; + json datakey; // ɿֶ + ResponsePayload payload; +}; + +// л/л +NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(ResponseData, imaa001, fields, notes) +NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Execution, code, sql_code, description) +NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(ResponseStdData, execution, data) +NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(ResponsePayload, std_data) +NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(ResponseResult, srvver, srvcode, datakey, payload) + + +#ifdef __cplusplus +extern "C" { +#endif + +#define DOFREE(obj) \ +{ \ + if(obj) \ + { \ + MEM_free(obj); \ + obj = NULL; \ + } \ +} + size_t write_callback(char* ptr, size_t size, size_t nmemb, std::string* data); + bool send_post_request(const std::string& url, const std::string& json_data, std::string& response); + bool inArrays(const std::vector& vec, const std::string& value); + void getVector(const char* value, std::vector& targetVector, char delimiter); + std::string getCurrentTime(); + std::string getCurrentTimestamp17(); + void removeFile(string path); + std::string getLogFilePath(const std::string& name); + std::string generate_uuid_v4(); + void writeJsonToFile(const std::string& jsonFilePath, const std::string& jsonStr); + int isPropertyExist(tag_t object_tag, const char* target_prop_name); +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/zf_itk_c/ZF_SendPartBOMToERP.cpp b/zf_itk_c/ZF_SendPartBOMToERP.cpp new file mode 100644 index 0000000..e047ee9 --- /dev/null +++ b/zf_itk_c/ZF_SendPartBOMToERP.cpp @@ -0,0 +1,638 @@ +#include "ZF_SendPart.h" + +namespace sendBomPart { + std::string fullPath; + char** erpConfig; + char* processUserName; + char* url = NULL; + + // Ƕ׽ṹ嶨 + struct Host { + std::string prod; + std::string ip; + std::string lang; + std::string acct; + std::string timestamp; + }; + + struct Service { + std::string prod; + std::string name; + std::string ip; + std::string id; + }; + + struct DataKey { + std::string EntId; + std::string CompanyId; + }; + + struct DataItem { + std::string bmba003; + std::string bmba011; + std::string bmba012; + std::string bmba010; + std::string bmaacrtdt; + std::string acct; + std::string bmaastus; + }; + + struct Parameter { + std::string bmba001; + std::vector data; + }; + + struct StdData { + Parameter parameter; + }; + + struct Payload { + StdData std_data; + }; + + // ṹ + struct Root { + std::string key; + std::string type; + Host host; + Service service; + DataKey datakey; + Payload payload; + }; + + // л/л + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Host, prod, ip, lang, acct, timestamp) + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Service, prod, name, ip, id) + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(DataKey, EntId, CompanyId) + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(DataItem, bmba003, bmba011, bmba012, bmba010, bmaacrtdt, acct, bmaastus) + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Parameter, bmba001, data) + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(StdData, parameter) + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Payload, std_data) + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Root, key, type, host, service, datakey, payload) + + std::string tempPath; + + + // ļȡ + Root parseBomJson(const std::string& file_path) { + try { + // ļ + std::ifstream file_stream(file_path); + if (!file_stream.is_open()) { + throw std::runtime_error("ļʧ: " + file_path); + } + + // ȡļ + std::string file_content( + (std::istreambuf_iterator(file_stream)), + std::istreambuf_iterator()); + + // JSON + json j = json::parse(file_content); + return j.get(); + } + catch (const json::exception& e) { + std::cerr << "JSON[" << e.id << "]: " << e.what() << std::endl; + throw; + } + catch (const std::exception& e) { + std::cerr << "ϵͳ쳣: " << e.what() << std::endl; + throw; + } + } + + + // д־Ϣļ writeBomLog("ǰʱ: "+ std::to_string(totalGs)); + void writeBomLog(const std::string& message) { + std::ofstream logFile(logFilePath, std::ios_base::app); // ׷ģʽļ + if (logFile.is_open()) { + std::string logEntry = "[" + getCurrentTime() + "] " + message + "\n"; + logFile << logEntry; + logFile.close(); + } + else { + std::cerr << "޷־ļ" << std::endl; + } + } + + std::map parseBomConfigString(const std::string& configString, tag_t top_line) { + int ifail = ITK_ok; + std::map configMap; + std::stringstream ss(configString); + std::string keyValuePair; + + tag_t attachmentTag = NULLTAG; + tag_t attachTagRev = NULLTAG; + ITKCALL(ifail = AOM_ask_value_tag(top_line, bomAttr_lineItemTag, &attachmentTag)); + ITKCALL(ifail = AOM_ask_value_tag(top_line, bomAttr_lineItemRevTag, &attachTagRev)); + int count = 0; + // relationValues ==> ӦϵµӶ + tag_t* relationValues = NULLTAG; + tag_t form = NULLTAG; + // attachmentTag ==> ǰµĶ + ITKCALL(ifail = AOM_ask_value_tags(attachTagRev, "IMAN_master_form_rev", &count, &relationValues)); + if (count != 0) { + form = relationValues[0]; + } + + + char* propValue = NULL; + date_t dateValue; + // ʹ÷ֺŷֵָ + while (std::getline(ss, keyValuePair, ';')) { + try { + std::stringstream pairStream(keyValuePair); + std::string key, value; + + // ʹõȺŷֵָ + if (std::getline(pairStream, key, '=') && std::getline(pairStream, value)) { + writeBomLog("ǰkey ==> " + key); + //configMap[key] = value; + + std::string obj, prop; + // ʹ stringstream getline зָ + std::stringstream ss(value); + if (std::getline(ss, obj, '.') && std::getline(ss, prop, '.')) { + writeBomLog("obj: " + obj); + writeBomLog("prop: " + prop); + if (obj == "Item") { + if (!isPropertyExist(attachmentTag, prop.c_str())) { + printf("prop %s \n", prop.c_str()); + configMap[key] = ""; + continue; + } + + if (strcmp(prop.c_str(), "uom_tag") == 0) { + ITKCALL(ifail = AOM_UIF_ask_value(attachmentTag, prop.c_str(), &propValue)); + writeBomLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + else { + ITKCALL(ifail = AOM_ask_value_string(attachmentTag, prop.c_str(), &propValue)); + writeBomLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + + } + else if (obj == "Rev") { + if (!isPropertyExist(attachTagRev, prop.c_str())) { + printf("prop %s \n", prop.c_str()); + configMap[key] = ""; + continue; + } + + if (strcmp(prop.c_str(), "creation_date") == 0) { + writeBomLog("date"); + ITKCALL(ifail = AOM_ask_value_date(attachTagRev, prop.c_str(), &dateValue)); + char createDate[128] = ""; + sprintf_s(createDate, "%04d-%02d-%02d %02d:%02d:%02d", dateValue.year, dateValue.month + 1, dateValue.day, dateValue.hour, dateValue.minute, dateValue.second); + propValue = createDate; + } + else if ((strcmp(prop.c_str(), "zf6_cpxsyb") == 0)) { + writeBomLog("cpxsyb"); + /*int cpxsybNum = 0; + char** propValues = NULL; + AOM_ask_value_strings(attachTagRev, prop.c_str(), &cpxsybNum, &propValues);*/ + + int tempNum = 0; + char** tempValues = NULL; + ITKCALL(ifail = AOM_UIF_ask_values(attachTagRev, prop.c_str(), &tempNum, &tempValues)); + std::string tempValue = ""; + ITKCALL(ifail = AOM_UIF_ask_values(attachTagRev, prop.c_str(), &tempNum, &tempValues)); + for (int i = 0; i < tempNum; i++) { + tempValue += tempValues[i]; + tempValue += ";"; + } + writeBomLog("ǰpropValue ==> " + tempValue); + configMap[key] = tempValue; + } + else { + ITKCALL(ifail = AOM_ask_value_string(attachTagRev, prop.c_str(), &propValue)); + writeBomLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + } + else if (count != 0 && obj == "Form") { + if (!isPropertyExist(form, prop.c_str())) { + printf("prop %s \n", prop.c_str()); + configMap[key] = ""; + continue; + } + + ITKCALL(ifail = AOM_ask_value_string(form, prop.c_str(), &propValue)); + writeBomLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + else if (obj == "BomLine") { + if (strcmp(prop.c_str(), "bl_quantity") == 0) { + ITKCALL(ifail = AOM_ask_value_string(top_line, prop.c_str(), &propValue)); + writeBomLog("ǰpropValue ==> " + std::string(propValue)); + if (propValue == NULL || std::strlen(propValue) == 0) { + propValue = "1"; + } + configMap[key] = propValue; + } + else { + ITKCALL(ifail = AOM_ask_value_string(top_line, prop.c_str(), &propValue)); + writeBomLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + + } + else { + configMap[key] = value; + writeBomLog("ǰpropValueʹĬֵ1: " + value); + } + } + else { + writeBomLog("Value ==> " + std::string(value)); + // ûȷָѡ洢ԭʼֵ + if (value == "TimeStamp") { + std::string time = getCurrentTimestamp17(); + configMap[key] = time; + writeBomLog("ǰpropValue ==> " + time); + } + /* else if (value == "OwningUser") { + int userNum = 0; + tag_t* owners = NULLTAG; + ITKCALL(ifail = AOM_ask_value_tags(attachTagRev, "owning_user", &userNum, &owners)); + if (userNum != 0) { + + AOM_ask_value_string(owners[0], "user_name", &propValue); + } + writeBomLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + DOFREE(owners); + }*/ + else if (value == "MaterialClass") { + //ȡ + int count = 0; + tag_t* children_line; + ITKCALL(BOM_line_ask_all_child_lines(top_line, &count, &children_line)); + + if (count != 0) { + writeBomLog("ǰpropValue ==> A"); + configMap[key] = "A"; + } + else { + writeBomLog("ǰpropValue ==> M"); + configMap[key] = "M"; + } + } + else { + configMap[key] = value; + writeBomLog("ǰpropValueʹĬֵ2: " + value); + } + } + } + } + catch (const std::exception& e) { + writeBomLog("Error: " + std::string(e.what())); + } + } + return configMap; + } + + Root exportHeadItem(Root data, std::map outerConfigMap) { + + for (const auto& pair : outerConfigMap) { + const std::string& key = pair.first; + const std::string& value = pair.second; + + if (key == "key") { + data.key = value; + } + else if (key == "type") { + data.type = value; + } + else if (key == "prod") { + data.host.prod = value; + } + else if (key == "lang") { + data.host.lang = value; + } + else if (key == "acct") { + data.host.acct = value; + } + else if (key == "timestamp") { + data.host.timestamp = value; + } + else if (key == "prod") { + data.service.prod = value; + } + else if (key == "name") { + data.service.name = value; + } + else if (key == "id") { + data.service.id = value; + } + else if (key == "EntId") { + data.datakey.EntId = value; + } + else if (key == "CompanyId") { + data.datakey.CompanyId = value; + } + else if (key == "bmba001") { + data.payload.std_data.parameter.bmba001 = value; + } + } + return data; + } + + std::string writeBomJsonToString(Root data) { + std::ostringstream oss; + + // ӡ Root + oss << "{\n"; + oss << " \"key\": \"" << data.key << "\",\n"; + oss << " \"type\": \"" << data.type << "\",\n"; + + // ӡ Host + oss << " \"host\": {\n"; + oss << " \"prod\": \"" << data.host.prod << "\",\n"; + oss << " \"ip\": \"" << data.host.ip << "\",\n"; + oss << " \"lang\": \"" << data.host.lang << "\",\n"; + oss << " \"acct\": \"" << data.host.acct << "\",\n"; + oss << " \"timestamp\": \"" << data.host.timestamp << "\"\n"; + oss << " },\n"; + + // ӡ Service + oss << " \"service\": {\n"; + oss << " \"prod\": \"" << data.service.prod << "\",\n"; + oss << " \"name\": \"" << data.service.name << "\",\n"; + oss << " \"ip\": \"" << data.service.ip << "\",\n"; + oss << " \"id\": \"" << data.service.id << "\"\n"; + oss << " },\n"; + + // ӡ DataKey + oss << " \"datakey\": {\n"; + oss << " \"EntId\": \"" << data.datakey.EntId << "\",\n"; + oss << " \"CompanyId\": \"" << data.datakey.CompanyId << "\"\n"; + oss << " },\n"; + + // ӡ Payload StdData + oss << " \"payload\": {\n"; + oss << " \"std_data\": {\n"; + oss << " \"parameter\": {\n"; + oss << " \"bmba001\": \"" << data.payload.std_data.parameter.bmba001 << "\",\n"; + oss << " \"data\": [\n"; + + // ӡÿ DataItem + for (size_t i = 0; i < data.payload.std_data.parameter.data.size(); ++i) { + const DataItem& di = data.payload.std_data.parameter.data[i]; + oss << " {\n"; + oss << " \"bmba003\": \"" << di.bmba003 << "\",\n"; + oss << " \"bmba011\": \"" << di.bmba011 << "\",\n"; + oss << " \"bmba012\": \"" << di.bmba012 << "\",\n"; + oss << " \"bmba010\": \"" << di.bmba010 << "\",\n"; + oss << " \"bmaacrtdt\": \"" << di.bmaacrtdt << "\",\n"; + oss << " \"acct\": \"" << di.acct << "\",\n"; + oss << " \"bmaastus\": \"" << di.bmaastus << "\""; + if (i != data.payload.std_data.parameter.data.size() - 1) { + oss << "\n },\n"; + } + else { + oss << "\n }\n"; + } + } + oss << " ]\n"; + oss << " }\n"; + oss << " }\n"; + oss << " }\n"; + oss << "}\n"; + + return oss.str(); + } + + + DataItem exportDateItem(std::map innerConfigMap) { + DataItem& dataItem = DataItem(); + + for (const auto& pair : innerConfigMap) { + const std::string& key = pair.first; + const std::string& value = pair.second; + + if (key == "bmba003") { + dataItem.bmba003 = value; + } + else if (key == "bmba011") { + dataItem.bmba011 = value; + } + else if (key == "bmba012") { + dataItem.bmba012 = value; + } + else if (key == "bmba010") { + dataItem.bmba010 = value; + } + else if (key == "bmaacrtdt") { + dataItem.bmaacrtdt = value; + } + else if (key == "acct") { + dataItem.acct = value; + } + else if (key == "bmaastus") { + dataItem.bmaastus = value; + } + } + return dataItem; + } + + int recursionBOM(tag_t top_line) { + int count = 0; + tag_t* children_line; + tag_t itemRevision = NULLTAG; + ITKCALL(BOM_line_ask_all_child_lines(top_line, &count, &children_line)); + if (count > 0) { + ITKCALL(AOM_ask_value_tag(top_line, bomAttr_lineItemRevTag, &itemRevision)); + + writeBomLog("ʼjson"); + Root data = parseBomJson(fullPath); + std::vector dataItems; + // erpConfig ַ + std::map outerConfigMap; + + std::map innerConfigMap; + writeBomLog("ErpConfig[0]: " + string(erpConfig[0])); + outerConfigMap = parseBomConfigString(erpConfig[0], top_line); + + //tag_t tempRev = NULLTAG; + for (int i = 0; i < count; i++) { + //ITKCALL(AOM_ask_value_tag(children_line[i], bomAttr_lineItemRevTag, &tempRev)); + writeBomLog("ErpConfig[1]: " + string(erpConfig[1])); + innerConfigMap = parseBomConfigString(erpConfig[1], children_line[i]); + DataItem item = exportDateItem(innerConfigMap); + dataItems.push_back(item); + } + + try { + if (string(erpConfig[0]).find("OwningUser") != std::string::npos) { + data.host.acct = processUserName; + } + data.payload.std_data.parameter.data = dataItems; + + // innerConfigMap DataItem + data = exportHeadItem(data, outerConfigMap); + + writeBomLog("ʼƴjson ==>"); + std::string jsonStr = writeBomJsonToString(data); + writeBomLog(jsonStr); + writeBomLog("jsonƴӳɹ <=="); + + writeBomLog("ʼȡjsonļ"); + + // POST + writeBomLog("ʼPost"); + string jsonFileName = generate_uuid_v4(); + std::string jsonFilePath = tempPath + "\\" + jsonFileName + ".txt"; + writeJsonToFile(jsonFilePath, jsonStr); + writeBomLog("jsonļѱ浽: " + jsonFilePath); + + string cmd = "java -jar %ZF_ROOT%\\bin\\SendERP.jar " + std::string(url) + " " + jsonFilePath; + + string result; + char buf[8000] = { 0 }; + //logf("popen"); + FILE* pf = _popen(cmd.c_str(), "r"); + while (fgets(buf, sizeof buf, pf)) { + result.append(buf); + } + _pclose(pf); + writeBomLog("result:" + result); + // Ƿ "code": "0", + if (result.length() > 0) { + EMH_store_error_s1(EMH_severity_error, ITK_err, result.c_str()); + return -1; + } + else { + writeBomLog("ͳɹ"); + return 0; + } + } + catch (const json::exception& e) { + writeBomLog("JSONл: " + std::string(e.what())); + return -1; + } + catch (const std::exception& e) { + writeBomLog("׼쳣: " + std::string(e.what())); + return -1; + } + + for (int i = 0; i < count; i++) { + int ifail = recursionBOM(children_line[i]); + if (ifail != 0) { + return -1; + } + } + } + return 0; + } + +} + +using namespace sendBomPart; + + +int ZF_SendPartBOMToERP(EPM_action_message_t msg) { + // ȡ־ļĿ¼· + // ȡ־ļĿ¼· + logFilePath = getLogFilePath("ZF_SendPartBOMToERP_"); + + writeBomLog("=========================BOMͬ Start==================="); + int ifail = ITK_ok; + char* templateUid = NULL; + ITKCALL(PREF_ask_char_value("ZF_SendPartBOMToERP_URL", 0, &url)); + writeBomLog("url : " + std::string(url)); + ITKCALL(PREF_ask_char_value("ZF_SendPartBOMToERP_Template", 0, &templateUid)); + char* argName = NULL, * argValue = NULL, * arg = NULL; + char objTypes[1024] = ""; + bool isExistRev = false; + int arg_cnt = TC_number_of_arguments(msg.arguments); + writeBomLog("Ϊ" + std::to_string(arg_cnt)); + if (arg_cnt > 0) + { + for (int i = 0; i < arg_cnt; i++) + { + arg = TC_next_argument(msg.arguments); + ITKCALL(ifail = ITK_ask_argument_named_value((const char*)arg, &argName, &argValue)); + if (strcmp(argName, "type") == 0) + { + if (argValue != NULL) + { + strcpy(objTypes, argValue); + } + } + } + } + MEM_free(argName); + MEM_free(argValue); + std::vector typeVector; + getVector(objTypes, typeVector, ';'); + + tag_t attachmentTag = NULLTAG; + int attachmentCount = 0; + tag_t rootTask = NULLTAG, * attachmentTags = NULLTAG; + ITKCALL(ifail = EPM_ask_root_task(msg.task, &rootTask)); + ITKCALL(ifail = EPM_ask_attachments(rootTask, EPM_target_attachment, &attachmentCount, &attachmentTags)); + + // ȡѡ + tag_t templateDataSet = NULLTAG; + char* fileName = NULL; + ITK__convert_uid_to_tag(templateUid, &templateDataSet); + + ITKCALL(AOM_ask_value_string(templateDataSet, "object_name", &fileName)); + + int n_found = 0; + tag_t* ref_object = NULLTAG; + const char* ref_name = "Text"; + //AE_reference_type_t reference_type; + ITKCALL(AE_ask_dataset_named_refs(templateDataSet, &n_found, &ref_object)); + //ITKCALL(ifail = AE_ask_dataset_named_ref2(templateDataSet, ref_name, &reference_type, &ref_object)); + + // ʹ std::string ַƴ + tempPath = getenv("TEMP"); + fullPath = tempPath + "\\" + fileName; + removeFile(fullPath); + // ļ· + if (IMF_export_file(ref_object[0], fullPath.c_str()) != 0) { + writeBomLog("ļʧܣ·: " + fullPath); + EMH_store_error_s1(EMH_severity_error, ITK_err, "ļʧ"); + return 1; + } + else { + writeBomLog("ļѳɹ: " + fullPath); + } + + int configNum; + ITKCALL(PREF_ask_char_values("ZF_SendPartBOMToERP_Config", &configNum, &erpConfig)); + + tag_t processUser = NULLTAG; + ITKCALL(AOM_ask_value_tag(rootTask, "owning_user", &processUser)); + ITKCALL(AOM_ask_value_string(processUser, "user_id", &processUserName)); + + //еĿµĶ + char* itemType = NULL; + writeBomLog(std::to_string(attachmentCount)); + for (int i = 0; i < attachmentCount; i++) { + attachmentTag = attachmentTags[i]; + if (!isTypeOf(attachmentTag, "ItemRevision")) { + continue; + } + + ITKCALL(ifail = AOM_ask_value_string(attachmentTag, "object_type", &itemType)); + if (inArrays(typeVector, itemType)) { + tag_t top_line = NULLTAG, window = NULLTAG; + ITKCALL(BOM_create_window(&window)); // BOM_create_window BOM + ITKCALL(BOM_set_window_top_line(window, NULLTAG, attachmentTag, NULLTAG, &top_line)); + + if (recursionBOM(top_line) != 0) { + writeBomLog("쳣"); + MEM_free(attachmentTags); + MEM_free(itemType); + return -1; + } + } + } + MEM_free(attachmentTags); + MEM_free(itemType); + return ifail; +} \ No newline at end of file diff --git a/zf_itk_c/ZF_SendPartToERP.cpp b/zf_itk_c/ZF_SendPartToERP.cpp new file mode 100644 index 0000000..d2c8733 --- /dev/null +++ b/zf_itk_c/ZF_SendPartToERP.cpp @@ -0,0 +1,959 @@ +#include "ZF_SendPart.h" + +namespace sendPart { + struct Host { + std::string prod; // Ʒʶ + std::string ip; // IPַ + std::string lang; // ԰汾 + std::string acct; // ϵͳ˻ + std::string timestamp; // ʱǰΪգ + }; + + struct Service { + std::string prod; // Ʒ + std::string name; // ȫ޶ + std::string ip; // IP + std::string id; // ʵID + }; + + struct DataKey { + std::string EntId; // ʵID + std::string CompanyId; // ˾ID + }; + + struct DataItem { + std::string imaacrtdt; // + std::string acct; // ˻ + std::string imaa001; // ϻֶ1 + std::string imaal003; // ֶ3 + std::string imaal004; // ֶ4 + std::string imaa004; // Ϸֶ + std::string imaa009; // ֶ + std::string imaa006; // λֶ + std::string imaa010; // ιʶ + std::string imaaud001; // ֶ1 + std::string imaaud012; // ֶ12 + std::string imaaud013; // ֶ13 + std::string imaa017; // Чڿֶ + std::string imaaud002; // ֶ2 + std::string imaf013; // ֶ + std::string imae034; // ֶ + std::string imaaud003; // ֶ3 + std::string imaaud004; // ֶ4 + std::string imaaud005; // ֶ5 + std::string imaaud006; // ֶ6 + std::string imaaud007; // ֶ7 + std::string imaaud008; // ֶ8 + std::string imaaud009; // ֶ9 + std::string imaaud010; // ֶ10 + }; + + struct Parameter { + std::vector data; // ݼ + }; + + struct StdData { + Parameter parameter; // + }; + + struct Payload { + StdData std_data; // ׼ + }; + + struct Root { + std::string key; // Ψһʶ + std::string type; // ͬͱʶ + Host host; // ϵͳϢ + Service service; // ʵϢ + DataKey datakey; // ʶ + Payload payload; // ҵݸ + }; + + + // л Host ṹ + void to_json(json& j, const Host& h) { + j = json{ + {"prod", h.prod}, + {"ip", h.ip}, + {"lang", h.lang}, + {"acct", h.acct}, + {"timestamp", h.timestamp} + }; + } + + // л Service ṹ + void to_json(json& j, const Service& s) { + j = json{ + {"prod", s.prod}, + {"name", s.name}, + {"ip", s.ip}, + {"id", s.id} + }; + } + + // л DataKey ṹ + void to_json(json& j, const DataKey& dk) { + j = json{ + {"EntId", dk.EntId}, + {"CompanyId", dk.CompanyId} + }; + } + + // л DataItem ṹ + void to_json(json& j, const DataItem& di) { + j = json{ + {"imaacrtdt", di.imaacrtdt}, + {"acct", di.acct}, + {"imaa001", di.imaa001}, + {"imaal003", di.imaal003}, + {"imaal004", di.imaal004}, + {"imaa004", di.imaa004}, + {"imaa009", di.imaa009}, + {"imaa006", di.imaa006}, + {"imaa010", di.imaa010}, + {"imaaud001", di.imaaud001}, + {"imaaud012", di.imaaud012}, + {"imaaud013", di.imaaud013}, + {"imaa017", di.imaa017}, + {"imaaud002", di.imaaud002}, + {"imaf013", di.imaf013}, + {"imae034", di.imae034}, + {"imaaud003", di.imaaud003}, + {"imaaud004", di.imaaud004}, + {"imaaud005", di.imaaud005}, + {"imaaud006", di.imaaud006}, + {"imaaud007", di.imaaud007}, + {"imaaud008", di.imaaud008}, + {"imaaud009", di.imaaud009}, + {"imaaud010", di.imaaud010} + }; + } + + // л Parameter ṹ + void to_json(json& j, const Parameter& p) { + j = json{ + {"data", p.data} + }; + } + + // л StdData ṹ + void to_json(json& j, const StdData& sd) { + j = json{ + {"parameter", sd.parameter} + }; + } + + // л Payload ṹ + void to_json(json& j, const Payload& pl) { + j = json{ + {"std_data", pl.std_data} + }; + } + + // л Root ṹ + void to_json(json& j, const Root& root) { + j = json{ + {"key", root.key}, + {"type", root.type}, + {"host", root.host}, + {"service", root.service}, + {"datakey", root.datakey}, + {"payload", root.payload} + }; + } + + // лʵ + void from_json(const json& j, Host& h) { + j.at("prod").get_to(h.prod); + j.at("ip").get_to(h.ip); + j.at("lang").get_to(h.lang); + j.at("acct").get_to(h.acct); + j.at("timestamp").get_to(h.timestamp); + } + + void from_json(const json& j, Service& s) { + j.at("prod").get_to(s.prod); + j.at("name").get_to(s.name); + j.at("ip").get_to(s.ip); + j.at("id").get_to(s.id); + } + + void from_json(const json& j, DataKey& dk) { + j.at("EntId").get_to(dk.EntId); + j.at("CompanyId").get_to(dk.CompanyId); + } + + void from_json(const json& j, DataItem& di) { + j.at("imaacrtdt").get_to(di.imaacrtdt); + j.at("acct").get_to(di.acct); + j.at("imaa001").get_to(di.imaa001); // ϻֶ1 + j.at("imaal003").get_to(di.imaal003); // ֶ3 + j.at("imaal004").get_to(di.imaal004); // ֶ4 + j.at("imaa004").get_to(di.imaa004); // Ϸֶ + j.at("imaa009").get_to(di.imaa009); // ֶ + j.at("imaa006").get_to(di.imaa006); // λֶ + j.at("imaa010").get_to(di.imaa010); // ιʶ + j.at("imaaud001").get_to(di.imaaud001); // ֶ1 + j.at("imaaud012").get_to(di.imaaud012); // ֶ12 + j.at("imaaud013").get_to(di.imaaud013); // ֶ13 + j.at("imaa017").get_to(di.imaa017); // Чڿֶ + j.at("imaaud002").get_to(di.imaaud002); // ֶ2 + j.at("imaf013").get_to(di.imaf013); // ֶ + j.at("imae034").get_to(di.imae034); // ֶ + j.at("imaaud003").get_to(di.imaaud003); // ֶ3 + j.at("imaaud004").get_to(di.imaaud004); // ֶ4 + j.at("imaaud005").get_to(di.imaaud005); // ֶ5 + j.at("imaaud006").get_to(di.imaaud006); // ֶ6 + j.at("imaaud007").get_to(di.imaaud007); // ֶ7 + j.at("imaaud008").get_to(di.imaaud008); // ֶ8 + j.at("imaaud009").get_to(di.imaaud009); // ֶ9 + j.at("imaaud010").get_to(di.imaaud010); // ֶ10 + } + + void from_json(const json& j, Parameter& p) { + j.at("data").get_to(p.data); + } + + void from_json(const json& j, StdData& sd) { + j.at("parameter").get_to(sd.parameter); + } + + void from_json(const json& j, Payload& pl) { + j.at("std_data").get_to(pl.std_data); + } + + void from_json(const json& j, Root& root) { + j.at("key").get_to(root.key); + j.at("type").get_to(root.type); + j.at("host").get_to(root.host); + j.at("service").get_to(root.service); + j.at("datakey").get_to(root.datakey); + j.at("payload").get_to(root.payload); + } + + + + + // д־Ϣļ writeLog("ǰʱ: "+ std::to_string(totalGs)); + void writeLog(const std::string& message) { + std::ofstream logFile(logFilePath, std::ios_base::app); // ׷ģʽļ + if (logFile.is_open()) { + std::string logEntry = "[" + getCurrentTime() + "] " + message + "\n"; + logFile << logEntry; + logFile.close(); + } + else { + std::cerr << "޷־ļ" << std::endl; + } + } + + // ļȡ + Root parseJson(const std::string& file_path) { + try { + // ļ + std::ifstream file_stream(file_path); + if (!file_stream.is_open()) { + throw std::runtime_error("ļʧ: " + file_path); + } + + // ȡļ + std::string file_content( + (std::istreambuf_iterator(file_stream)), + std::istreambuf_iterator()); + + // JSON + json j = json::parse(file_content); + return j.get(); + } + catch (const json::exception& e) { + std::cerr << "JSON[" << e.id << "]: " << e.what() << std::endl; + throw; + } + catch (const std::exception& e) { + std::cerr << "ϵͳ쳣: " << e.what() << std::endl; + throw; + } + } + + int isPropertyExist(tag_t object_tag, const char* target_prop_name) { + int ifail = ITK_ok; + int prop_count = 0; + char** prop_names = NULL; + + // ȡ + ifail = AOM_ask_prop_names(object_tag, &prop_count, &prop_names); + if (ifail != ITK_ok || prop_count == 0) { + return 0; // Բڻȡʧ + } + + // бĿ + int exists = 0; + for (int i = 0; i < prop_count; i++) { + if (strcmp(prop_names[i], target_prop_name) == 0) { + exists = 1; + break; + } + } + + // ͷڴ + MEM_free(prop_names); + return exists; + } + + std::map parseConfigString(const std::string& configString, tag_t attachTagRev) { + int ifail = ITK_ok; + std::map configMap; + std::stringstream ss(configString); + std::string keyValuePair; + + tag_t attachmentTag = NULLTAG; + ITKCALL(ITEM_ask_item_of_rev(attachTagRev, &attachmentTag)); + int count = 0; + // relationValues ==> ӦϵµӶ + tag_t* relationValues = NULLTAG; + tag_t form = NULLTAG; + // attachmentTag ==> ǰµĶ + ITKCALL(ifail = AOM_ask_value_tags(attachTagRev, "IMAN_master_form_rev", &count, &relationValues)); + if (count != 0) { + form = relationValues[0]; + } + + char* propValue = NULL; + + date_t dateValue; + // ʹ÷ֺŷֵָ + while (std::getline(ss, keyValuePair, ';')) { + try { + std::stringstream pairStream(keyValuePair); + std::string key, value; + + // ʹõȺŷֵָ + if (std::getline(pairStream, key, '=') && std::getline(pairStream, value)) { + writeLog("ǰkey ==> " + key); + //configMap[key] = value; + + std::string obj, prop; + // ʹ stringstream getline зָ + std::stringstream ss(value); + if (std::getline(ss, obj, '.') && std::getline(ss, prop, '.')) { + writeLog("obj: " + obj); + writeLog("prop: " + prop); + if (obj == "Item") { + if (!isPropertyExist(attachmentTag, prop.c_str())) { + printf("prop %s \n", prop.c_str()); + configMap[key] = ""; + continue; + } + if (strcmp(prop.c_str(), "uom_tag") == 0) { + ITKCALL(ifail = AOM_UIF_ask_value(attachmentTag, prop.c_str(), &propValue)); + writeLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + else { + ITKCALL(ifail = AOM_ask_value_string(attachmentTag, prop.c_str(), &propValue)); + writeLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + } + else if (obj == "Rev") { + if (!isPropertyExist(attachTagRev, prop.c_str())) { + printf("prop %s \n", prop.c_str()); + configMap[key] = ""; + continue; + } + + if (strcmp(prop.c_str(), "creation_date") == 0) { + writeLog("date"); + ITKCALL(ifail = AOM_ask_value_date(attachTagRev, prop.c_str(), &dateValue)); + char createDate[128] = ""; + sprintf_s(createDate, "%04d-%02d-%02d %02d:%02d:%02d", dateValue.year, dateValue.month + 1, dateValue.day, dateValue.hour, dateValue.minute, dateValue.second); + propValue = createDate; + } + else if ((strcmp(prop.c_str(), "zf6_cpxsyb") == 0)) { + writeLog("cpxsyb"); + /*int cpxsybNum = 0; + char** propValues = NULL; + AOM_ask_value_strings(attachTagRev, prop.c_str(), &cpxsybNum, &propValues);*/ + + int tempNum = 0; + char** tempValues = NULL; + std::string tempValue = ""; + ITKCALL(ifail = AOM_UIF_ask_values(attachTagRev, prop.c_str(), &tempNum, &tempValues)); + for (int i = 0; i < tempNum; i++) { + tempValue += tempValues[i]; + tempValue += ";"; + } + writeLog("ǰpropValue ==> " + tempValue); + configMap[key] = tempValue; + } + else { + ITKCALL(ifail = AOM_ask_value_string(attachTagRev, prop.c_str(), &propValue)); + writeLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + } + else if (count != 0 && obj == "Form") { + if (!isPropertyExist(form, prop.c_str())) { + configMap[key] = ""; + continue; + } + ITKCALL(ifail = AOM_ask_value_string(form, prop.c_str(), &propValue)); + writeLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + } + else { + configMap[key] = value; + writeLog("ǰpropValueʹĬֵ1: " + value); + } + } + else { + writeLog("Value ==> " + std::string(value)); + // ûȷָѡ洢ԭʼֵ + if (value == "TimeStamp") { + std::string time = getCurrentTimestamp17(); + configMap[key] = time; + writeLog("ǰpropValue ==> " + time); + } + /*else if (value == "OwningUser") { + int userNum = 0; + tag_t* owners = NULLTAG; + ITKCALL(ifail = AOM_ask_value_tags(attachTagRev, "owning_user", &userNum, &owners)); + if (userNum != 0) { + + AOM_ask_value_string(owners[0], "user_name", &propValue); + } + writeLog("ǰpropValue ==> " + std::string(propValue)); + configMap[key] = propValue; + DOFREE(owners); + }*/ + else if (value == "MaterialClass") { + tag_t top_line = NULLTAG, window = NULLTAG; + ITKCALL(BOM_create_window(&window)); // BOM_create_window BOM + ITKCALL(BOM_set_window_top_line(window, NULLTAG, attachTagRev, NULLTAG, &top_line)); + //ȡ + int count = 0; + tag_t* children_line; + ITKCALL(BOM_line_ask_all_child_lines(top_line, &count, &children_line)); + + if (count != 0) { + writeLog("ǰpropValue ==> A"); + configMap[key] = "A"; + } + else { + writeLog("ǰpropValue ==> M"); + configMap[key] = "M"; + } + } + else if (value == "PurchaseType") { + char* zf6_zz = NULL; + char* zf6_wg = NULL; + + if (!(isPropertyExist(attachTagRev, "zf6_zz") && isPropertyExist(attachTagRev, "zf6_wg"))) { + configMap[key] = ""; + continue; + } + + ITKCALL(AOM_UIF_ask_value(attachTagRev, "zf6_zz", &zf6_zz)); + ITKCALL(AOM_UIF_ask_value(attachTagRev, "zf6_wg", &zf6_wg)); + if (zf6_zz == NULL || std::strlen(zf6_zz) == 0) { + EMH_store_error_s1(EMH_severity_error, ITK_err, "ǷΪ"); + return {}; + } + if (zf6_wg == NULL || std::strlen(zf6_wg) == 0) { + EMH_store_error_s1(EMH_severity_error, ITK_err, "Ƿ⹺Ϊ"); + return {}; + } + + if ((zf6_zz == "" && zf6_wg == "") || (zf6_zz == "" && zf6_wg == "")) { + writeLog("ǰpropValue ==> 2"); + configMap[key] = "2"; + } + else if (zf6_zz == "" && zf6_wg == "") { + writeLog("ǰpropValue ==> 1"); + configMap[key] = "1"; + } + DOFREE(zf6_zz); + DOFREE(zf6_wg); + } + else { + configMap[key] = value; + writeLog("ǰpropValueʹĬֵ2: " + value); + } + } + } + } + catch (const std::exception& e) { + writeLog("Error: " + std::string(e.what())); + } + } + return configMap; + } + + std::string writeJsonToString(Root data) { + std::ostringstream oss; + + // ӡ Root + oss << "{\n"; + oss << " \"key\": \"" << data.key << "\",\n"; + oss << " \"type\": \"" << data.type << "\",\n"; + + // ӡ Host + oss << " \"host\": {\n"; + oss << " \"prod\": \"" << data.host.prod << "\",\n"; + oss << " \"ip\": \"" << data.host.ip << "\",\n"; + oss << " \"lang\": \"" << data.host.lang << "\",\n"; + oss << " \"acct\": \"" << data.host.acct << "\",\n"; + oss << " \"timestamp\": \"" << data.host.timestamp << "\"\n"; + oss << " },\n"; + + // ӡ Service + oss << " \"service\": {\n"; + oss << " \"prod\": \"" << data.service.prod << "\",\n"; + oss << " \"name\": \"" << data.service.name << "\",\n"; + oss << " \"ip\": \"" << data.service.ip << "\",\n"; + oss << " \"id\": \"" << data.service.id << "\"\n"; + oss << " },\n"; + + // ӡ DataKey + oss << " \"datakey\": {\n"; + oss << " \"EntId\": \"" << data.datakey.EntId << "\",\n"; + oss << " \"CompanyId\": \"" << data.datakey.CompanyId << "\"\n"; + oss << " },\n"; + + // ӡ Payload StdData + oss << " \"payload\": {\n"; + oss << " \"std_data\": {\n"; + oss << " \"parameter\": {\n"; + oss << " \"data\": [\n"; + + // ӡÿ DataItem + for (size_t i = 0; i < data.payload.std_data.parameter.data.size(); ++i) { + const DataItem& di = data.payload.std_data.parameter.data[i]; + oss << " {\n"; + oss << " \"imaacrtdt\": \"" << di.imaacrtdt << "\",\n"; + oss << " \"acct\": \"" << di.acct << "\",\n"; + oss << " \"imaa001\": \"" << di.imaa001 << "\",\n"; + oss << " \"imaal003\": \"" << di.imaal003 << "\",\n"; + oss << " \"imaal004\": \"" << di.imaal004 << "\",\n"; + oss << " \"imaa004\": \"" << di.imaa004 << "\",\n"; + oss << " \"imaa009\": \"" << di.imaa009 << "\",\n"; + oss << " \"imaa006\": \"" << di.imaa006 << "\",\n"; + oss << " \"imaa010\": \"" << di.imaa010 << "\",\n"; + oss << " \"imaaud001\": \"" << di.imaaud001 << "\",\n"; + oss << " \"imaaud012\": \"" << di.imaaud012 << "\",\n"; + oss << " \"imaaud013\": \"" << di.imaaud013 << "\",\n"; + oss << " \"imaa017\": \"" << di.imaa017 << "\",\n"; + oss << " \"imaaud002\": \"" << di.imaaud002 << "\",\n"; + oss << " \"imaf013\": \"" << di.imaf013 << "\",\n"; + oss << " \"imae034\": \"" << di.imae034 << "\",\n"; + oss << " \"imaaud003\": \"" << di.imaaud003 << "\",\n"; + oss << " \"imaaud004\": \"" << di.imaaud004 << "\",\n"; + oss << " \"imaaud005\": \"" << di.imaaud005 << "\",\n"; + oss << " \"imaaud006\": \"" << di.imaaud006 << "\",\n"; + oss << " \"imaaud007\": \"" << di.imaaud007 << "\",\n"; + oss << " \"imaaud008\": \"" << di.imaaud008 << "\",\n"; + oss << " \"imaaud009\": \"" << di.imaaud009 << "\",\n"; + oss << " \"imaaud010\": \"" << di.imaaud010 << "\""; + if (i != data.payload.std_data.parameter.data.size() - 1) { + oss << "\n },\n"; + } + else { + oss << "\n }\n"; + } + } + oss << " ]\n"; + oss << " }\n"; + oss << " }\n"; + oss << " }\n"; + oss << "}\n"; + + return oss.str(); + } + + DataItem exportDateItem(std::map innerConfigMap) { + DataItem& dataItem = DataItem(); + + for (const auto& pair : innerConfigMap) { + const std::string& key = pair.first; + const std::string& value = pair.second; + + if (key == "imaacrtdt") { + dataItem.imaacrtdt = value; + } + else if (key == "acct") { + dataItem.acct = value; + } + else if (key == "imaa001") { + dataItem.imaa001 = value; + } + else if (key == "imaal003") { + dataItem.imaal003 = value; + } + else if (key == "imaal004") { + dataItem.imaal004 = value; + } + else if (key == "imaa004") { + dataItem.imaa004 = value; + } + else if (key == "imaa009") { + dataItem.imaa009 = value; + } + else if (key == "imaa006") { + dataItem.imaa006 = value; + } + else if (key == "imaa010") { + dataItem.imaa010 = value; + } + else if (key == "imaaud001") { + dataItem.imaaud001 = value; + } + else if (key == "imaaud012") { + dataItem.imaaud012 = value; + } + else if (key == "imaaud013") { + dataItem.imaaud013 = value; + } + else if (key == "imaa017") { + dataItem.imaa017 = value; + } + else if (key == "imaaud002") { + dataItem.imaaud002 = value; + } + else if (key == "imaf013") { + dataItem.imaf013 = value; + } + else if (key == "imae034") { + dataItem.imae034 = value; + } + else if (key == "imaaud003") { + dataItem.imaaud003 = value; + } + else if (key == "imaaud004") { + dataItem.imaaud004 = value; + } + else if (key == "imaaud005") { + dataItem.imaaud005 = value; + } + else if (key == "imaaud006") { + dataItem.imaaud006 = value; + } + else if (key == "imaaud007") { + dataItem.imaaud007 = value; + } + else if (key == "imaaud008") { + dataItem.imaaud008 = value; + } + else if (key == "imaaud009") { + dataItem.imaaud009 = value; + } + else if (key == "imaaud010") { + dataItem.imaaud010 = value; + } + } + return dataItem; + } + + Root exportHeadItem(Root data, std::map outerConfigMap) { + + for (const auto& pair : outerConfigMap) { + const std::string& key = pair.first; + const std::string& value = pair.second; + + if (key == "key") { + data.key = value; + } + else if (key == "type") { + data.type = value; + } + else if (key == "prod") { + data.host.prod = value; + } + else if (key == "lang") { + data.host.lang = value; + } + else if (key == "acct") { + data.host.acct = value; + } + else if (key == "timestamp") { + data.host.timestamp = value; + } + else if (key == "prod") { + data.service.prod = value; + } + else if (key == "name") { + data.service.name = value; + } + else if (key == "id") { + data.service.id = value; + } + else if (key == "EntId") { + data.datakey.EntId = value; + } + else if (key == "CompanyId") { + data.datakey.CompanyId = value; + } + } + return data; + } + +} + +using namespace sendPart; + +#include + +#include +#include +#include +#include +#include + +using json = nlohmann::json; + +std::string parseResponseJson(const std::string& json_str) { + try { + // JSON ַ + json root = json::parse(json_str); + + // ֤ JSON ṹ + if (!root.contains("result") || + !root["result"].contains("payload") || + !root["result"]["payload"].contains("std_data") || + !root["result"]["payload"]["std_data"].contains("data")) { + throw std::runtime_error("Invalid JSON structure"); + } + + // ȡ data + const auto& data_array = root["result"]["payload"]["std_data"]["data"]; + + // 洢 notes + std::vector notes; + + // ȡ notes + for (const auto& item : data_array) { + if (item.contains("notes") && item["notes"].is_string()) { + notes.push_back(item["notes"].get()); + } + } + + // ƴַ + std::ostringstream oss; + oss << "[ERPϵͳش] "; + for (size_t i = 0; i < notes.size(); ++i) { + if (i > 0) oss << "\n"; + oss << notes[i]; + } + + return oss.str(); + + } + catch (const json::exception& e) { + std::cerr << "JSON : " << e.what() << std::endl; + return ""; + } + catch (const std::exception& e) { + std::cerr << ": " << e.what() << std::endl; + return ""; + } +} + + +int ZF_SendPartToERP(EPM_action_message_t msg) { + // ȡ־ļĿ¼· + logFilePath = getLogFilePath("ZF_SendPartToERP_"); + + writeLog("=========================ͬ Start==================="); + int ifail = ITK_ok; + char* url =NULL ,* templateUid =NULL; + ITKCALL(PREF_ask_char_value("ZF_SendPartToERP_URL", 0 , &url)); + writeLog("url : " + std::string(url)); + ITKCALL(PREF_ask_char_value("ZF_SendPartToERP_Template", 0, &templateUid)); + char* argName = NULL, * argValue = NULL, * arg = NULL; + char objTypes[1024] = "", option[1024] = ""; + bool isExistRev = false; + int arg_cnt = TC_number_of_arguments(msg.arguments); + writeLog("Ϊ"+ std::to_string(arg_cnt)); + if (arg_cnt > 0) + { + for (int i = 0; i < arg_cnt; i++) + { + arg = TC_next_argument(msg.arguments); + ITKCALL(ifail = ITK_ask_argument_named_value((const char*)arg, &argName, &argValue)); + if (strcmp(argName, "type") == 0) + { + if (argValue != NULL) + { + strcpy(objTypes, argValue); + } + } + else if (stricmp(argName, "option") == 0) + { + if (argValue != NULL) + { + strcpy(option, argValue); + } + } + } + } + MEM_free(argName); + MEM_free(argValue); + std::vector typeVector; + getVector(objTypes, typeVector, ';'); + + char** config; + int num; + // ж -optionõѡ ǷΪ + if (strlen(option) > 0) { + ITKCALL(PREF_ask_char_values(option, &num, &config)); + writeLog("option ΪգֵΪ"+ std::string(option)); + } + else { + EMH_store_error_s1(EMH_severity_error, ITK_err, "optionΪ"); + return ifail; + } + + + tag_t attachmentTag = NULLTAG; + int attachmentCount = 0; + tag_t rootTask = NULLTAG, * attachmentTags = NULLTAG; + ITKCALL(ifail = EPM_ask_root_task(msg.task, &rootTask)); + ITKCALL(ifail = EPM_ask_attachments(rootTask, EPM_target_attachment, &attachmentCount, &attachmentTags)); + + // ȡѡ + tag_t templateDataSet = NULLTAG; + char* fileName = NULL; + ITK__convert_uid_to_tag(templateUid, &templateDataSet); + + ITKCALL(AOM_ask_value_string(templateDataSet, "object_name", &fileName)); + + int n_found = 0; + tag_t* ref_object = NULLTAG; + const char* ref_name = "Text"; + //AE_reference_type_t reference_type; + ITKCALL(AE_ask_dataset_named_refs(templateDataSet, &n_found, &ref_object)); + //ITKCALL(ifail = AE_ask_dataset_named_ref2(templateDataSet, ref_name, &reference_type, &ref_object)); + + // ʹ std::string ַƴ + std::string tempPath = getenv("TEMP"); + std::string fullPath = tempPath + "\\" + fileName; + removeFile(fullPath); + // ļ· + if (IMF_export_file(ref_object[0], fullPath.c_str()) != 0) { + writeLog("ļʧܣ·: " + fullPath); + EMH_store_error_s1(EMH_severity_error, ITK_err, "ļʧ"); + return 1; + } + else { + writeLog("ļѳɹ: " + fullPath); + } + + char** erpConfig; + int configNum; + ITKCALL(PREF_ask_char_values(option, &configNum, &erpConfig)); + + + writeLog("ʼjson"); + Root data = parseJson(fullPath); + std::vector dataItems; + // erpConfig ַ + std::map outerConfigMap; + + + tag_t processUser = NULLTAG; + char* processUserName = NULL; + ITKCALL(AOM_ask_value_tag(rootTask, "owning_user", &processUser)); + ITKCALL(AOM_ask_value_string(processUser, "user_id", &processUserName)); + + //еĿµĶ + char* itemType = NULL; + writeLog(std::to_string(attachmentCount)); + for (int i = 0; i < attachmentCount; i++) { + attachmentTag = attachmentTags[i]; + if (!isTypeOf(attachmentTag, "ItemRevision")) { + continue; + } + + writeLog(std::to_string(i)); + + std::map innerConfigMap; + if (configNum == 2) { + writeLog("ErpConfig[0]: " + string(erpConfig[0])); + outerConfigMap = parseConfigString(erpConfig[0], attachmentTag); + writeLog("ErpConfig[1]: " + string(erpConfig[1])); + innerConfigMap = parseConfigString(erpConfig[1], attachmentTag); + } + else { + EMH_store_error_s1(EMH_severity_error, ITK_err, "optionȷ"); + return ifail; + } + if (outerConfigMap.empty() || innerConfigMap.empty()) { + return -1; + } + + + ITKCALL(ifail = AOM_ask_value_string(attachmentTag, "object_type", &itemType)); + if (inArrays(typeVector, itemType)) { + DataItem item = exportDateItem(innerConfigMap); + dataItems.push_back(item); + } + } + + try { + if (string(erpConfig[0]).find("OwningUser") != std::string::npos) { + data.host.acct = processUserName; + } + data.payload.std_data.parameter.data = dataItems; + + // innerConfigMap DataItem + data = exportHeadItem(data, outerConfigMap); + + writeLog("ʼƴjson ==>"); + std::string jsonStr = writeJsonToString(data); + + writeLog(jsonStr); + writeLog("jsonƴӳɹ <=="); + + // POST + writeLog("ʼPost"); + string jsonFileName = generate_uuid_v4(); + std::string jsonFilePath = tempPath + "\\" + jsonFileName + ".txt"; + writeJsonToFile(jsonFilePath, jsonStr); + writeLog("jsonļѱ浽: " + jsonFilePath); + + string cmd = "java -jar %ZF_ROOT%\\bin\\SendERP.jar " + std::string(url) +" " + jsonFilePath; + + string result; + char buf[8000] = { 0 }; + //logf("popen"); + FILE* pf = _popen(cmd.c_str(), "r"); + while (fgets(buf, sizeof buf, pf)) { + result.append(buf); + } + _pclose(pf); + + + // ת + writeLog("result:"+ result); + + // Ƿ "code": "0", + if (result.length() > 0) { + EMH_store_error_s1(EMH_severity_error, ITK_err, result.c_str()); + } + else { + writeLog("ͳɹ"); + } + } + catch (const json::exception& e) { + writeLog("JSONл: " + std::string(e.what())); + return -1; + } + catch (const std::exception& e) { + writeLog("׼쳣: " + std::string(e.what())); + return -1; + } + MEM_free(attachmentTags); + MEM_free(itemType); + return ifail; +} + + diff --git a/zf_itk_c/connor_itk_util.cpp b/zf_itk_c/connor_itk_util.cpp new file mode 100644 index 0000000..815c516 --- /dev/null +++ b/zf_itk_c/connor_itk_util.cpp @@ -0,0 +1,300 @@ +#include +#include +#ifdef WIN32 +#include +#include +#else +#include +#endif +#include "connor_itk_util.h" +//extern "C" int POM_AM__set_application_bypass(logical bypass); +#include +#include +#include +#define ARGS_LENGTH 200 +#define ARGS_NAME_DEBUG "-debug" +#define DEBUG "-debug=" +#define MAX_PRINTLINE_LENGTH 10000 +#define MAX_PATH_LENGTH 2000 +#define MAX_ARGUMENT_LENGTH 400 +#define MAX_FILE_EXT_LENGTH 10 +#define TRUE_FLAG 1 +#define FALSE_FLAG 0 +#define DETAILLOG 1 +using namespace std; +//void ECHO(char* format, ...) +//{ +// //if( !YFJC_OPT_DEBUG ) +// // return; +// +// char msg[4096]; +// va_list args; +// +// va_start(args, format); +// vsprintf(msg, format, args); +// va_end(args); +// +// printf(msg); +// TC_write_syslog(msg); +//} + +FILE* logFile = NULL; + +/*=============================================================================* + * FUNCTION: current_time + * PURPOSE : get the current datetime + * INPUT: + * date_t* date_tag // current date time tag + * + * RETURN: + * void + *============================================================================*/ +void current_time(date_t* date_tag) +{ + time_t ltime; + struct tm* today; + + // Set time zone from TZ environment variable. If TZ is not set, + // the operating system is queried to obtain the default value + // for the variable. + // + //_tzset(); + + // Get UNIX-style time and display as number and string. + time(<ime); + + today = localtime(<ime); + date_tag->year = today->tm_year + 1900; + date_tag->month = today->tm_mon; + date_tag->day = today->tm_mday; + date_tag->hour = today->tm_hour; + date_tag->minute = today->tm_min; + date_tag->second = today->tm_sec; +} +/*=============================================================================* + * FUNCTION: CreateLogFile + * PURPOSE : create log file + * INPUT: + * char* FunctionName // the funtion which need to create log file + * FILE** logFile // out: the log file pointer + * + * RETURN: + * void + *============================================================================*/ +void CreateLogFile(char* FunctionName, char** fullname) +{ + int i = 0, ifail = ITK_ok; + //date_t status_now; + //char* date_string = NULL; + char date_string[MAX_PATH_LENGTH]; + char logFileDir[MAX_PATH_LENGTH]; + char logFileName[MAX_PATH_LENGTH]; + + char* session_uid = NULL; + tag_t session_tag = NULLTAG; + time_t now; + struct tm* p; + + time(&now); + + logFile = NULL; + //current_time(&status_now); + p = localtime(&now); + + memset(date_string, 0, sizeof(date_string)); + //sprintf(date_string,"%4d%02d%02d%02d%02d%02d",1900+p->tm_year,p->tm_mon+1 ,p->tm_mday ,p->tm_hour,p->tm_min ,p->tm_sec ); + sprintf(date_string, "%4d%02d%02d", 1900 + p->tm_year, p->tm_mon + 1, p->tm_mday); + //if( DATE_date_to_string( status_now, "%Y%m%d%H%M%S", &date_string) != ITK_ok ) + //ifail = ITK_date_to_string (status_now, &date_string ); + //if (ifail) + //{ + // printf("!*ERROR*!: Failed to get current date time\n"); + // goto CLEANUP; + //} + + memset(logFileDir, 0, sizeof(logFileDir)); + memset(logFileName, 0, sizeof(logFileName)); + //get log dir + sprintf(logFileDir, "%s", getenv("TEMP")); + printf("\n log file dir: %s\n", logFileDir); + //try to change dir to TC_USER_LOG_DIR + if (chdir(logFileDir) != ITK_ok) + { + //not set TC_USER_LOG_DIR + //log in to default TC_LOG + memset(logFileDir, 0, sizeof(logFileDir)); + sprintf(logFileDir, "%s", getenv("TC_LOG")); + printf("\n TC_USER_LOG_DIR invalide, log file dir: %s\n", logFileDir); + if (chdir(logFileDir) != ITK_ok) + { + //still can not change to log dir + printf("!*ERROR*!: Failed to change dir to TC_USER_LOG_DIR\n"); + goto CLEANUP; + } + } + + //get session_uid to make sure the log file name unique + POM_ask_session(&session_tag); + ITK__convert_tag_to_uid(session_tag, &session_uid); + + + //get logFileName + //sprintf(logFileName, "%s_%s_%s.log", FunctionName, session_uid, date_string); + sprintf(logFileName, "%s_%s.log", FunctionName, date_string); + printf("log file name: %s\n", logFileName); + + *fullname = (char*)MEM_alloc(sizeof(char) * 512); + sprintf(*fullname, "%s\\%s", logFileDir, logFileName); + + //for(i = 0; _access((char *)logFileName, 4) == 0; i++) + /*{ + memset(logFileName, 0, sizeof(logFileName)); + sprintf(logFileName, "%s_%s_%s_%d.log", FunctionName, session_uid, date_string, i); + } + printf("final log file name: %s\n", logFileName);*/ + + //create log file + logFile = fopen(logFileName, "a"); + +CLEANUP: + //DOFREE(date_string); + DOFREE(session_uid); +} + +void CreateLogFile2(char* FunctionName, char** fullname, char* fileDir) +{ + int i = 0, ifail = ITK_ok; + //date_t status_now; + //char* date_string = NULL; + char date_string[MAX_PATH_LENGTH]; + char logFileDir[MAX_PATH_LENGTH]; + + char logFileName[MAX_PATH_LENGTH]; + + char* session_uid = NULL; + tag_t session_tag = NULLTAG; + time_t now; + struct tm* p; + + time(&now); + + logFile = NULL; + //current_time(&status_now); + p = localtime(&now); + + memset(date_string, 0, sizeof(date_string)); + //sprintf(date_string,"%4d%02d%02d%02d%02d%02d",1900+p->tm_year,p->tm_mon+1 ,p->tm_mday ,p->tm_hour,p->tm_min ,p->tm_sec ); + sprintf(date_string, "%4d%02d%02d", 1900 + p->tm_year, p->tm_mon + 1, p->tm_mday); + //if( DATE_date_to_string( status_now, "%Y%m%d%H%M%S", &date_string) != ITK_ok ) + //ifail = ITK_date_to_string (status_now, &date_string ); + //if (ifail) + //{ + // printf("!*ERROR*!: Failed to get current date time\n"); + // goto CLEANUP; + //} + + memset(logFileDir, 0, sizeof(logFileDir)); + memset(logFileName, 0, sizeof(logFileName)); + ////get log dir + //sprintf(logFileDir, "%s", getenv("TEMP")); + strcat(logFileDir, fileDir); + printf("\n log file dir: %s\n", logFileDir); + //try to change dir to TC_USER_LOG_DIR + if (chdir(logFileDir) != ITK_ok) + { + //not set TC_USER_LOG_DIR + //log in to default TC_LOG + memset(logFileDir, 0, sizeof(logFileDir)); + sprintf(logFileDir, "%s", getenv("TC_LOG")); + printf("\n TC_USER_LOG_DIR invalide, log file dir: %s\n", logFileDir); + if (chdir(logFileDir) != ITK_ok) + { + //still can not change to log dir + printf("!*ERROR*!: Failed to change dir to TC_USER_LOG_DIR\n"); + goto CLEANUP; + } + } + + //get session_uid to make sure the log file name unique + POM_ask_session(&session_tag); + ITK__convert_tag_to_uid(session_tag, &session_uid); + + + //get logFileName + //sprintf(logFileName, "%s_%s_%s.log", FunctionName, session_uid, date_string); + sprintf(logFileName, "%s_%s.log", FunctionName, date_string); + printf("log file name: %s\n", logFileName); + + *fullname = (char*)MEM_alloc(sizeof(char) * 512); + sprintf(*fullname, "%s\\%s", logFileDir, logFileName); + + //for(i = 0; _access((char *)logFileName, 4) == 0; i++) + /*{ + memset(logFileName, 0, sizeof(logFileName)); + sprintf(logFileName, "%s_%s_%s_%d.log", FunctionName, session_uid, date_string, i); + } + printf("final log file name: %s\n", logFileName);*/ + + //create log file + logFile = fopen(logFileName, "a"); + +CLEANUP: + //DOFREE(date_string); + DOFREE(session_uid); +} + +/*=============================================================================* + * FUNCTION: WriteLog + * PURPOSE : write log, if debug log File not null, write log message to log File + * INPUT: + * const char* format // debug message string + * + * RETURN: + * void + *============================================================================*/ +void WriteLog1(const char* format, ...) +{ + va_list arg; + char tmp[MAX_PRINTLINE_LENGTH]; + + if (logFile) + { + //get the message + memset(tmp, 0, sizeof(tmp)); + va_start(arg, format); + vsprintf(tmp, format, arg); + va_end(arg); + + //----------print to command window for trace--------// + printf("%s\n", tmp); + + //print message to log file + fprintf(logFile, "%s\n", tmp); + fflush(logFile); + } + else + { + printf("*!Error!*: Log File Not Exist\n"); + } +} + +void WriteLog2(string value) { + if (logFile) + { + fprintf(logFile, "%s\n", value.c_str()); + fflush(logFile); + } + else + { + printf("*!Error!*: Log File Not Exist\n"); + } +} +void CloseLog1(void) +{ + if (logFile) + { + fclose(logFile); + logFile = NULL; + } +} + diff --git a/zf_itk_c/connor_itk_util.h b/zf_itk_c/connor_itk_util.h new file mode 100644 index 0000000..1039d64 --- /dev/null +++ b/zf_itk_c/connor_itk_util.h @@ -0,0 +1,64 @@ +#pragma once +#include +#include +#include +//#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; +//#include +//#include +//#include +//#include + +//#include +//#include +#ifdef __cplusplus +extern "C" { +#endif + +#define DOFREE(obj) \ +{ \ + if(obj) \ + { \ + MEM_free(obj); \ + obj = NULL; \ + } \ +} +//void ECHO(char* format, ...); +void CreateLogFile(char* FunctionName, char** fullname); +void CreateLogFile2(char* FunctionName, char** fullname, char* fileDir); +void WriteLog1(const char* format, ...); +void WriteLog2(string value); +void CloseLog1(void); + + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/zf_itk_c/connor_set_prop_value.cpp b/zf_itk_c/connor_set_prop_value.cpp new file mode 100644 index 0000000..0c64eda --- /dev/null +++ b/zf_itk_c/connor_set_prop_value.cpp @@ -0,0 +1,68 @@ + +#include + + +#include +#include +#include +#include "windows.h" +#include +#include + +#include +#include +#include +#include +#include "connor_itk_util.h" +#include "kutil.h" +extern "C" int POM_AM__set_application_bypass(logical bypass); + +int connor_set_prop_value(void * returnValue){ + + + char* log_file = NULL; + + printf("־ļ\n"); + char* TO_SRM = (char*)malloc(sizeof("connor_set_prop_value")); + strcpy(TO_SRM, "connor_set_prop_value"); + CreateLogFile(TO_SRM, &log_file); + + + int ifail = ITK_ok; + char* uid = NULL; + char* propname = NULL; + char* propvalue = NULL; + USERARG_get_string_argument(&uid); + USERARG_get_string_argument(&propname); + USERARG_get_string_argument(&propvalue); + POM_AM__set_application_bypass(true); + WriteLog1("propname===========================%s \n", propname); + WriteLog1("propvalue===========================%s \n", propvalue); + WriteLog1("uid===========================%s \n", uid); + + tag_t tag_instance = NULLTAG; + + ITK__convert_uid_to_tag(uid, &tag_instance); + + + + char * object_type = NULL; + tag_t attr=NULLTAG; + ITKCALL(AOM_ask_value_string(tag_instance, "object_type", &object_type)); + WriteLog1("object_type===========================%s \n",object_type); + ITKCALL(AOM_lock(tag_instance)); + ITKCALL(POM_attr_id_of_attr(propname,object_type,&attr)); + ITKCALL(POM_refresh_instances_any_class(1, &tag_instance, POM_modify_lock)); + ITKCALL(POM_set_attr_string(1, &tag_instance, attr, propvalue)); + ITKCALL(POM_save_instances(1, &tag_instance, true)); + ITKCALL(AOM_unlock(tag_instance)); + DOFREE(object_type); + POM_AM__set_application_bypass(false); + + DOFREE(propname); + DOFREE(propvalue); + + CloseLog(); + return ITK_ok; +} + diff --git a/zf_itk_c/erp_send_bom.cpp b/zf_itk_c/erp_send_bom.cpp new file mode 100644 index 0000000..cd31c70 --- /dev/null +++ b/zf_itk_c/erp_send_bom.cpp @@ -0,0 +1,167 @@ +#include "kutil.h" +#define debug true +#define ITK_err 919012 +#define TC_SEND_ERP_URL "TC_SEND_ERP_URL" +void getBomLinePropertysBom(tag_t top_line,char * top_id,_ConnectionPtr m_pConnection); +int erp_send_bom(EPM_action_message_t msg) { + int ifail = ITK_ok, arg_cnt = 0, att_cnt = 0, bvr_count = 0, count = 0, url_num = 0; + char* arg = NULL, * argflag = NULL, * argvalue = NULL; + char* server_url = NULL; + tag_t* attachments = NULL, task_tag = NULLTAG, rootTask_tag = NULLTAG , bom_window_tag = NULLTAG,* bvr_list = NULLTAG, top_line = NULLTAG; + + ::CoInitialize(NULL); //ʼOLE/COM⻷ + HRESULT hr = NULL; + _ConnectionPtr m_pConnection; // ݿ + _RecordsetPtr m_pRecordset; // + _CommandPtr m_pCommand; // ¼ + + char* server_address; + int valueNum = 0; + WriteLog(debug, "ʼִУݵERP (erp_send_bom) ..."); + PREF_ask_char_value("TC_SqlServer_Link_ITK", valueNum, &server_address); + if (server_address == NULL) { + EMH_store_error_s1(EMH_severity_error, ITK_err, "δݿ"); + goto end; + } + PREF_ask_char_value("TC_SEND_ERP_URL", url_num, &server_url); + if (server_url == NULL) { + EMH_store_error_s1(EMH_severity_error, ITK_err, "δýӿڵַ"); + goto end; + } + + //õǰڵ + task_tag = msg.task; + if (task_tag == NULLTAG) { + goto end; + } + ITKCALL(ifail = EPM_ask_root_task(task_tag, &rootTask_tag)); + //ȡĿж + ITKCALL(ifail = EPM_ask_attachments(rootTask_tag, EPM_target_attachment, &att_cnt, &attachments)); + if (att_cnt == 0) { + goto end; + } + hr = m_pConnection.CreateInstance(_uuidof(Connection));//Ӷʵ + if (SUCCEEDED(hr)) + { + m_pConnection->ConnectionString = (server_address); + //m_pConnection->ConnectionString = ("Provider = SQLOLEDB.1; Persist Security Info = False; User ID =sa; Password=infodba; Initial Catalog = TC13; Data Source =192.168.188.129"); + //printf("\n==========================================================\n"); + hr = m_pConnection->Open("", "", "", adConnectUnspecified);//ݿ + if (FAILED(hr)) + { + printf("Open Failed!"); + return 1; + } + else + { + for (int i = 0; i < att_cnt; i++) + { + tag_t attachment = attachments[i]; + char* object_type = NULL; + AOM_ask_value_string(attachment, "object_type", &object_type); + if (!isTypeOf(attachment,"ItemRevision")) { + continue; + } + WriteLog(debug, "ʼִ߼\n"); + ITEM_rev_list_bom_view_revs(attachments[i], &bvr_count, &bvr_list); + if (bvr_count == 0) { + continue; + } + char* item_id = NULL,*object_name = NULL; + AOM_ask_value_string(attachment,"item_id", &item_id); + AOM_ask_value_string(attachment, "object_name", &object_name); + //ɾݿ + char* deleteSql1 = (char*)calloc(1024, sizeof(char)); + char* deleteSql2 = (char*)calloc(1024, sizeof(char)); + sprintf(deleteSql1, "delete from BOM_INFOS where puid = '%s'", item_id); + m_pConnection->Execute(_bstr_t(deleteSql1), 0, adCmdText); + sprintf(deleteSql2, "delete from BOM_STRUC where puid = '%s'", item_id); + m_pConnection->Execute(_bstr_t(deleteSql2), 0, adCmdText); + + BOM_create_window(&bom_window_tag); + BOM_set_window_top_line_bvr(bom_window_tag, bvr_list[bvr_count - 1], &top_line); + + //char* uid_value; + //ITK__convert_tag_to_uid(attachments[i], &uid_value); + //printf("UIDΪ%s\n", uid_value); + char* insertSql1 = (char*)calloc(1024, sizeof(char)); + sprintf(insertSql1, "INSERT INTO BOM_INFOS(puid,cid,quantity,cname) VALUES('%s','%s','%s','%s')", item_id, item_id, "1", object_name); + printf("Ϊ%s\n", insertSql1); + m_pConnection->Execute(_bstr_t(insertSql1), 0, adCmdText); + insertSql1 = NULL; + DOFREE(insertSql1); + + char* insertSql2 = (char*)calloc(1024, sizeof(char)); + sprintf(insertSql2, "INSERT INTO BOM_STRUC(puid,pid,cid) VALUES('%s','%s','%s')", item_id, "", item_id); + printf("Ϊ%s\n", insertSql2); + m_pConnection->Execute(_bstr_t(insertSql2), 0, adCmdText); + insertSql2 = NULL; + DOFREE(insertSql2); + //BOMдݿ + getBomLinePropertysBom(top_line,item_id, m_pConnection); + //֪ͨerp + sendErpVersion(server_url, "ProductBom", attachment, item_id); + //CURL* curl; + //CURLcode res; + //curl = curl_easy_init(); + //if (curl) { + // char* string_value = (char*)calloc(1024, sizeof(char)); + // string uuid = getUUid(); + // sprintf(string_value, "%s/api/Send?SysNo=PLM&BillType=%s&BillOp=%s&BillNo=%s&MsgUid=%s", server_url, "ProductBom", "Edit", item_id, uuid.c_str()); + // //printf("%s\n", string_value); + // std::cout << string_value << "\n"; + // curl_easy_setopt(curl, CURLOPT_URL, string_value); + // res = curl_easy_perform(curl); + + // if (CURLE_OK == res) { + // char* ct; + // /* ask for the content-type */ + // res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct); + + // if ((CURLE_OK == res) && ct) + // printf("We received Content-Type: %s\n", ct); + // } + + // /* always cleanup */ + // curl_easy_cleanup(curl); + //} + } + } + } + end: + return ifail; +} +void getBomLinePropertysBom(tag_t top_line,char * top_id, _ConnectionPtr m_pConnection) { + int count; + tag_t* children_line; + ITKCALL(BOM_line_ask_all_child_lines(top_line, &count, &children_line)); + for (int ii = 0; ii < count; ii++) + { + char* item_id = "", + * object_name = "", + *bl_quantity = "1", + *parent_id = ""; + ITKCALL(AOM_ask_value_string(children_line[ii], "bl_item_item_id", &item_id)); + ITKCALL(AOM_ask_value_string(top_line, "bl_item_item_id", &parent_id)); + ITKCALL(AOM_ask_value_string(children_line[ii], "bl_item_object_name", &object_name)); + ITKCALL(AOM_ask_value_string(children_line[ii], "bl_quantity", &bl_quantity)); + char* insertSql1 = (char*)calloc(1024, sizeof(char)); + sprintf(insertSql1, "INSERT INTO BOM_INFOS(puid,cid,quantity,cname) VALUES('%s','%s','%s','%s')", top_id, item_id, bl_quantity, object_name); + printf("Ϊ%s\n", insertSql1); + m_pConnection->Execute(_bstr_t(insertSql1), 0, adCmdText); + insertSql1 = NULL; + DOFREE(insertSql1); + char* insertSql2 = (char*)calloc(1024, sizeof(char)); + sprintf(insertSql2, "INSERT INTO BOM_STRUC(puid,pid,cid) VALUES('%s','%s','%s')", top_id, parent_id, item_id); + printf("Ϊ%s\n", insertSql2); + m_pConnection->Execute(_bstr_t(insertSql2), 0, adCmdText); + insertSql2 = NULL; + DOFREE(insertSql2); + + DOFREE(item_id); + DOFREE(object_name); + DOFREE(bl_quantity); + DOFREE(parent_id); + getBomLinePropertysBom(children_line[ii], top_id, m_pConnection); + } +} \ No newline at end of file diff --git a/zf_itk_c/erp_send_bzgx.cpp b/zf_itk_c/erp_send_bzgx.cpp new file mode 100644 index 0000000..c73ac8d --- /dev/null +++ b/zf_itk_c/erp_send_bzgx.cpp @@ -0,0 +1,232 @@ +#include "kutil.h" +#define debug true +#define ITK_err 919012 +#define TC_SEND_ERP_URL "TC_SEND_ERP_URL" + + +/** +*=============================================================================== +* Copyright (c) 2012-2023 CONNOR Ltd. +* Unpublished - All Rights Reserved +*=============================================================================== +*File description: +* +* erp_send_bzgx.cpp +* +* ݱ׼Ϣ׼BOMԵERP +* +* +*=============================================================================== + DATE Name Description of Change + + 2023-12-19 lijh modify ޸ı׼BOMBUG + 2024-01-03 lijh modify εERP_BZGX_STRUCݲԣڲ֮ǰɾͬid + + +=============================================================================== +*/ + +void addBomLinePropertysBom(tag_t top_line, char* top_id, _ConnectionPtr m_pConnection); +int erp_send_bzgx(EPM_action_message_t msg) { + int ifail = ITK_ok, arg_cnt = 0, att_cnt = 0, bvr_count = 0, count = 0, url_num = 0; + char* arg = NULL, * argflag = NULL, * argvalue = NULL; + char* server_url = NULL; + tag_t* attachments = NULL, task_tag = NULLTAG, rootTask_tag = NULLTAG, bom_window_tag = NULLTAG, * bvr_list = NULLTAG, top_line = NULLTAG; + + ::CoInitialize(NULL); //ʼOLE/COM⻷ + HRESULT hr = NULL; + _ConnectionPtr m_pConnection; // ݿ + _RecordsetPtr m_pRecordset; // + _CommandPtr m_pCommand; // ¼ + WriteLog(debug, "ʼִУݵERP (erp_send_bzgx) ..."); + char* server_address; + int valueNum = 0; + PREF_ask_char_value("TC_SqlServer_Link_ITK", valueNum, &server_address); + if (server_address == NULL) { + EMH_store_error_s1(EMH_severity_error, ITK_err, "δݿ"); + goto end; + } + PREF_ask_char_value(TC_SEND_ERP_URL, url_num, &server_url); + printf("%s\n", server_url); + if (server_url == NULL) { + EMH_store_error_s1(EMH_severity_error, ITK_err, "δýӿڵַ"); + goto end; + } + //õǰڵ + task_tag = msg.task; + if (task_tag == NULLTAG) { + goto end; + } + ITKCALL(ifail = EPM_ask_root_task(task_tag, &rootTask_tag)); + //ȡĿж + ITKCALL(ifail = EPM_ask_attachments(rootTask_tag, EPM_target_attachment, &att_cnt, &attachments)); + if (att_cnt == 0) { + goto end; + } + hr = m_pConnection.CreateInstance(_uuidof(Connection));//Ӷʵ + if (SUCCEEDED(hr)) + { + m_pConnection->ConnectionString = (server_address); + //m_pConnection->ConnectionString = ("Provider = SQLOLEDB.1; Persist Security Info = False; User ID =sa; Password=infodba; Initial Catalog = TC13; Data Source =192.168.188.129"); + //printf("\n==========================================================\n"); + hr = m_pConnection->Open("", "", "", adConnectUnspecified);//ݿ + if (FAILED(hr)) + { + printf("Open Failed!"); + return 1; + } + else + { + for (int i = 0; i < att_cnt; i++) + { + tag_t attachment = attachments[i]; + char* object_type = NULL; + AOM_ask_value_string(attachment, "object_type", &object_type); + if (!isTypeOf(attachment, "ItemRevision")) { + continue; + } + WriteLog(debug, "ʼִ߼\n"); + char* item_id = NULL, * object_name = NULL, * zf6_scphdm = NULL, * zf6_yxxs = NULL, * zf6_bzde = NULL; + //int zf6_sfcg, zf6_sfbzgx, zf6_sfyzgx, zf6_sffj; + //char * zf6_sfcg = NULL, *zf6_sfbzgx = NULL, *zf6_sfyzgx = NULL, *zf6_sffj = NULL; + logical zf6_sfcg, zf6_sfbzgx, zf6_sfyzgx, zf6_sffj; + AOM_ask_value_string(attachment, "item_id", &item_id); + AOM_ask_value_string(attachment, "object_name", &object_name); + AOM_ask_value_string(attachment, "zf6_scphdm", &zf6_scphdm); + AOM_ask_value_string(attachment, "zf6_yxxs", &zf6_yxxs); + AOM_ask_value_string(attachment, "zf6_bzde", &zf6_bzde); + AOM_ask_value_logical(attachment, "zf6_sfcg", &zf6_sfcg); + AOM_ask_value_logical(attachment, "zf6_sfbzgx", &zf6_sfbzgx); + AOM_ask_value_logical(attachment, "zf6_sfyzgx", &zf6_sfyzgx); + AOM_ask_value_logical(attachment, "zf6_sffj", &zf6_sffj); + int one = 0, two = 0, three = 0, four = 0; + if (zf6_sfcg) { + one = 1; + } + if (zf6_sfbzgx) { + two = 1; + } + if (zf6_sfyzgx) { + three = 1; + } + if (zf6_sffj) { + four = 1; + } + //ɾݿ + char* deleteSql1 = (char*)calloc(1024, sizeof(char)); + char* deleteSql2 = (char*)calloc(1024, sizeof(char)); + sprintf(deleteSql1, "delete from ERP_BZGX_TABLE where puid = '%s'", item_id); + m_pConnection->Execute(_bstr_t(deleteSql1), 0, adCmdText); + sprintf(deleteSql2, "delete from ERP_BZGX_TABLE where puid = '%s'", item_id); + m_pConnection->Execute(_bstr_t(deleteSql2), 0, adCmdText); + + //char* uid_value; + //ITK__convert_tag_to_uid(attachments[i], &uid_value); + //printf("UIDΪ%s\n", uid_value); + char* insertSql1 = (char*)calloc(1024, sizeof(char)); + sprintf(insertSql1, "INSERT INTO ERP_BZGX_TABLE(puid,cid,cname,pzf6_scphdm,pzf6_yxxs,pzf6_bzde,pzf6_sfcg,pzf6_sfbzgx,pzf6_sfyzgx,pzf6_sffj,sequence) VALUES('%s','%s','%s','%s','%s','%s',%d,%d,%d,%d,'')", + item_id, item_id, object_name, zf6_scphdm, zf6_yxxs, zf6_bzde, one, two, three, four); + printf("Ϊ%s\n", insertSql1); + m_pConnection->Execute(_bstr_t(insertSql1), 0, adCmdText); + + //20240103 Ӳ֮ǰɾͬpuid + char* deleteSameData = (char*)calloc(1024, sizeof(char)); + sprintf(deleteSameData, "delete from ERP_BZGX_STRUC where puid = '%s'", item_id); + m_pConnection->Execute(_bstr_t(deleteSameData), 0, adCmdText); + + insertSql1 = NULL; + DOFREE(insertSql1); + + char* insertSql2 = (char*)calloc(1024, sizeof(char)); + sprintf(insertSql2, "INSERT INTO ERP_BZGX_STRUC(puid,pid,cid) VALUES('%s','%s','%s')", item_id, "", item_id); + printf("Ϊ%s\n", insertSql2); + m_pConnection->Execute(_bstr_t(insertSql2), 0, adCmdText); + printf("1\n"); + insertSql2 = NULL; + DOFREE(insertSql2); + //׼BOMдݿ + ITEM_rev_list_bom_view_revs(attachments[i], &bvr_count, &bvr_list); + printf("2\n"); + //20231219 ޸ı׼BOMBUG + if (bvr_count == 0) { + printf("--------1-----------\n"); + sendErp(server_url, "ActiveCode", attachment, item_id); + continue; + printf("--------2-----------\n"); + } + else { + BOM_create_window(&bom_window_tag); + BOM_set_window_top_line_bvr(bom_window_tag, bvr_list[bvr_count - 1], &top_line); + addBomLinePropertysBom(top_line, item_id, m_pConnection); + sendErp(server_url, "ActiveCode", attachment, item_id); + } + + } + } + + end: + return ifail; + } +} +void addBomLinePropertysBom(tag_t top_line, char* top_id, _ConnectionPtr m_pConnection) { + int count; + tag_t* children_line; + ITKCALL(BOM_line_ask_all_child_lines(top_line, &count, &children_line)); + for (int ii = 0; ii < count; ii++) + { + char* item_id = "", + * object_name = "", + * bl_quantity = "1", + * parent_id = "", + * bl_sequence_no = NULL; + ITKCALL(AOM_ask_value_string(children_line[ii], "bl_item_item_id", &item_id)); + ITKCALL(AOM_ask_value_string(top_line, "bl_item_item_id", &parent_id)); + ITKCALL(AOM_ask_value_string(children_line[ii], "bl_item_object_name", &object_name)); + ITKCALL(AOM_ask_value_string(children_line[ii], "bl_quantity", &bl_quantity)); + tag_t partItemRevision = NULLTAG; + AOM_ask_value_tag(children_line[ii], "bl_line_object", &partItemRevision); + char * zf6_scphdm = NULL, * zf6_yxxs = NULL, * zf6_bzde = NULL; + logical zf6_sfcg, zf6_sfbzgx, zf6_sfyzgx, zf6_sffj; + AOM_ask_value_string(children_line[ii], "bl_sequence_no", &bl_sequence_no); + AOM_ask_value_string(partItemRevision, "zf6_scphdm", &zf6_scphdm); + AOM_ask_value_string(partItemRevision, "zf6_yxxs", &zf6_yxxs); + AOM_ask_value_string(partItemRevision, "zf6_bzde", &zf6_bzde); + AOM_ask_value_logical(partItemRevision, "zf6_sfcg", &zf6_sfcg); + AOM_ask_value_logical(partItemRevision, "zf6_sfbzgx", &zf6_sfbzgx); + AOM_ask_value_logical(partItemRevision, "zf6_sfyzgx", &zf6_sfyzgx); + AOM_ask_value_logical(partItemRevision, "zf6_sffj", &zf6_sffj); + int one = 0, two = 0, three = 0, four = 0; + if (zf6_sfcg) { + one = 1; + } + if (zf6_sfbzgx) { + two = 1; + } + if (zf6_sfyzgx) { + three = 1; + } + if (zf6_sffj) { + four = 1; + } + char* insertSql1 = (char*)calloc(1024, sizeof(char)); + sprintf(insertSql1, "INSERT INTO ERP_BZGX_TABLE(puid,cid,cname,pzf6_scphdm,pzf6_yxxs,pzf6_bzde,pzf6_sfcg,pzf6_sfbzgx,pzf6_sfyzgx,pzf6_sffj,sequence) VALUES('%s','%s','%s','%s','%s','%s',%d,%d,%d,%d,'%s')", + item_id, item_id, object_name, zf6_scphdm, zf6_yxxs, zf6_bzde, one, two, three, four, bl_sequence_no); + printf("Ϊ%s\n", insertSql1); + m_pConnection->Execute(_bstr_t(insertSql1), 0, adCmdText); + insertSql1 = NULL; + DOFREE(insertSql1); + + char* insertSql2 = (char*)calloc(1024, sizeof(char)); + sprintf(insertSql2, "INSERT INTO ERP_BZGX_STRUC (puid,pid,cid) VALUES('%s','%s','%s')", top_id, parent_id, item_id); + printf("Ϊ%s\n", insertSql2); + m_pConnection->Execute(_bstr_t(insertSql2), 0, adCmdText); + insertSql2 = NULL; + DOFREE(insertSql2); + + DOFREE(item_id); + DOFREE(object_name); + DOFREE(bl_quantity); + DOFREE(parent_id); + //addBomLinePropertysBom(children_line[ii], top_id, m_pConnection); + } +} diff --git a/zf_itk_c/erp_send_gx.cpp b/zf_itk_c/erp_send_gx.cpp new file mode 100644 index 0000000..1fc68ba --- /dev/null +++ b/zf_itk_c/erp_send_gx.cpp @@ -0,0 +1,132 @@ +#include "kutil.h" +#define debug true +#define ITK_err 919012 +#define TC_SEND_ERP_URL "TC_SEND_ERP_URL" +int erp_send_gx(EPM_action_message_t msg) { + int ifail = ITK_ok, arg_cnt = 0, att_cnt = 0, bvr_count = 0, count = 0, url_num = 0; + char* arg = NULL, * argflag = NULL, * argvalue = NULL; + char* server_url = NULL; + tag_t* attachments = NULL, task_tag = NULLTAG, rootTask_tag = NULLTAG; + ::CoInitialize(NULL); //ʼOLE/COM⻷ + HRESULT hr = NULL; + _ConnectionPtr m_pConnection; // ݿ + _RecordsetPtr m_pRecordset; // + _CommandPtr m_pCommand; // ¼ + WriteLog(debug, "ʼִУݵERP (erp_send_gx) ..."); + PREF_ask_char_value(TC_SEND_ERP_URL, url_num, &server_url); + printf("%s\n", server_url); + if (server_url == NULL) { + EMH_store_error_s1(EMH_severity_error, ITK_err, "δýӿڵַ"); + goto end; + } + char* server_address; + int valueNum = 0; + PREF_ask_char_value("TC_SqlServer_Link_ITK", valueNum, &server_address); + if (server_address == NULL) { + EMH_store_error_s1(EMH_severity_error, ITK_err, "δݿ"); + goto end; + } + //õǰڵ + task_tag = msg.task; + if (task_tag == NULLTAG) { + goto end; + } + ITKCALL(ifail = EPM_ask_root_task(task_tag, &rootTask_tag)); + //ȡĿж + ITKCALL(ifail = EPM_ask_attachments(rootTask_tag, EPM_target_attachment, &att_cnt, &attachments)); + if (att_cnt == 0) { + goto end; + } + + hr = m_pConnection.CreateInstance(_uuidof(Connection));//Ӷʵ + if (SUCCEEDED(hr)) + { + m_pConnection->ConnectionString = (server_address); + hr = m_pConnection->Open("", "", "", adConnectUnspecified);//ݿ + } + if (FAILED(hr)) + { + printf("Open Failed!"); + return 1; + } + else + { + for (int i = 0; i < att_cnt; i++) + { + tag_t attachment = attachments[i]; + char* object_type = NULL; + AOM_ask_value_string(attachment, "object_type", &object_type); + if (!isTypeOf(attachment, "ItemRevision") || strcmp("ZF6_GXRevision", object_type) != 0) { + continue; + } + char* item_id; + AOM_ask_value_string(attachment, "item_id", &item_id); + //ȡʹõϼ϶ + //˵󣬲ϼ飬ϼ + int n_parents = 0, * levels; + tag_t* parents; + PS_where_used_all(attachment, PS_where_used_all_levels, &n_parents, &levels, &parents); + char* gylx_id = ""; + for (int k = 0; k < n_parents; k++) + { + char* type; + AOM_ask_value_string(parents[k], "object_type", &type); + if (strcmp("ZF6_GYLXRevision", type) == 0) { + //AOM_ask_value_string(parents[k], "item_id", &gylx_id); + POM_tag_to_uid(parents[k], &gylx_id); + break; + } + } + //ֵERP_GYFA_TABLE + char* pzf6_bzde = "", + * pzf6_scphdm = "", + pzf6_sfbzgx[12] = { 0 }, + pzf6_sfcg[12] = { 0 }, + pzf6_sffj[12] = { 0 }, + pzf6_sfyzgx[12] = { 0 }, + * pzf6_yxxs = ""; + ITKCALL(AOM_ask_value_string(attachment, "zf6_bzde", &pzf6_bzde)); + ITKCALL(AOM_ask_value_string(attachment, "zf6_scphdm", &pzf6_scphdm)); + ITKCALL(AOM_ask_value_string(attachment, "zf6_yxxs", &pzf6_yxxs)); + logical zf6_sfbzgx, zf6_sfcg, zf6_sffj, zf6_sfyzgx; + ITKCALL(AOM_ask_value_logical(attachment, "zf6_sfbzgx", &zf6_sfbzgx)); + ITKCALL(AOM_ask_value_logical(attachment, "zf6_sffj", &zf6_sffj)); + ITKCALL(AOM_ask_value_logical(attachment, "zf6_sfyzgx", &zf6_sfyzgx)); + ITKCALL(AOM_ask_value_logical(attachment, "zf6_sfcg", &zf6_sfcg)); + if (zf6_sfbzgx) { + strcat(pzf6_sfbzgx, "1"); + } + else { + strcat(pzf6_sfbzgx, "0"); + } + if (zf6_sffj) { + strcat(pzf6_sffj, "1"); + } + else { + strcat(pzf6_sffj, "0"); + } + if (zf6_sfyzgx) { + strcat(pzf6_sfyzgx, "1"); + } + else { + strcat(pzf6_sfyzgx, "0"); + } + if (zf6_sfcg) { + strcat(pzf6_sfcg, "1"); + } + else { + strcat(pzf6_sfcg, "0"); + } + char* updateSql2 = (char*)calloc(1024, sizeof(char)); + sprintf(updateSql2,"UPDATE ERP_GYFA_TABLE SET pzf6_bzde = '%s',pzf6_scphdm = '%s', pzf6_sfbzgx = '%s', pzf6_sfcg = '%s', pzf6_sffj = '%s', pzf6_sfyzgx = '%s', pzf6_yxxs = '%s', where sid = '%s' and pitem_id = '%s'" + , pzf6_bzde, pzf6_scphdm, pzf6_sfbzgx, pzf6_sfcg, pzf6_sffj, pzf6_sfyzgx, pzf6_yxxs, gylx_id, item_id); + printf("Ϊ%s\n", updateSql2); + m_pConnection->Execute(_bstr_t(updateSql2), 0, adCmdText); + updateSql2 = NULL; + DOFREE(updateSql2); + sendErpVersion(server_url, "ActiveCode", attachment, item_id); + } + } +end: + return ifail; +} \ No newline at end of file diff --git a/zf_itk_c/erp_send_gylx.cpp b/zf_itk_c/erp_send_gylx.cpp new file mode 100644 index 0000000..a1e0273 --- /dev/null +++ b/zf_itk_c/erp_send_gylx.cpp @@ -0,0 +1,350 @@ +#include "kutil.h" +#include "connor_itk_util.h" +#define debug true +#define ITK_err 919012 +#define TC_SEND_ERP_URL "TC_SEND_ERP_URL" +void putBomLinePropertysBom(tag_t top_line, char* top_id, _ConnectionPtr m_pConnection, char* top_name, char* pid, char* pname, tag_t top_rev); +int erp_send_gylx(EPM_action_message_t msg) { + + + char* log_file = NULL; + + printf("־ļ\n"); + char* TO_SRM = (char*)malloc(sizeof("erp_send_gylx")); + strcpy(TO_SRM, "erp_send_gylx"); + CreateLogFile(TO_SRM, &log_file); + + + int ifail = ITK_ok, arg_cnt = 0, arg_cnt1 = 0, att_cnt = 0, bvr_count = 0, count = 0, url_num = 0; + char* arg = NULL, *arg1 = NULL,* argflag = NULL, * argvalue = NULL; + char* server_url = NULL; + tag_t* attachments = NULL, task_tag = NULLTAG, rootTask_tag = NULLTAG, bom_window_tag = NULLTAG, * bvr_list = NULLTAG, top_line = NULLTAG; + + ::CoInitialize(NULL); //ʼOLE/COM⻷ + HRESULT hr = NULL; + _ConnectionPtr m_pConnection; // ݿ + _RecordsetPtr m_pRecordset; // + _CommandPtr m_pCommand; // ¼ + WriteLog(debug, "ʼִУݵERP (erp_send_bzgx) ..."); + char* server_address; + int valueNum = 0; + PREF_ask_char_value("TC_SqlServer_Link_ITK", valueNum, &server_address); + if (server_address == NULL) { + EMH_store_error_s1(EMH_severity_error, ITK_err, "δݿ"); + goto end; + } + PREF_ask_char_value(TC_SEND_ERP_URL, url_num, &server_url); + printf("%s\n", server_url); + if (server_url == NULL) { + EMH_store_error_s1(EMH_severity_error, ITK_err, "δýӿڵַ"); + goto end; + } + //õǰڵ + task_tag = msg.task; + if (task_tag == NULLTAG) { + goto end; + } + ITKCALL(ifail = EPM_ask_root_task(task_tag, &rootTask_tag)); + //ȡ̲ + char* getType = ""; + arg_cnt1 = TC_number_of_arguments(msg.arguments); + if (arg_cnt1 > 0) { + for (int j = 0; j < arg_cnt1; j++) { + arg1 = TC_next_argument(msg.arguments); + char* argflag1, * argvalue1; + ITKCALL(ITK_ask_argument_named_value((const char*)arg1, &argflag1, &argvalue1)); + if (strcmp(argflag1, "sub_include_type") == 0) { + if (argvalue1 != NULL) + { + WriteLog(debug, "BOMδָ\n"); + //printf("ȡֵ%s:", argvalue1); + WriteLog(debug, "ȡֵ%s\n", argvalue1); + getType = argvalue1; + + } + } + } + } + + + //ȡĿж + ITKCALL(ifail = EPM_ask_attachments(rootTask_tag, EPM_target_attachment, &att_cnt, &attachments)); + if (att_cnt == 0) { + goto end; + } + hr = m_pConnection.CreateInstance(_uuidof(Connection));//Ӷʵ + if (SUCCEEDED(hr)) + { + m_pConnection->ConnectionString = (server_address); + //m_pConnection->ConnectionString = ("Provider = SQLOLEDB.1; Persist Security Info = False; User ID =sa; Password=infodba; Initial Catalog = TC13; Data Source =192.168.188.129"); + //printf("\n==========================================================\n"); + hr = m_pConnection->Open("", "", "", adConnectUnspecified);//ݿ + if (FAILED(hr)) + { + printf("Open Failed!"); + return 1; + } + else + { + for (int i = 0; i < att_cnt; i++) + { + tag_t attachment = attachments[i]; + char* object_type = NULL; + AOM_ask_value_string(attachment, "object_type", &object_type); + if (!isTypeOf(attachment, "ItemRevision") || strcmp("ZF6_GYLXRevision", object_type) != 0) { + continue; + } + WriteLog(debug, "ʼִ߼\n"); + char* item_id = NULL, * object_name, * pid = "", * pname = ""; + //AOM_ask_value_string(attachment, "item_id", &item_id); + POM_tag_to_uid(attachment, &item_id); + AOM_ask_value_string(attachment, "object_name", &object_name); + //ȡõϼ϶ + //˵󣬲ϼ飬ϼ飬õĹϵ + int iCount = 0, * iRetLevels; + tag_t* tag_temp; + char** sRelationNames = NULL; + //жϱʶ + bool flag = false; + WSOM_where_referenced2(attachment, 1, &iCount, &iRetLevels, &tag_temp, &sRelationNames); + //ѹ·ߺͶдݿ + for (int k = 0; k < iCount; k++) + { + char* type; + AOM_ask_value_string(tag_temp[k], "object_type", &type); + if (strcmp("ZF6_LBJRevision", type) == 0 || strcmp("ZF6_YRRevision", type) == 0 || strcmp("ZF6_YCLRevision", type) == 0) { + AOM_ask_value_string(tag_temp[k], "item_id", &pid); + AOM_ask_value_string(tag_temp[k], "object_name", &pname); + flag = true; + break; + } + } + //жǷ + if (!flag) { + EMH_store_error_s1(EMH_severity_error, EMH_USER_error_base, "δ"); + return -1; + } + //޸ жϵǰǷָ͵type + //BOMWindow + int bomcount; + tag_t top_line = NULLTAG, window = NULLTAG; tag_t* children_line = NULLTAG; + printf("BOMWindow\n"); + ITKCALL(BOM_create_window(&window)); + //öBOM + printf("öBOM\n"); + ITKCALL(BOM_set_window_top_line(window, NULLTAG, attachment, NULLTAG, &top_line)); + ITKCALL(BOM_line_ask_all_child_lines(top_line, &bomcount, &children_line)); + char* object_name1 = ""; + ITKCALL(AOM_ask_value_string(top_line, "bl_item_object_string", &object_name1)); + printf("bomΪ%d\n", bomcount); + if (bomcount == 0) { + string aname = object_name1; + string error = "ǰBOM"+ aname +"Ϊգδָ"; + EMH_store_error_s2(EMH_severity_error, ITK_err, "ʾ", error.c_str()); + return 1; + } + else { + WriteLog(debug, "жϵǰǷָ͵type\n"); + if (strcmp(getType,"")!=0) { + int count; + char* childType; + tag_t* children_line; + //string resultStr = getType; + ITKCALL(BOM_line_ask_all_child_lines(top_line, &count, &children_line)); + for (int j = 0; j < count; j++) { + tag_t child_tag = children_line[j]; + ITKCALL(AOM_ask_value_string(child_tag, "bl_item_object_type", &childType)); + if (strstr(getType, childType) == nullptr) { + char* object_name = ""; + ITKCALL(AOM_ask_value_string(top_line, "bl_item_object_string", &object_name)); + WriteLog(debug, "BOMδָ%s\n", object_name); + string objectname = object_name; + string error = "BOMδָ" + objectname; + EMH_store_error_s2(EMH_severity_error, ITK_err, "ʾ", error.c_str()); + return 1; + } + } + } + + } + + //·дݿ + ITEM_rev_list_bom_view_revs(attachment, &bvr_count, &bvr_list); + BOM_create_window(&bom_window_tag); + BOM_set_window_top_line_bvr(bom_window_tag, bvr_list[bvr_count - 1], &top_line); + + printf("ʼBOM!!\n"); + putBomLinePropertysBom(top_line, item_id, m_pConnection, object_name, pid, pname, attachments[i]); + sendErp(server_url, "CraftCode", attachment, item_id); + + } + } + CloseLog(); + end: + CloseLog(); + return ifail; + } +} +void putBomLinePropertysBom(tag_t top_line, char* top_id, _ConnectionPtr m_pConnection, char* top_name, char* pid, char* pname, tag_t top_rev) { + //· + int num = 0; + logical master; + char** zf6_syb, * localization_statuses; + AOM_UIF_ask_localized_value_strings(top_rev, "zf6_zfsyb", "zh_CN", &num, &zf6_syb, &localization_statuses, &master); + char* zf6_dzxs, + * zf6_gd, + * zf6_gylx1, + * zf6_gylx2, + * zf6_gylx3, + * zf6_gylx4, + * zf6_gylx5; + logical zf6_sfzgy; + char pzf6_sfzgy[12] = { 0 }; + AOM_ask_value_string(top_rev, "zf6_dzxs", &zf6_dzxs); + AOM_ask_value_string(top_rev, "zf6_gd", &zf6_gd); + AOM_ask_value_string(top_rev, "zf6_gylx1", &zf6_gylx1); + AOM_ask_value_string(top_rev, "zf6_gylx2", &zf6_gylx2); + AOM_ask_value_string(top_rev, "zf6_gylx3", &zf6_gylx3); + AOM_ask_value_string(top_rev, "zf6_gylx4", &zf6_gylx4); + AOM_ask_value_string(top_rev, "zf6_gylx5", &zf6_gylx5); + ITKCALL(AOM_ask_value_logical(top_rev, "zf6_sfzgy", &zf6_sfzgy)); + if (zf6_sfzgy) { + strcat(pzf6_sfzgy, "1"); + } + else { + strcat(pzf6_sfzgy, "0"); + } + int count; + tag_t* children_line, child_rev_tag; + ITKCALL(BOM_line_ask_all_child_lines(top_line, &count, &children_line)); + for (int ii = 0; ii < count; ii++) + { + char* item_id = "", + * object_name = "", + * bl_sequence_no = "", + * parent_id = "", + * parent_name = "", + * product_line = "", + * erpID = "", + * object_type = ""; + int sequence_no = 0; + ITKCALL(AOM_ask_value_string(children_line[ii], "bl_item_item_id", &item_id)); + //ITKCALL(AOM_ask_value_string(top_line, "bl_item_item_id", &parent_id)); + POM_tag_to_uid(top_rev, &parent_id); + ITKCALL(AOM_ask_value_string(top_line, "bl_rev_object_name", &parent_name)); + ITKCALL(AOM_ask_value_string(children_line[ii], "bl_item_object_name", &object_name)); + ITKCALL(AOM_ask_value_string(children_line[ii], "bl_sequence_no", &bl_sequence_no)); + sequence_no = atoi(bl_sequence_no); + ITKCALL(AOM_ask_value_string(children_line[ii], "bl_item_object_type", &object_type)); + ITKCALL(AOM_ask_value_tag(children_line[ii], "bl_line_object", &child_rev_tag)); + char* pzf6_bzde = "", + * pzf6_scphdm = "", + pzf6_sfbzgx[12] = { 0 }, + pzf6_sfcg[12] = { 0 }, + pzf6_sffj[12] = { 0 }, + pzf6_sfyzgx[12] = { 0 }, + * pzf6_yxxs = ""; + + ITKCALL(AOM_ask_value_string(child_rev_tag, "zf6_bzde", &pzf6_bzde)); + ITKCALL(AOM_ask_value_string(child_rev_tag, "zf6_scphdm", &pzf6_scphdm)); + ITKCALL(AOM_ask_value_string(child_rev_tag, "zf6_yxxs", &pzf6_yxxs)); + + logical zf6_sfbzgx, zf6_sfcg, zf6_sffj, zf6_sfyzgx; + ITKCALL(AOM_ask_value_logical(child_rev_tag, "zf6_sfbzgx", &zf6_sfbzgx)); + ITKCALL(AOM_ask_value_logical(child_rev_tag, "zf6_sffj", &zf6_sffj)); + ITKCALL(AOM_ask_value_logical(child_rev_tag, "zf6_sfyzgx", &zf6_sfyzgx)); + ITKCALL(AOM_ask_value_logical(child_rev_tag, "zf6_sfcg", &zf6_sfcg)); + if (zf6_sfbzgx) { + strcat(pzf6_sfbzgx, "1"); + } + else { + strcat(pzf6_sfbzgx, "0"); + } + if (zf6_sffj) { + strcat(pzf6_sffj, "1"); + } + else { + strcat(pzf6_sffj, "0"); + } + if (zf6_sfyzgx) { + strcat(pzf6_sfyzgx, "1"); + } + else { + strcat(pzf6_sfyzgx, "0"); + } + if (zf6_sfcg) { + strcat(pzf6_sfcg, "1"); + } + else { + strcat(pzf6_sfcg, "0"); + } + + if (strcmp("ZF6_GX", object_type) == 0) { + int line_count = 0; + tag_t* product_children_line; + ITKCALL(BOM_line_ask_all_child_lines(children_line[ii], &line_count, &product_children_line)); + if (line_count == 1) { + tag_t product_tag; char* product_type; + ITKCALL(AOM_ask_value_tag(product_children_line[0], "bl_line_object", &product_tag)); + ITKCALL(AOM_ask_value_string(product_tag, "object_type", &product_type)); + if (strcmp("ZF6_SCXRevision", product_type) == 0) { + ITKCALL(AOM_ask_value_string(product_tag, "zf6_erpid", &erpID)); + ITKCALL(AOM_ask_value_string(product_tag, "object_name", &product_line)); + } + } + } + //ɾݿ + char* deleteSql1 = (char*)calloc(1024, sizeof(char)); + char* deleteSql2 = (char*)calloc(1024, sizeof(char)); + char* deleteSql3 = (char*)calloc(1024, sizeof(char)); + sprintf(deleteSql1, "delete from ERP_GYLX_TABLE where pid = '%s' and cid='%s'", parent_id, item_id); + m_pConnection->Execute(_bstr_t(deleteSql1), 0, adCmdText); + //sprintf(deleteSql2, "delete from ERP_GYFA_TABLE where sid = '%s' and pitem_id='%s'", top_id, item_id); + sprintf(deleteSql2, "delete from ERP_GYFA_TABLE where pitem_id='%s'", item_id);//20231016ɾֻitem_idж + m_pConnection->Execute(_bstr_t(deleteSql2), 0, adCmdText); + //20240521 ͨpid + pzf6_zfsyb+pobject_name + sidɾ + sprintf(deleteSql3, "delete from ERP_GYFA_TABLE where pid='%s' and pzf6_zfsyb='%s' and pitem_id='%s' and sid='%s'", pid, zf6_syb[0], item_id,top_id); + m_pConnection->Execute(_bstr_t(deleteSql3), 0, adCmdText); + + printf("дݵݿ\n"); + char* insertSql1 = (char*)calloc(1024, sizeof(char)); + sprintf(insertSql1, "INSERT INTO ERP_GYLX_TABLE(pid,pname,cid,cname,sequence,erpID,product_line) VALUES('%s','%s','%s','%s',%d,'%s','%s')", + parent_id, parent_name, item_id, object_name, sequence_no, erpID, product_line); + printf("Ϊ%s\n", insertSql1); + m_pConnection->Execute(_bstr_t(insertSql1), 0, adCmdText); + WriteLog1("ERP_GYLX_TABLEݣ%s\n", insertSql1); + insertSql1 = NULL; + DOFREE(insertSql1); + //, [pitem_id] + //, [pobject_name] + // , [pzf6_bzde] + // , [pzf6_scphdm] + // , [pzf6_sfbzgx] + // , [pzf6_sfcg] + // , [pzf6_sffj] + // , [pzf6_sfyzgx] + // , [pzf6_yxxs] + + char* insertSql2 = (char*)calloc(1024, sizeof(char)); + sprintf(insertSql2, "INSERT INTO ERP_GYFA_TABLE(sid,sname,pid,pname,pitem_id,pobject_name,pzf6_bzde,pzf6_scphdm,pzf6_sfbzgx,pzf6_sfcg,pzf6_sffj,pzf6_sfyzgx,pzf6_yxxs,pzf6_dzxs,pzf6_zfsyb,pzf6_gd,pzf6_gylx1,pzf6_gylx2,pzf6_gylx3,pzf6_gylx4,pzf6_gylx5,pzf6_sfzgy) VALUES('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')" + , top_id, top_name, pid, pname, item_id, object_name, pzf6_bzde, pzf6_scphdm, pzf6_sfbzgx, pzf6_sfcg, pzf6_sffj, pzf6_sfyzgx, pzf6_yxxs + , zf6_dzxs, zf6_syb[0], zf6_gd, zf6_gylx1, zf6_gylx2, zf6_gylx3, zf6_gylx4, zf6_gylx5, pzf6_sfzgy); + printf("Ϊ%s\n", insertSql2); + m_pConnection->Execute(_bstr_t(insertSql2), 0, adCmdText); + WriteLog1("ERP_GYFA_TABLEݣ%s\n", insertSql2); + //ɾʷ + char* deleteSql4 = (char*)calloc(1024, sizeof(char)); + sprintf(deleteSql4, "delete from ERP_GYFA_TABLE where pid='%s' and pzf6_zfsyb='%s' and sid !='%s'", pid, zf6_syb[0],top_id); + m_pConnection->Execute(_bstr_t(deleteSql4), 0, adCmdText); + + + insertSql2 = NULL; + DOFREE(insertSql2); + DOFREE(item_id); + DOFREE(object_name); + DOFREE(bl_sequence_no); + DOFREE(parent_id); + DOFREE(parent_name); + //putBomLinePropertysBom(children_line[ii], top_id, m_pConnection); + } +} diff --git a/zf_itk_c/erp_send_part.cpp b/zf_itk_c/erp_send_part.cpp new file mode 100644 index 0000000..914abd8 --- /dev/null +++ b/zf_itk_c/erp_send_part.cpp @@ -0,0 +1,98 @@ +#include "kutil.h" +#define debug true +#define ITK_err 919012 +#define TC_SEND_ERP_URL "TC_SEND_ERP_URL" + + +int erp_send_part(EPM_action_message_t msg) { + int ifail = ITK_ok, arg_cnt = 0, att_cnt = 0, bvr_count = 0, count = 0,url_num = 0; + char* arg = NULL, * argflag = NULL, * argvalue = NULL; + char* server_url = NULL; + tag_t* attachments = NULL, task_tag = NULLTAG, rootTask_tag = NULLTAG; + string type; + vector types; + WriteLog(debug, "ʼִУݵERP (erp_send_part) ..."); + arg_cnt = TC_number_of_arguments(msg.arguments); + if (arg_cnt > 0) { + for (int i = 0; i < arg_cnt; i++) { + arg = TC_next_argument(msg.arguments); + ITKCALL(ifail = ITK_ask_argument_named_value(arg, &argflag, &argvalue)); + if (strcmp(argflag, "type") == 0) { + type.assign(argvalue); + } + MEM_free(argflag); + MEM_free(argvalue); + } + } + else { + EMH_store_error_s1(EMH_severity_error, ITK_err, "δ̲"); + ifail = 1; + goto end; + } + { + Split(type, ",", types); + if (types.size() == 0) { + EMH_store_error_s1(EMH_severity_error, ITK_err, "δ̲-type"); + goto end; + } + } + //PREF_ask_char_value("TC_SqlServer_Link_ITK", address_num, &server_address); + PREF_ask_char_value(TC_SEND_ERP_URL, url_num, &server_url); + printf("%s\n", server_url); + if (server_url == NULL) { + EMH_store_error_s1(EMH_severity_error, ITK_err, "δýӿڵַ"); + goto end; + } + + //õǰڵ + task_tag = msg.task; + if (task_tag == NULLTAG) { + goto end; + } + ITKCALL(ifail = EPM_ask_root_task(task_tag, &rootTask_tag)); + //ȡĿж + ITKCALL(ifail = EPM_ask_attachments(rootTask_tag, EPM_target_attachment, &att_cnt, &attachments)); + if (att_cnt == 0) { + goto end; + } + for (int i = 0; i < att_cnt; i++) + { + tag_t attachment = attachments[i]; + for each (string type in types) + { + if (!isTypeOf(attachment, type.c_str())) + { + continue; + } + char* item_id; + AOM_ask_value_string(attachment,"item_id",&item_id); + sendErpVersion(server_url, "ProductCode", attachment, item_id); + //CURL* curl; + //CURLcode res; + //curl = curl_easy_init(); + //if (curl) { + // char* string_value = (char*)calloc(1024, sizeof(char)); + // string uuid = getUUid(); + // sprintf(string_value, "%s/api/Send?SysNo=PLM&BillType=%s&BillOp=%s&BillNo=%s&MsgUid=%s", server_url,"ProductCode", "Edit", item_id, uuid.c_str()); + // //printf("%s\n", string_value); + // std::cout << string_value << "\n"; + // curl_easy_setopt(curl, CURLOPT_URL, string_value); + // res = curl_easy_perform(curl); + + // if (CURLE_OK == res) { + // char* ct; + // /* ask for the content-type */ + // res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct); + + // if ((CURLE_OK == res) && ct) + // printf("We received Content-Type: %s\n", ct); + // } + // /* always cleanup */ + // curl_easy_cleanup(curl); + //} + } + } +end: + + return ifail; +} \ No newline at end of file diff --git a/zf_itk_c/handlers.h b/zf_itk_c/handlers.h new file mode 100644 index 0000000..7130278 --- /dev/null +++ b/zf_itk_c/handlers.h @@ -0,0 +1,14 @@ +#pragma once + +#include + +int erp_send_part(EPM_action_message_t msg); +int erp_send_bom(EPM_action_message_t msg); +int erp_send_gx(EPM_action_message_t msg); +int erp_send_bzgx(EPM_action_message_t msg); +int erp_send_gylx(EPM_action_message_t msg); +int ZF_SendPartToERP(EPM_action_message_t msg); +int ZF_SendPartBOMToERP(EPM_action_message_t msg); +int ZF_SendGYLXToERP(EPM_action_message_t msg); +int ZF_SendBZGXToERP(EPM_action_message_t msg); +int connor_set_prop_value(void* returnValue); \ No newline at end of file diff --git a/zf_itk_c/kutil.cpp b/zf_itk_c/kutil.cpp new file mode 100644 index 0000000..1b895f7 --- /dev/null +++ b/zf_itk_c/kutil.cpp @@ -0,0 +1,439 @@ +#pragma warning (disable: 4996) +#include "kutil.h" +#include +#include +#include +#include +#include +#include +#include +using namespace std::chrono; +using namespace Teamcenter::Logging; +using Teamcenter::Main::logger; + +extern "C" int POM_AM__set_application_bypass(logical bypass); +#define MAX_PATH_LENGTH 200 +#define MAX_PRINTLINE_LENGTH 400000 + + +Logger* klog = NULL; + + + +string GbkToUtf8(const char* src_str) { + int len = MultiByteToWideChar(CP_ACP, 0, src_str, -1, NULL, 0); + wchar_t* wstr = new wchar_t[len + 1]; + memset(wstr, 0, len + 1); + MultiByteToWideChar(CP_ACP, 0, src_str, -1, wstr, len); + len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL); + char* str = new char[len + 1]; + memset(str, 0, len + 1); + WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, len, NULL, NULL); + string strTemp = str; + if (wstr) delete[] wstr; + if (str) delete[] str; + return strTemp; +} +int WriteToFile(FILE* file, const char* text) +{ + if (!file) { + return ITK_ok; + } + va_list arg; + char* time_str = getTime(); + fprintf(file, "[%s] - %s\r\n", time_str, text); + fflush(file); + free(time_str); + return ITK_ok; +} + +int getCurrentMilliSeconds() { + unsigned __int64 now = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + std::cout << now << std::endl; + return now % 1000; +} + +char* getTime() { + time_t now; + struct tm* p; + char date_string[30]; + time(&now); + //logFile = NULL; + //current_time(&status_now); + p = localtime(&now); + memset(date_string, 0, sizeof(date_string)); + sprintf(date_string, "%4d-%02d-%02d %02d:%02d:%02d", 1900 + p->tm_year, p->tm_mon + 1, p->tm_mday, p->tm_hour, p->tm_min, p->tm_sec); + char* dateC = (char*)malloc(sizeof(char) * (strlen(date_string) + 1)); + strcpy(dateC, date_string); + return dateC; +} + +int ReportError(logical is_utf8, int err_code, const char* format, ...) +{ + va_list arg; + char tmp[8000]; + memset(tmp, 0, sizeof(tmp)); + va_start(arg, format); + vsprintf(tmp, format, arg); + va_end(arg); + if (is_utf8) { + printf("%s\n", G2U(tmp)); + ITKCALL(EMH_store_error_s1(EMH_severity_error, err_code, G2U(tmp))); + } + else { + printf("%s\n", tmp); + ITKCALL(EMH_store_error_s1(EMH_severity_error, err_code, tmp)); + } + return err_code; +} + +void StartLog(string str) { + klog = Logger::getLogger(str); +} + +void CloseLog() { + if (klog) { + klog = NULL; + } +} + +int Log(IFail ex) { + cout << ex.getMessage() << endl; + cout << "error " << ex.ifail() << endl; + if (klog) { + klog->error(ex.ifail(), ex.getMessage()); + } + return ex.ifail(); +} + +void Log(const char* format, ...) +{ + va_list arg; + char tmp[8000]; + memset(tmp, 0, sizeof(tmp)); + va_start(arg, format); + vsprintf(tmp, format, arg); + va_end(arg); + cout << tmp << endl; + if (klog) { + klog->info(tmp); + } + //TC_write_syslog(format); +} + +void set_bypass(logical bypass) +{ + POM_AM__set_application_bypass(bypass); +} + +void Split(string strArg, string spliter, vector& ans) +{ + ans.clear(); + size_t index0 = 0; + string one_arg; + if (strArg.find_first_not_of(' ') == string::npos) + strArg = ""; + int len = spliter.size(); + while (strArg.size() > 0) + { + index0 = strArg.find(spliter); + if (index0 != string::npos) + { + one_arg = strArg.substr(0, index0); + strArg = strArg.substr(index0 + len); + ans.push_back(one_arg); + if (strArg.size() == 0) { + ans.push_back(strArg); + } + } + else + { + ans.push_back(strArg); + break; + } + } +} + +logical inArray(vector types, string type) { + int len = types.size(); + for (int i = 0; i < len; i++) { + if (strcmp(types[i].c_str(), type.c_str()) == 0) { + return true; + } + } + return false; +} + +string trim(const string& str) +{ + size_t first = str.find_first_not_of(' '); + if (string::npos == first) + { + return str; + } + size_t last = str.find_last_not_of(' '); + string res = str.substr(first, (last - first + 1)); + last = res.find("\n"); + if (last == res.size() - 1) { + res = res.substr(0, res.size() - 1); + } + last = res.find("\r"); + if (last == res.size() - 1) { + res = res.substr(0, res.size() - 1); + } + return res; +} + +char* U2G(const char* utf8) +{ + int len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0); + wchar_t* wstr = new wchar_t[len + 1]; + memset(wstr, 0, len + 1); + MultiByteToWideChar(CP_UTF8, 0, utf8, -1, wstr, len); + len = WideCharToMultiByte(CP_ACP, 0, wstr, -1, NULL, 0, NULL, NULL); + char* str = new char[len + 1]; + memset(str, 0, len + 1); + WideCharToMultiByte(CP_ACP, 0, wstr, -1, str, len, NULL, NULL); + if (wstr) delete[] wstr; + return str; +} + + + +char* G2U(const char* gb2312) +{ + int len = MultiByteToWideChar(CP_ACP, 0, gb2312, -1, NULL, 0); + wchar_t* wstr = new wchar_t[len + 1]; + memset(wstr, 0, len + 1); + MultiByteToWideChar(CP_ACP, 0, gb2312, -1, wstr, len); + len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL); + char* str = new char[len + 1]; + memset(str, 0, len + 1); + WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, len, NULL, NULL); + if (wstr) delete[] wstr; + return str; +} +void WriteLog(logical debug, const char* format, ...) +{ + va_list arg; + char tmp[MAX_PRINTLINE_LENGTH]; + char date_string[MAX_PATH_LENGTH]; + time_t now; + struct tm* p; + + //get the message + memset(tmp, 0, sizeof(tmp)); + va_start(arg, format); + vsprintf(tmp, format, arg); + va_end(arg); + //----------print to command window for trace--------// + //printf("%s\n", tmp); + printf("%s\n", tmp); + //print message to log file + TC_write_syslog("%s\n", tmp); +} +/* + 判断对象objtag是否属于type_name类型 +*/ +bool isTypeOf(tag_t objtag, const char* type_name) { + tag_t type = NULLTAG; + TCTYPE_ask_object_type(objtag, &type); + tag_t item_type = NULLTAG; + TCTYPE_find_type(type_name, "", &item_type); + bool is_type = false; + if (item_type != NULLTAG) { + logical isok = FALSE; + TCTYPE_is_type_of(type, item_type, &isok); + if (isok) { + is_type = true; + } + } + return is_type; +} + +std::string GuidToString(const GUID& guid) +{ + char buf[64] = { 0 }; + sprintf_s(buf, sizeof(buf), + "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", + guid.Data1, guid.Data2, guid.Data3, + guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], + guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]); + return std::string(buf); +} +string getUUid() +{ + char buffer[64] = { 0 }; + GUID guid; + + if (CoCreateGuid(&guid)) + { + fprintf(stderr, "create guid error\n"); + return ""; + } + //_snprintf(buffer, sizeof(buffer), "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", guid.Data1, guid.Data2, guid.Data3, + // guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]); + sprintf_s(buffer, sizeof(buffer), + "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", + guid.Data1, guid.Data2, guid.Data3, + guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], + guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]); + + return buffer; +} + +char* substring(char* dst, const char* src, int start, int len) +{ + char* p = dst; + const char* q = src; + int length = strlen(src); + if (start >= length || start < 0) + return NULL; + if (len > length) + len = length - start; + q += start; + while (len--) + { + *(p++) = *(q++); + } + *(p++) = '\0'; + return dst; +} +std::string urlEncode(const std::string& value) { + std::ostringstream escaped; + escaped.fill('0'); + escaped << std::hex; + for (auto&& c : value) { + // 将不需要进行编码的字符直接添加到结果中 + if (isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~') { + escaped << c; + } + // 对其它字符进行编码 + else { + escaped << '%' << std::setw(2) << int((unsigned char)c); + } + } + return escaped.str(); +} +void sendErp(char *server_url,char * send_type,tag_t rev,char *item_id) { + CURL* curl; + CURLcode res; + curl = curl_easy_init(); + printf("111\n"); + if (curl) { + char* string_value = (char*)calloc(1024, sizeof(char)); + string uuid = getUUid(); + //判断是新增,修改还是废弃 + string send_way; + int status_list_cnt = 0; + tag_t* status_tag; + char* status_obj_name; + printf("222\n"); + ITKCALL(AOM_ask_value_tags(rev, "release_status_list", &status_list_cnt, &status_tag)); + if (status_list_cnt > 0) + { + printf("333\n"); + ITKCALL(AOM_ask_value_string(status_tag[status_list_cnt - 1], "object_name", &status_obj_name)); + printf("当前对象的状态为:%s\n", status_obj_name); + if (strcmp(status_obj_name, "TCM 已发布") == 0 || strcmp(status_obj_name, "TCM Released") == 0) + { + send_way.append("Edit"); + } + else if(strcmp(status_obj_name, "Obsolete") == 0) + { + send_way.append("Close"); + } + } + else + { + + send_way.append("Add"); + printf("444\n"); + } + string changeValue = GbkToUtf8(item_id); + printf("555\n"); + std::string encodedValue = urlEncode(changeValue); + printf("666\n"); + sprintf(string_value, "%s/api/Send?SysNo=PLM&BillType=%s&BillOp=%s&BillNo=%s&MsgUid=%s", server_url, send_type , send_way.c_str(), encodedValue.c_str(), uuid.c_str()); + printf("发送数据:%s\n", string_value); + //printf("%s\n", string_value); + std::cout << string_value << "\n"; + //修改 2023 7 3 hcj + //string changeValue = GbkToUtf8(string_value); + // printf("转为utf-8发送数据:%s\n", changeValue.c_str()); + curl_easy_setopt(curl, CURLOPT_URL, string_value); + + res = curl_easy_perform(curl); + + if (CURLE_OK == res) { + char* ct; + /* ask for the content-type */ + res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct); + if ((CURLE_OK == res) && ct) + printf("We received Content-Type: %s\n", ct); + } + /* always cleanup */ + curl_easy_cleanup(curl); + } +} + +//增加版本判断 不是A版本就是 +void sendErpVersion(char* server_url, char* send_type, tag_t rev, char* item_id) { + CURL* curl; + CURLcode res; + curl = curl_easy_init(); + if (curl) { + char* string_value = (char*)calloc(1024, sizeof(char)); + string uuid = getUUid(); + //判断是新增,修改还是废弃 + string send_way; + int status_list_cnt = 0; + tag_t* status_tag; + char* status_obj_name; + char* item_revision_id; + AOM_ask_value_string(rev, "item_revision_id", &item_revision_id); + ITKCALL(AOM_ask_value_tags(rev, "release_status_list", &status_list_cnt, &status_tag)); + if (status_list_cnt > 0) + { + ITKCALL(AOM_ask_value_string(status_tag[status_list_cnt - 1], "object_name", &status_obj_name)); + printf("当前对象的状态为:%s\n", status_obj_name); + if (strcmp(status_obj_name, "TCM 已发布") == 0 || strcmp(status_obj_name, "TCM Released") == 0) + { + send_way.append("Edit"); + } + else if (strcmp(status_obj_name, "Obsolete") == 0) + { + send_way.append("Close"); + } + } + else if (strcmp(item_revision_id, "A") != 0) { + send_way.append("Edit"); + } + else + { + send_way.append("Add"); + } + string changeValue = GbkToUtf8(item_id); + std::string encodedValue = urlEncode(changeValue); + sprintf(string_value, "%s/api/Send?SysNo=PLM&BillType=%s&BillOp=%s&BillNo=%s&MsgUid=%s", server_url, send_type, send_way.c_str(), encodedValue.c_str(), uuid.c_str()); + printf("发送数据:%s\n", string_value); + //printf("%s\n", string_value); + std::cout << string_value << "\n"; + //修改 2023 7 3 hcj + //string changeValue = GbkToUtf8(string_value); + // printf("转为utf-8发送数据:%s\n", changeValue.c_str()); + curl_easy_setopt(curl, CURLOPT_URL, string_value); + + res = curl_easy_perform(curl); + + if (CURLE_OK == res) { + char* ct; + /* ask for the content-type */ + res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct); + if ((CURLE_OK == res) && ct) + printf("We received Content-Type: %s\n", ct); + } + /* always cleanup */ + curl_easy_cleanup(curl); + } +} diff --git a/zf_itk_c/kutil.h b/zf_itk_c/kutil.h new file mode 100644 index 0000000..6b99009 --- /dev/null +++ b/zf_itk_c/kutil.h @@ -0,0 +1,50 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#import "C:\Program Files\Common Files\System\ado\msado15.dll" no_namespace rename("EOF","adoEOF")rename("BOF","adoBOF") +#include +#include +#include +#include +using namespace std; + +#define DOFREE(obj) \ + { \ + if(obj) \ + { \ + MEM_free(obj); \ + obj = NULL; \ + } \ + } +char* getTime(); +int getCurrentMilliSeconds(); +string trim(const string& str); +int ReportError(logical is_utf8, int err_code, const char* format, ...); +void StartLog(string str); +void Log(const char* format, ...); +int Log(IFail ex); +void CloseLog(); +void set_bypass(logical bypass); +char* G2U(const char* gb2312); +char* U2G(const char* utf8); +void Split(string strArg, string spliter, vector& ans); +logical inArray(vector types, string type); +void WriteLog(logical debug, const char* format, ...); +bool isTypeOf(tag_t objtag, const char* type_name); +std::string GuidToString(const GUID& guid); +string getUUid(); +char* substring(char* dst, const char* src, int start, int len); +void sendErp(char* server_url, char* send_type, tag_t rev, char* item_id); +void sendErpVersion(char* server_url, char* send_type, tag_t rev, char* item_id); \ No newline at end of file diff --git a/zf_itk_c/test.cpp b/zf_itk_c/test.cpp new file mode 100644 index 0000000..a8f9135 --- /dev/null +++ b/zf_itk_c/test.cpp @@ -0,0 +1,71 @@ +#include +#include +#include +using namespace libxl; + +int main() { + // ʼ Excel ļ֧ xls xlsx ָʽ + Book* book = xlCreateBook(); + if (!book) { + std::cerr << "Failed to create Excel book object" << std::endl; + return 1; + } + + // Excel ļ˴ģļΪ template.xlsx + if (!book->load(_T("C:\\Users\\Administrator\\Desktop\\嵥ģ.xlsx"))) { + std::cerr << "Failed to load Excel file: " << book->errorMessage() << std::endl; + book->release(); + return 1; + } + + // ȡһ0ʼ + Sheet* sheet = book->getSheet(0); + if (!sheet) { + std::cerr << "Worksheet not found" << std::endl; + book->release(); + return 1; + } + + // е + const int rowStart = sheet->firstRow(); + const int rowEnd = sheet->lastRow(); + const int colStart = sheet->firstCol(); + const int colEnd = sheet->lastCol(); + + std::cout << "Reading Excel data (" + << (rowEnd - rowStart + 1) << " rows, " + << (colEnd - colStart + 1) << " columns):\n"; + + // жȡ + for (int row = rowStart; row <= rowEnd; ++row) { + std::cout << "Row " << row << ": "; + for (int col = colStart; col <= colEnd; ++col) { + // ݵԪͶȡ + CellType cellType = sheet->cellType(row, col); + switch (cellType) { + case CELLTYPE_STRING: + std::cout << "[" << sheet->readStr(row, col) << "] "; + break; + case CELLTYPE_NUMBER: + std::cout << sheet->readNum(row, col) << " "; + break; + case CELLTYPE_BOOLEAN: + std::cout << std::boolalpha << sheet->readBool(row, col) << " "; + break; + case CELLTYPE_BLANK: + std::cout << "(blank) "; + break; + case CELLTYPE_ERROR: + std::cout << "(error) "; + break; + default: + std::cout << "(unknown) "; + } + } + std::cout << "\n"; + } + + // ͷԴ + book->release(); + return 0; +} \ No newline at end of file diff --git a/zf_itk_c/x64/Debug/vc143.idb b/zf_itk_c/x64/Debug/vc143.idb new file mode 100644 index 0000000..bcc1856 Binary files /dev/null and b/zf_itk_c/x64/Debug/vc143.idb differ diff --git a/zf_itk_c/x64/Debug/vc143.pdb b/zf_itk_c/x64/Debug/vc143.pdb new file mode 100644 index 0000000..0ce6429 Binary files /dev/null and b/zf_itk_c/x64/Debug/vc143.pdb differ diff --git a/zf_itk_c/x64/Debug/zf_itk_c.Build.CppClean.log b/zf_itk_c/x64/Debug/zf_itk_c.Build.CppClean.log new file mode 100644 index 0000000..035ef98 --- /dev/null +++ b/zf_itk_c/x64/Debug/zf_itk_c.Build.CppClean.log @@ -0,0 +1,3 @@ +c:\users\何家乐\desktop\itk-master0612\itk-master\itk\zf_itk_c\zf_itk_c\x64\debug\vc143.idb +c:\users\何家乐\desktop\itk-master0612\itk-master\itk\zf_itk_c\zf_itk_c\x64\debug\vc143.pdb +c:\users\何家乐\desktop\itk-master0612\itk-master\itk\zf_itk_c\zf_itk_c\x64\debug\zf_itk_c.tlog\cl.command.1.tlog diff --git a/zf_itk_c/x64/Debug/zf_itk_c.log b/zf_itk_c/x64/Debug/zf_itk_c.log new file mode 100644 index 0000000..298e693 --- /dev/null +++ b/zf_itk_c/x64/Debug/zf_itk_c.log @@ -0,0 +1,15 @@ + erp_send_bom.cpp +C:\Users\何家乐\Desktop\ITK-master0612\ITK-master\itk\zf_itk_c\zf_itk_c\kutil.h(1,10): fatal error C1083: 无法打开包括文件: “tc\tc_macros.h”: No such file or directory + erp_send_bzgx.cpp +C:\Users\何家乐\Desktop\ITK-master0612\ITK-master\itk\zf_itk_c\zf_itk_c\kutil.h(1,10): fatal error C1083: 无法打开包括文件: “tc\tc_macros.h”: No such file or directory + erp_send_gx.cpp +C:\Users\何家乐\Desktop\ITK-master0612\ITK-master\itk\zf_itk_c\zf_itk_c\kutil.h(1,10): fatal error C1083: 无法打开包括文件: “tc\tc_macros.h”: No such file or directory + erp_send_gylx.cpp +C:\Users\何家乐\Desktop\ITK-master0612\ITK-master\itk\zf_itk_c\zf_itk_c\kutil.h(1,10): fatal error C1083: 无法打开包括文件: “tc\tc_macros.h”: No such file or directory + kutil.cpp +C:\Users\何家乐\Desktop\ITK-master0612\ITK-master\itk\zf_itk_c\zf_itk_c\kutil.h(1,10): fatal error C1083: 无法打开包括文件: “tc\tc_macros.h”: No such file or directory + zf_itk_c.cpp +C:\Users\何家乐\Desktop\ITK-master0612\ITK-master\itk\zf_itk_c\zf_itk_c\zf_itk_c.cpp(1,10): fatal error C1083: 无法打开包括文件: “server_exits/user_server_exits.h”: No such file or directory + erp_send_part.cpp +C:\Users\何家乐\Desktop\ITK-master0612\ITK-master\itk\zf_itk_c\zf_itk_c\kutil.h(1,10): fatal error C1083: 无法打开包括文件: “tc\tc_macros.h”: No such file or directory + 正在生成代码... diff --git a/zf_itk_c/x64/Debug/zf_itk_c.tlog/CL.command.1.tlog b/zf_itk_c/x64/Debug/zf_itk_c.tlog/CL.command.1.tlog new file mode 100644 index 0000000..11acb73 Binary files /dev/null and b/zf_itk_c/x64/Debug/zf_itk_c.tlog/CL.command.1.tlog differ diff --git a/zf_itk_c/x64/Debug/zf_itk_c.tlog/unsuccessfulbuild b/zf_itk_c/x64/Debug/zf_itk_c.tlog/unsuccessfulbuild new file mode 100644 index 0000000..e69de29 diff --git a/zf_itk_c/x64/Debug/zf_itk_c.tlog/zf_itk_c.lastbuildstate b/zf_itk_c/x64/Debug/zf_itk_c.tlog/zf_itk_c.lastbuildstate new file mode 100644 index 0000000..c5e8891 --- /dev/null +++ b/zf_itk_c/x64/Debug/zf_itk_c.tlog/zf_itk_c.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.36.32532:TargetPlatformVersion=10.0.19041.0: +Debug|x64|C:\Users\何家乐\Desktop\ITK-master0612\ITK-master\itk\zf_itk_c\| diff --git a/zf_itk_c/x64/Debug/zf_itk_c.vcxproj.FileListAbsolute.txt b/zf_itk_c/x64/Debug/zf_itk_c.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..e69de29 diff --git a/zf_itk_c/x64/Release/ZF_SendBZGXToERP.obj b/zf_itk_c/x64/Release/ZF_SendBZGXToERP.obj new file mode 100644 index 0000000..38989c7 Binary files /dev/null and b/zf_itk_c/x64/Release/ZF_SendBZGXToERP.obj differ diff --git a/zf_itk_c/x64/Release/ZF_SendGYLXToERP.obj b/zf_itk_c/x64/Release/ZF_SendGYLXToERP.obj new file mode 100644 index 0000000..25f0062 Binary files /dev/null and b/zf_itk_c/x64/Release/ZF_SendGYLXToERP.obj differ diff --git a/zf_itk_c/x64/Release/ZF_SendPart.obj b/zf_itk_c/x64/Release/ZF_SendPart.obj new file mode 100644 index 0000000..75e082a Binary files /dev/null and b/zf_itk_c/x64/Release/ZF_SendPart.obj differ diff --git a/zf_itk_c/x64/Release/ZF_SendPartBOMToERP.obj b/zf_itk_c/x64/Release/ZF_SendPartBOMToERP.obj new file mode 100644 index 0000000..ae58338 Binary files /dev/null and b/zf_itk_c/x64/Release/ZF_SendPartBOMToERP.obj differ diff --git a/zf_itk_c/x64/Release/ZF_SendPartToERP.obj b/zf_itk_c/x64/Release/ZF_SendPartToERP.obj new file mode 100644 index 0000000..e79ee22 Binary files /dev/null and b/zf_itk_c/x64/Release/ZF_SendPartToERP.obj differ diff --git a/zf_itk_c/x64/Release/connor_itk_util.obj b/zf_itk_c/x64/Release/connor_itk_util.obj new file mode 100644 index 0000000..1bc6cf1 Binary files /dev/null and b/zf_itk_c/x64/Release/connor_itk_util.obj differ diff --git a/zf_itk_c/x64/Release/connor_set_prop_value.obj b/zf_itk_c/x64/Release/connor_set_prop_value.obj new file mode 100644 index 0000000..651a399 Binary files /dev/null and b/zf_itk_c/x64/Release/connor_set_prop_value.obj differ diff --git a/zf_itk_c/x64/Release/erp_send_bom.obj b/zf_itk_c/x64/Release/erp_send_bom.obj new file mode 100644 index 0000000..c3f0082 Binary files /dev/null and b/zf_itk_c/x64/Release/erp_send_bom.obj differ diff --git a/zf_itk_c/x64/Release/erp_send_bzgx.obj b/zf_itk_c/x64/Release/erp_send_bzgx.obj new file mode 100644 index 0000000..0c79150 Binary files /dev/null and b/zf_itk_c/x64/Release/erp_send_bzgx.obj differ diff --git a/zf_itk_c/x64/Release/erp_send_gx.obj b/zf_itk_c/x64/Release/erp_send_gx.obj new file mode 100644 index 0000000..031c604 Binary files /dev/null and b/zf_itk_c/x64/Release/erp_send_gx.obj differ diff --git a/zf_itk_c/x64/Release/erp_send_gylx.obj b/zf_itk_c/x64/Release/erp_send_gylx.obj new file mode 100644 index 0000000..cd7f066 Binary files /dev/null and b/zf_itk_c/x64/Release/erp_send_gylx.obj differ diff --git a/zf_itk_c/x64/Release/erp_send_part.obj b/zf_itk_c/x64/Release/erp_send_part.obj new file mode 100644 index 0000000..dee05aa Binary files /dev/null and b/zf_itk_c/x64/Release/erp_send_part.obj differ diff --git a/zf_itk_c/x64/Release/kutil.obj b/zf_itk_c/x64/Release/kutil.obj new file mode 100644 index 0000000..5382952 Binary files /dev/null and b/zf_itk_c/x64/Release/kutil.obj differ diff --git a/zf_itk_c/x64/Release/msado15.tlh b/zf_itk_c/x64/Release/msado15.tlh new file mode 100644 index 0000000..7659c4f --- /dev/null +++ b/zf_itk_c/x64/Release/msado15.tlh @@ -0,0 +1,5027 @@ +// Created by Microsoft (R) C/C++ Compiler Version 14.29.30157.0 (1009eea2). +// +// E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\Release\msado15.tlh +// +// C++ source equivalent of type library C:\Program Files\Common Files\System\ado\msado15.dll +// compiler-generated file created 04/14/25 at 13:16:58 - DO NOT EDIT! + +#pragma once +#pragma pack(push, 8) + +#include + +// +// Forward references and typedefs +// + +struct __declspec(uuid("b691e011-1797-432e-907a-4d8c69339129")) +/* LIBID */ __ADODB; +enum CursorTypeEnum; +enum CursorOptionEnum; +enum LockTypeEnum; +enum ExecuteOptionEnum; +enum ConnectOptionEnum; +enum ObjectStateEnum; +enum CursorLocationEnum; +enum DataTypeEnum; +enum FieldAttributeEnum; +enum EditModeEnum; +enum RecordStatusEnum; +enum GetRowsOptionEnum; +enum PositionEnum; +enum BookmarkEnum; +enum MarshalOptionsEnum; +enum AffectEnum; +enum ResyncEnum; +enum CompareEnum; +enum FilterGroupEnum; +enum SearchDirectionEnum; +enum PersistFormatEnum; +enum StringFormatEnum; +enum ConnectPromptEnum; +enum ConnectModeEnum; +enum RecordCreateOptionsEnum; +enum RecordOpenOptionsEnum; +enum IsolationLevelEnum; +enum XactAttributeEnum; +enum PropertyAttributesEnum; +enum ErrorValueEnum; +enum ParameterAttributesEnum; +enum ParameterDirectionEnum; +enum CommandTypeEnum; +enum EventStatusEnum; +enum EventReasonEnum; +enum SchemaEnum; +enum FieldStatusEnum; +enum SeekEnum; +enum ADCPROP_UPDATECRITERIA_ENUM; +enum ADCPROP_ASYNCTHREADPRIORITY_ENUM; +enum ADCPROP_AUTORECALC_ENUM; +enum ADCPROP_UPDATERESYNC_ENUM; +enum MoveRecordOptionsEnum; +enum CopyRecordOptionsEnum; +enum StreamTypeEnum; +enum LineSeparatorEnum; +enum StreamOpenOptionsEnum; +enum StreamWriteEnum; +enum SaveOptionsEnum; +enum FieldEnum; +enum StreamReadEnum; +enum RecordTypeEnum; +struct __declspec(uuid("00000512-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ _Collection; +struct __declspec(uuid("00000513-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ _DynaCollection; +struct __declspec(uuid("00000534-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ _ADO; +struct __declspec(uuid("00000504-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Properties; +struct __declspec(uuid("00000503-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Property; +struct __declspec(uuid("00000500-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Error; +struct __declspec(uuid("00000501-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Errors; +struct __declspec(uuid("00001508-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Command15; +struct __declspec(uuid("00001550-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ _Connection; +struct __declspec(uuid("00001515-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Connection15; +struct __declspec(uuid("00001556-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ _Recordset; +struct __declspec(uuid("00001555-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Recordset21; +struct __declspec(uuid("0000154f-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Recordset20; +struct __declspec(uuid("0000150e-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Recordset15; +struct __declspec(uuid("00001564-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Fields; +struct __declspec(uuid("0000154d-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Fields20; +struct __declspec(uuid("00001506-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Fields15; +struct __declspec(uuid("00001569-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Field; +struct __declspec(uuid("0000154c-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Field20; +struct __declspec(uuid("0000150c-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ _Parameter; +struct __declspec(uuid("0000150d-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Parameters; +struct __declspec(uuid("0000154e-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Command25; +struct __declspec(uuid("986761e8-7269-4890-aa65-ad7c03697a6d")) +/* dual interface */ _Command; +struct __declspec(uuid("00001402-0000-0010-8000-00aa006d2ea4")) +/* interface */ ConnectionEventsVt; +struct __declspec(uuid("00001403-0000-0010-8000-00aa006d2ea4")) +/* interface */ RecordsetEventsVt; +struct __declspec(uuid("00001400-0000-0010-8000-00aa006d2ea4")) +/* dispinterface */ ConnectionEvents; +struct __declspec(uuid("00001266-0000-0010-8000-00aa006d2ea4")) +/* dispinterface */ RecordsetEvents; +struct __declspec(uuid("00000516-0000-0010-8000-00aa006d2ea4")) +/* interface */ ADOConnectionConstruction15; +struct __declspec(uuid("00000551-0000-0010-8000-00aa006d2ea4")) +/* interface */ ADOConnectionConstruction; +struct /* coclass */ Connection; +struct __declspec(uuid("00001562-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ _Record; +struct /* coclass */ Record; +struct __declspec(uuid("00001565-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ _Stream; +struct /* coclass */ Stream; +struct __declspec(uuid("00000567-0000-0010-8000-00aa006d2ea4")) +/* interface */ ADORecordConstruction; +struct __declspec(uuid("00000568-0000-0010-8000-00aa006d2ea4")) +/* interface */ ADOStreamConstruction; +struct __declspec(uuid("00000517-0000-0010-8000-00aa006d2ea4")) +/* interface */ ADOCommandConstruction; +struct /* coclass */ Command; +struct /* coclass */ Recordset; +struct __declspec(uuid("00000283-0000-0010-8000-00aa006d2ea4")) +/* interface */ ADORecordsetConstruction; +struct __declspec(uuid("00001505-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Field15; +struct /* coclass */ Parameter; +struct __declspec(uuid("00000402-0000-0010-8000-00aa006d2ea4")) +/* interface */ ConnectionEventsVt_Deprecated; +struct __declspec(uuid("00000550-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ _Connection_Deprecated; +struct __declspec(uuid("00000515-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Connection15_Deprecated; +struct __declspec(uuid("00000556-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ _Recordset_Deprecated; +struct __declspec(uuid("00000555-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Recordset21_Deprecated; +struct __declspec(uuid("0000054f-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Recordset20_Deprecated; +struct __declspec(uuid("0000050e-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Recordset15_Deprecated; +struct __declspec(uuid("00000564-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Fields_Deprecated; +struct __declspec(uuid("0000054d-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Fields20_Deprecated; +struct __declspec(uuid("00000506-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Fields15_Deprecated; +struct __declspec(uuid("00000569-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Field_Deprecated; +struct __declspec(uuid("0000054c-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Field20_Deprecated; +struct __declspec(uuid("b08400bd-f9d1-4d02-b856-71d5dba123e9")) +/* dual interface */ _Command_Deprecated; +struct __declspec(uuid("0000054e-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Command25_Deprecated; +struct __declspec(uuid("00000508-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Command15_Deprecated; +struct __declspec(uuid("0000050c-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ _Parameter_Deprecated; +struct __declspec(uuid("0000050d-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Parameters_Deprecated; +struct __declspec(uuid("00000403-0000-0010-8000-00aa006d2ea4")) +/* interface */ RecordsetEventsVt_Deprecated; +struct __declspec(uuid("00000400-0000-0010-8000-00aa006d2ea4")) +/* dispinterface */ ConnectionEvents_Deprecated; +struct __declspec(uuid("00000266-0000-0010-8000-00aa006d2ea4")) +/* dispinterface */ RecordsetEvents_Deprecated; +struct __declspec(uuid("00000562-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ _Record_Deprecated; +struct __declspec(uuid("00000565-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ _Stream_Deprecated; +struct __declspec(uuid("00000505-0000-0010-8000-00aa006d2ea4")) +/* dual interface */ Field15_Deprecated; +typedef __int64 PositionEnum_Param; +typedef enum SearchDirectionEnum SearchDirection; +typedef __int64 ADO_LONGPTR; + +// +// Smart pointer typedef declarations +// + +_COM_SMARTPTR_TYPEDEF(_Collection, __uuidof(_Collection)); +_COM_SMARTPTR_TYPEDEF(_DynaCollection, __uuidof(_DynaCollection)); +_COM_SMARTPTR_TYPEDEF(Property, __uuidof(Property)); +_COM_SMARTPTR_TYPEDEF(Properties, __uuidof(Properties)); +_COM_SMARTPTR_TYPEDEF(_ADO, __uuidof(_ADO)); +_COM_SMARTPTR_TYPEDEF(Error, __uuidof(Error)); +_COM_SMARTPTR_TYPEDEF(Errors, __uuidof(Errors)); +_COM_SMARTPTR_TYPEDEF(Field20, __uuidof(Field20)); +_COM_SMARTPTR_TYPEDEF(Field, __uuidof(Field)); +_COM_SMARTPTR_TYPEDEF(Fields15, __uuidof(Fields15)); +_COM_SMARTPTR_TYPEDEF(Fields20, __uuidof(Fields20)); +_COM_SMARTPTR_TYPEDEF(Fields, __uuidof(Fields)); +_COM_SMARTPTR_TYPEDEF(_Parameter, __uuidof(_Parameter)); +_COM_SMARTPTR_TYPEDEF(Parameters, __uuidof(Parameters)); +_COM_SMARTPTR_TYPEDEF(ConnectionEvents, __uuidof(ConnectionEvents)); +_COM_SMARTPTR_TYPEDEF(RecordsetEvents, __uuidof(RecordsetEvents)); +_COM_SMARTPTR_TYPEDEF(ADOConnectionConstruction15, __uuidof(ADOConnectionConstruction15)); +_COM_SMARTPTR_TYPEDEF(ADOConnectionConstruction, __uuidof(ADOConnectionConstruction)); +_COM_SMARTPTR_TYPEDEF(_Stream, __uuidof(_Stream)); +_COM_SMARTPTR_TYPEDEF(ADORecordConstruction, __uuidof(ADORecordConstruction)); +_COM_SMARTPTR_TYPEDEF(ADOStreamConstruction, __uuidof(ADOStreamConstruction)); +_COM_SMARTPTR_TYPEDEF(ADOCommandConstruction, __uuidof(ADOCommandConstruction)); +_COM_SMARTPTR_TYPEDEF(ADORecordsetConstruction, __uuidof(ADORecordsetConstruction)); +_COM_SMARTPTR_TYPEDEF(Field15, __uuidof(Field15)); +_COM_SMARTPTR_TYPEDEF(Field20_Deprecated, __uuidof(Field20_Deprecated)); +_COM_SMARTPTR_TYPEDEF(Field_Deprecated, __uuidof(Field_Deprecated)); +_COM_SMARTPTR_TYPEDEF(Fields15_Deprecated, __uuidof(Fields15_Deprecated)); +_COM_SMARTPTR_TYPEDEF(Fields20_Deprecated, __uuidof(Fields20_Deprecated)); +_COM_SMARTPTR_TYPEDEF(Fields_Deprecated, __uuidof(Fields_Deprecated)); +_COM_SMARTPTR_TYPEDEF(_Parameter_Deprecated, __uuidof(_Parameter_Deprecated)); +_COM_SMARTPTR_TYPEDEF(Parameters_Deprecated, __uuidof(Parameters_Deprecated)); +_COM_SMARTPTR_TYPEDEF(ConnectionEvents_Deprecated, __uuidof(ConnectionEvents_Deprecated)); +_COM_SMARTPTR_TYPEDEF(RecordsetEvents_Deprecated, __uuidof(RecordsetEvents_Deprecated)); +_COM_SMARTPTR_TYPEDEF(_Stream_Deprecated, __uuidof(_Stream_Deprecated)); +_COM_SMARTPTR_TYPEDEF(Field15_Deprecated, __uuidof(Field15_Deprecated)); +_COM_SMARTPTR_TYPEDEF(Command15, __uuidof(Command15)); +_COM_SMARTPTR_TYPEDEF(Command25, __uuidof(Command25)); +_COM_SMARTPTR_TYPEDEF(_Command, __uuidof(_Command)); +_COM_SMARTPTR_TYPEDEF(Connection15, __uuidof(Connection15)); +_COM_SMARTPTR_TYPEDEF(_Connection, __uuidof(_Connection)); +_COM_SMARTPTR_TYPEDEF(Recordset15, __uuidof(Recordset15)); +_COM_SMARTPTR_TYPEDEF(Recordset20, __uuidof(Recordset20)); +_COM_SMARTPTR_TYPEDEF(Recordset21, __uuidof(Recordset21)); +_COM_SMARTPTR_TYPEDEF(_Recordset, __uuidof(_Recordset)); +_COM_SMARTPTR_TYPEDEF(ConnectionEventsVt, __uuidof(ConnectionEventsVt)); +_COM_SMARTPTR_TYPEDEF(RecordsetEventsVt, __uuidof(RecordsetEventsVt)); +_COM_SMARTPTR_TYPEDEF(_Record, __uuidof(_Record)); +_COM_SMARTPTR_TYPEDEF(ConnectionEventsVt_Deprecated, __uuidof(ConnectionEventsVt_Deprecated)); +_COM_SMARTPTR_TYPEDEF(Connection15_Deprecated, __uuidof(Connection15_Deprecated)); +_COM_SMARTPTR_TYPEDEF(_Connection_Deprecated, __uuidof(_Connection_Deprecated)); +_COM_SMARTPTR_TYPEDEF(Recordset15_Deprecated, __uuidof(Recordset15_Deprecated)); +_COM_SMARTPTR_TYPEDEF(Recordset20_Deprecated, __uuidof(Recordset20_Deprecated)); +_COM_SMARTPTR_TYPEDEF(Recordset21_Deprecated, __uuidof(Recordset21_Deprecated)); +_COM_SMARTPTR_TYPEDEF(_Recordset_Deprecated, __uuidof(_Recordset_Deprecated)); +_COM_SMARTPTR_TYPEDEF(Command15_Deprecated, __uuidof(Command15_Deprecated)); +_COM_SMARTPTR_TYPEDEF(Command25_Deprecated, __uuidof(Command25_Deprecated)); +_COM_SMARTPTR_TYPEDEF(_Command_Deprecated, __uuidof(_Command_Deprecated)); +_COM_SMARTPTR_TYPEDEF(RecordsetEventsVt_Deprecated, __uuidof(RecordsetEventsVt_Deprecated)); +_COM_SMARTPTR_TYPEDEF(_Record_Deprecated, __uuidof(_Record_Deprecated)); + +// +// Type library items +// + +enum __declspec(uuid("0000051b-0000-0010-8000-00aa006d2ea4")) +CursorTypeEnum +{ + adOpenUnspecified = -1, + adOpenForwardOnly = 0, + adOpenKeyset = 1, + adOpenDynamic = 2, + adOpenStatic = 3 +}; + +enum __declspec(uuid("0000051c-0000-0010-8000-00aa006d2ea4")) +CursorOptionEnum +{ + adHoldRecords = 256, + adMovePrevious = 512, + adAddNew = 16778240, + adDelete = 16779264, + adUpdate = 16809984, + adBookmark = 8192, + adApproxPosition = 16384, + adUpdateBatch = 65536, + adResync = 131072, + adNotify = 262144, + adFind = 524288, + adSeek = 4194304, + adIndex = 8388608 +}; + +enum __declspec(uuid("0000051d-0000-0010-8000-00aa006d2ea4")) +LockTypeEnum +{ + adLockUnspecified = -1, + adLockReadOnly = 1, + adLockPessimistic = 2, + adLockOptimistic = 3, + adLockBatchOptimistic = 4 +}; + +enum __declspec(uuid("0000051e-0000-0010-8000-00aa006d2ea4")) +ExecuteOptionEnum +{ + adOptionUnspecified = -1, + adAsyncExecute = 16, + adAsyncFetch = 32, + adAsyncFetchNonBlocking = 64, + adExecuteNoRecords = 128, + adExecuteStream = 1024, + adExecuteRecord = 2048 +}; + +enum __declspec(uuid("00000541-0000-0010-8000-00aa006d2ea4")) +ConnectOptionEnum +{ + adConnectUnspecified = -1, + adAsyncConnect = 16 +}; + +enum __declspec(uuid("00000532-0000-0010-8000-00aa006d2ea4")) +ObjectStateEnum +{ + adStateClosed = 0, + adStateOpen = 1, + adStateConnecting = 2, + adStateExecuting = 4, + adStateFetching = 8 +}; + +enum __declspec(uuid("0000052f-0000-0010-8000-00aa006d2ea4")) +CursorLocationEnum +{ + adUseNone = 1, + adUseServer = 2, + adUseClient = 3, + adUseClientBatch = 3 +}; + +enum __declspec(uuid("0000051f-0000-0010-8000-00aa006d2ea4")) +DataTypeEnum +{ + adEmpty = 0, + adTinyInt = 16, + adSmallInt = 2, + adInteger = 3, + adBigInt = 20, + adUnsignedTinyInt = 17, + adUnsignedSmallInt = 18, + adUnsignedInt = 19, + adUnsignedBigInt = 21, + adSingle = 4, + adDouble = 5, + adCurrency = 6, + adDecimal = 14, + adNumeric = 131, + adBoolean = 11, + adError = 10, + adUserDefined = 132, + adVariant = 12, + adIDispatch = 9, + adIUnknown = 13, + adGUID = 72, + adDate = 7, + adDBDate = 133, + adDBTime = 134, + adDBTimeStamp = 135, + adBSTR = 8, + adChar = 129, + adVarChar = 200, + adLongVarChar = 201, + adWChar = 130, + adVarWChar = 202, + adLongVarWChar = 203, + adBinary = 128, + adVarBinary = 204, + adLongVarBinary = 205, + adChapter = 136, + adFileTime = 64, + adPropVariant = 138, + adVarNumeric = 139, + adArray = 8192 +}; + +enum __declspec(uuid("00000525-0000-0010-8000-00aa006d2ea4")) +FieldAttributeEnum +{ + adFldUnspecified = -1, + adFldMayDefer = 2, + adFldUpdatable = 4, + adFldUnknownUpdatable = 8, + adFldFixed = 16, + adFldIsNullable = 32, + adFldMayBeNull = 64, + adFldLong = 128, + adFldRowID = 256, + adFldRowVersion = 512, + adFldCacheDeferred = 4096, + adFldIsChapter = 8192, + adFldNegativeScale = 16384, + adFldKeyColumn = 32768, + adFldIsRowURL = 65536, + adFldIsDefaultStream = 131072, + adFldIsCollection = 262144 +}; + +enum __declspec(uuid("00000526-0000-0010-8000-00aa006d2ea4")) +EditModeEnum +{ + adEditNone = 0, + adEditInProgress = 1, + adEditAdd = 2, + adEditDelete = 4 +}; + +enum __declspec(uuid("00000527-0000-0010-8000-00aa006d2ea4")) +RecordStatusEnum +{ + adRecOK = 0, + adRecNew = 1, + adRecModified = 2, + adRecDeleted = 4, + adRecUnmodified = 8, + adRecInvalid = 16, + adRecMultipleChanges = 64, + adRecPendingChanges = 128, + adRecCanceled = 256, + adRecCantRelease = 1024, + adRecConcurrencyViolation = 2048, + adRecIntegrityViolation = 4096, + adRecMaxChangesExceeded = 8192, + adRecObjectOpen = 16384, + adRecOutOfMemory = 32768, + adRecPermissionDenied = 65536, + adRecSchemaViolation = 131072, + adRecDBDeleted = 262144 +}; + +enum __declspec(uuid("00000542-0000-0010-8000-00aa006d2ea4")) +GetRowsOptionEnum +{ + adGetRowsRest = -1 +}; + +enum __declspec(uuid("00000528-0000-0010-8000-00aa006d2ea4")) +PositionEnum +{ + adPosUnknown = -1, + adPosBOF = -2, + adPosEOF = -3 +}; + +enum BookmarkEnum +{ + adBookmarkCurrent = 0, + adBookmarkFirst = 1, + adBookmarkLast = 2 +}; + +enum __declspec(uuid("00000540-0000-0010-8000-00aa006d2ea4")) +MarshalOptionsEnum +{ + adMarshalAll = 0, + adMarshalModifiedOnly = 1 +}; + +enum __declspec(uuid("00000543-0000-0010-8000-00aa006d2ea4")) +AffectEnum +{ + adAffectCurrent = 1, + adAffectGroup = 2, + adAffectAll = 3, + adAffectAllChapters = 4 +}; + +enum __declspec(uuid("00000544-0000-0010-8000-00aa006d2ea4")) +ResyncEnum +{ + adResyncUnderlyingValues = 1, + adResyncAllValues = 2 +}; + +enum __declspec(uuid("00000545-0000-0010-8000-00aa006d2ea4")) +CompareEnum +{ + adCompareLessThan = 0, + adCompareEqual = 1, + adCompareGreaterThan = 2, + adCompareNotEqual = 3, + adCompareNotComparable = 4 +}; + +enum __declspec(uuid("00000546-0000-0010-8000-00aa006d2ea4")) +FilterGroupEnum +{ + adFilterNone = 0, + adFilterPendingRecords = 1, + adFilterAffectedRecords = 2, + adFilterFetchedRecords = 3, + adFilterPredicate = 4, + adFilterConflictingRecords = 5 +}; + +enum __declspec(uuid("00000547-0000-0010-8000-00aa006d2ea4")) +SearchDirectionEnum +{ + adSearchForward = 1, + adSearchBackward = -1 +}; + +enum __declspec(uuid("00000548-0000-0010-8000-00aa006d2ea4")) +PersistFormatEnum +{ + adPersistADTG = 0, + adPersistXML = 1 +}; + +enum __declspec(uuid("00000549-0000-0010-8000-00aa006d2ea4")) +StringFormatEnum +{ + adClipString = 2 +}; + +enum __declspec(uuid("00000520-0000-0010-8000-00aa006d2ea4")) +ConnectPromptEnum +{ + adPromptAlways = 1, + adPromptComplete = 2, + adPromptCompleteRequired = 3, + adPromptNever = 4 +}; + +enum __declspec(uuid("00000521-0000-0010-8000-00aa006d2ea4")) +ConnectModeEnum +{ + adModeUnknown = 0, + adModeRead = 1, + adModeWrite = 2, + adModeReadWrite = 3, + adModeShareDenyRead = 4, + adModeShareDenyWrite = 8, + adModeShareExclusive = 12, + adModeShareDenyNone = 16, + adModeRecursive = 4194304 +}; + +enum __declspec(uuid("00000570-0000-0010-8000-00aa006d2ea4")) +RecordCreateOptionsEnum +{ + adCreateCollection = 8192, + adCreateStructDoc = 0x80000000, + adCreateNonCollection = 0, + adOpenIfExists = 33554432, + adCreateOverwrite = 67108864, + adFailIfNotExists = -1 +}; + +enum __declspec(uuid("00000571-0000-0010-8000-00aa006d2ea4")) +RecordOpenOptionsEnum +{ + adOpenRecordUnspecified = -1, + adOpenSource = 8388608, + adOpenOutput = 8388608, + adOpenAsync = 4096, + adDelayFetchStream = 16384, + adDelayFetchFields = 32768, + adOpenExecuteCommand = 65536 +}; + +enum __declspec(uuid("00000523-0000-0010-8000-00aa006d2ea4")) +IsolationLevelEnum +{ + adXactUnspecified = -1, + adXactChaos = 16, + adXactReadUncommitted = 256, + adXactBrowse = 256, + adXactCursorStability = 4096, + adXactReadCommitted = 4096, + adXactRepeatableRead = 65536, + adXactSerializable = 1048576, + adXactIsolated = 1048576 +}; + +enum __declspec(uuid("00000524-0000-0010-8000-00aa006d2ea4")) +XactAttributeEnum +{ + adXactCommitRetaining = 131072, + adXactAbortRetaining = 262144, + adXactAsyncPhaseOne = 524288, + adXactSyncPhaseOne = 1048576 +}; + +enum __declspec(uuid("00000529-0000-0010-8000-00aa006d2ea4")) +PropertyAttributesEnum +{ + adPropNotSupported = 0, + adPropRequired = 1, + adPropOptional = 2, + adPropRead = 512, + adPropWrite = 1024 +}; + +enum __declspec(uuid("0000052a-0000-0010-8000-00aa006d2ea4")) +ErrorValueEnum +{ + adErrProviderFailed = 3000, + adErrInvalidArgument = 3001, + adErrOpeningFile = 3002, + adErrReadFile = 3003, + adErrWriteFile = 3004, + adErrNoCurrentRecord = 3021, + adErrIllegalOperation = 3219, + adErrCantChangeProvider = 3220, + adErrInTransaction = 3246, + adErrFeatureNotAvailable = 3251, + adErrItemNotFound = 3265, + adErrObjectInCollection = 3367, + adErrObjectNotSet = 3420, + adErrDataConversion = 3421, + adErrObjectClosed = 3704, + adErrObjectOpen = 3705, + adErrProviderNotFound = 3706, + adErrBoundToCommand = 3707, + adErrInvalidParamInfo = 3708, + adErrInvalidConnection = 3709, + adErrNotReentrant = 3710, + adErrStillExecuting = 3711, + adErrOperationCancelled = 3712, + adErrStillConnecting = 3713, + adErrInvalidTransaction = 3714, + adErrNotExecuting = 3715, + adErrUnsafeOperation = 3716, + adwrnSecurityDialog = 3717, + adwrnSecurityDialogHeader = 3718, + adErrIntegrityViolation = 3719, + adErrPermissionDenied = 3720, + adErrDataOverflow = 3721, + adErrSchemaViolation = 3722, + adErrSignMismatch = 3723, + adErrCantConvertvalue = 3724, + adErrCantCreate = 3725, + adErrColumnNotOnThisRow = 3726, + adErrURLDoesNotExist = 3727, + adErrTreePermissionDenied = 3728, + adErrInvalidURL = 3729, + adErrResourceLocked = 3730, + adErrResourceExists = 3731, + adErrCannotComplete = 3732, + adErrVolumeNotFound = 3733, + adErrOutOfSpace = 3734, + adErrResourceOutOfScope = 3735, + adErrUnavailable = 3736, + adErrURLNamedRowDoesNotExist = 3737, + adErrDelResOutOfScope = 3738, + adErrPropInvalidColumn = 3739, + adErrPropInvalidOption = 3740, + adErrPropInvalidValue = 3741, + adErrPropConflicting = 3742, + adErrPropNotAllSettable = 3743, + adErrPropNotSet = 3744, + adErrPropNotSettable = 3745, + adErrPropNotSupported = 3746, + adErrCatalogNotSet = 3747, + adErrCantChangeConnection = 3748, + adErrFieldsUpdateFailed = 3749, + adErrDenyNotSupported = 3750, + adErrDenyTypeNotSupported = 3751, + adErrProviderNotSpecified = 3753, + adErrConnectionStringTooLong = 3754 +}; + +enum __declspec(uuid("0000052b-0000-0010-8000-00aa006d2ea4")) +ParameterAttributesEnum +{ + adParamSigned = 16, + adParamNullable = 64, + adParamLong = 128 +}; + +enum __declspec(uuid("0000052c-0000-0010-8000-00aa006d2ea4")) +ParameterDirectionEnum +{ + adParamUnknown = 0, + adParamInput = 1, + adParamOutput = 2, + adParamInputOutput = 3, + adParamReturnValue = 4 +}; + +enum __declspec(uuid("0000052e-0000-0010-8000-00aa006d2ea4")) +CommandTypeEnum +{ + adCmdUnspecified = -1, + adCmdUnknown = 8, + adCmdText = 1, + adCmdTable = 2, + adCmdStoredProc = 4, + adCmdFile = 256, + adCmdTableDirect = 512 +}; + +enum __declspec(uuid("00000530-0000-0010-8000-00aa006d2ea4")) +EventStatusEnum +{ + adStatusOK = 1, + adStatusErrorsOccurred = 2, + adStatusCantDeny = 3, + adStatusCancel = 4, + adStatusUnwantedEvent = 5 +}; + +enum __declspec(uuid("00000531-0000-0010-8000-00aa006d2ea4")) +EventReasonEnum +{ + adRsnAddNew = 1, + adRsnDelete = 2, + adRsnUpdate = 3, + adRsnUndoUpdate = 4, + adRsnUndoAddNew = 5, + adRsnUndoDelete = 6, + adRsnRequery = 7, + adRsnResynch = 8, + adRsnClose = 9, + adRsnMove = 10, + adRsnFirstChange = 11, + adRsnMoveFirst = 12, + adRsnMoveNext = 13, + adRsnMovePrevious = 14, + adRsnMoveLast = 15 +}; + +enum __declspec(uuid("00000533-0000-0010-8000-00aa006d2ea4")) +SchemaEnum +{ + adSchemaProviderSpecific = -1, + adSchemaAsserts = 0, + adSchemaCatalogs = 1, + adSchemaCharacterSets = 2, + adSchemaCollations = 3, + adSchemaColumns = 4, + adSchemaCheckConstraints = 5, + adSchemaConstraintColumnUsage = 6, + adSchemaConstraintTableUsage = 7, + adSchemaKeyColumnUsage = 8, + adSchemaReferentialContraints = 9, + adSchemaReferentialConstraints = 9, + adSchemaTableConstraints = 10, + adSchemaColumnsDomainUsage = 11, + adSchemaIndexes = 12, + adSchemaColumnPrivileges = 13, + adSchemaTablePrivileges = 14, + adSchemaUsagePrivileges = 15, + adSchemaProcedures = 16, + adSchemaSchemata = 17, + adSchemaSQLLanguages = 18, + adSchemaStatistics = 19, + adSchemaTables = 20, + adSchemaTranslations = 21, + adSchemaProviderTypes = 22, + adSchemaViews = 23, + adSchemaViewColumnUsage = 24, + adSchemaViewTableUsage = 25, + adSchemaProcedureParameters = 26, + adSchemaForeignKeys = 27, + adSchemaPrimaryKeys = 28, + adSchemaProcedureColumns = 29, + adSchemaDBInfoKeywords = 30, + adSchemaDBInfoLiterals = 31, + adSchemaCubes = 32, + adSchemaDimensions = 33, + adSchemaHierarchies = 34, + adSchemaLevels = 35, + adSchemaMeasures = 36, + adSchemaProperties = 37, + adSchemaMembers = 38, + adSchemaTrustees = 39, + adSchemaFunctions = 40, + adSchemaActions = 41, + adSchemaCommands = 42, + adSchemaSets = 43 +}; + +enum __declspec(uuid("0000057e-0000-0010-8000-00aa006d2ea4")) +FieldStatusEnum +{ + adFieldOK = 0, + adFieldCantConvertValue = 2, + adFieldIsNull = 3, + adFieldTruncated = 4, + adFieldSignMismatch = 5, + adFieldDataOverflow = 6, + adFieldCantCreate = 7, + adFieldUnavailable = 8, + adFieldPermissionDenied = 9, + adFieldIntegrityViolation = 10, + adFieldSchemaViolation = 11, + adFieldBadStatus = 12, + adFieldDefault = 13, + adFieldIgnore = 15, + adFieldDoesNotExist = 16, + adFieldInvalidURL = 17, + adFieldResourceLocked = 18, + adFieldResourceExists = 19, + adFieldCannotComplete = 20, + adFieldVolumeNotFound = 21, + adFieldOutOfSpace = 22, + adFieldCannotDeleteSource = 23, + adFieldReadOnly = 24, + adFieldResourceOutOfScope = 25, + adFieldAlreadyExists = 26, + adFieldPendingInsert = 65536, + adFieldPendingDelete = 131072, + adFieldPendingChange = 262144, + adFieldPendingUnknown = 524288, + adFieldPendingUnknownDelete = 1048576 +}; + +enum __declspec(uuid("00000552-0000-0010-8000-00aa006d2ea4")) +SeekEnum +{ + adSeekFirstEQ = 1, + adSeekLastEQ = 2, + adSeekAfterEQ = 4, + adSeekAfter = 8, + adSeekBeforeEQ = 16, + adSeekBefore = 32 +}; + +enum __declspec(uuid("0000054a-0000-0010-8000-00aa006d2ea4")) +ADCPROP_UPDATECRITERIA_ENUM +{ + adCriteriaKey = 0, + adCriteriaAllCols = 1, + adCriteriaUpdCols = 2, + adCriteriaTimeStamp = 3 +}; + +enum __declspec(uuid("0000054b-0000-0010-8000-00aa006d2ea4")) +ADCPROP_ASYNCTHREADPRIORITY_ENUM +{ + adPriorityLowest = 1, + adPriorityBelowNormal = 2, + adPriorityNormal = 3, + adPriorityAboveNormal = 4, + adPriorityHighest = 5 +}; + +enum __declspec(uuid("00000554-0000-0010-8000-00aa006d2ea4")) +ADCPROP_AUTORECALC_ENUM +{ + adRecalcUpFront = 0, + adRecalcAlways = 1 +}; + +enum __declspec(uuid("00000553-0000-0010-8000-00aa006d2ea4")) +ADCPROP_UPDATERESYNC_ENUM +{ + adResyncNone = 0, + adResyncAutoIncrement = 1, + adResyncConflicts = 2, + adResyncUpdates = 4, + adResyncInserts = 8, + adResyncAll = 15 +}; + +enum __declspec(uuid("00000573-0000-0010-8000-00aa006d2ea4")) +MoveRecordOptionsEnum +{ + adMoveUnspecified = -1, + adMoveOverWrite = 1, + adMoveDontUpdateLinks = 2, + adMoveAllowEmulation = 4 +}; + +enum __declspec(uuid("00000574-0000-0010-8000-00aa006d2ea4")) +CopyRecordOptionsEnum +{ + adCopyUnspecified = -1, + adCopyOverWrite = 1, + adCopyAllowEmulation = 4, + adCopyNonRecursive = 2 +}; + +enum __declspec(uuid("00000576-0000-0010-8000-00aa006d2ea4")) +StreamTypeEnum +{ + adTypeBinary = 1, + adTypeText = 2 +}; + +enum __declspec(uuid("00000577-0000-0010-8000-00aa006d2ea4")) +LineSeparatorEnum +{ + adLF = 10, + adCR = 13, + adCRLF = -1 +}; + +enum __declspec(uuid("0000057a-0000-0010-8000-00aa006d2ea4")) +StreamOpenOptionsEnum +{ + adOpenStreamUnspecified = -1, + adOpenStreamAsync = 1, + adOpenStreamFromRecord = 4 +}; + +enum __declspec(uuid("0000057b-0000-0010-8000-00aa006d2ea4")) +StreamWriteEnum +{ + adWriteChar = 0, + adWriteLine = 1, + stWriteChar = 0, + stWriteLine = 1 +}; + +enum __declspec(uuid("0000057c-0000-0010-8000-00aa006d2ea4")) +SaveOptionsEnum +{ + adSaveCreateNotExist = 1, + adSaveCreateOverWrite = 2 +}; + +enum FieldEnum +{ + adDefaultStream = -1, + adRecordURL = -2 +}; + +enum StreamReadEnum +{ + adReadAll = -1, + adReadLine = -2 +}; + +enum __declspec(uuid("0000057d-0000-0010-8000-00aa006d2ea4")) +RecordTypeEnum +{ + adSimpleRecord = 0, + adCollectionRecord = 1, + adStructDoc = 2 +}; + +struct __declspec(uuid("00000512-0000-0010-8000-00aa006d2ea4")) +_Collection : IDispatch +{ + // + // Property data + // + + __declspec(property(get=GetCount)) + long Count; + + // + // Wrapper methods for error-handling + // + + long GetCount ( ); + IUnknownPtr _NewEnum ( ); + HRESULT Refresh ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Count ( + /*[out,retval]*/ long * c ) = 0; + virtual HRESULT __stdcall raw__NewEnum ( + /*[out,retval]*/ IUnknown * * ppvObject ) = 0; + virtual HRESULT __stdcall raw_Refresh ( ) = 0; +}; + +struct __declspec(uuid("00000513-0000-0010-8000-00aa006d2ea4")) +_DynaCollection : _Collection +{ + // + // Wrapper methods for error-handling + // + + HRESULT Append ( + IDispatch * Object ); + HRESULT Delete ( + const _variant_t & Index ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall raw_Append ( + /*[in]*/ IDispatch * Object ) = 0; + virtual HRESULT __stdcall raw_Delete ( + /*[in]*/ VARIANT Index ) = 0; +}; + +struct __declspec(uuid("00000503-0000-0010-8000-00aa006d2ea4")) +Property : IDispatch +{ + // + // Property data + // + + __declspec(property(get=GetValue,put=PutValue)) + _variant_t Value; + __declspec(property(get=GetName)) + _bstr_t Name; + __declspec(property(get=GetType)) + enum DataTypeEnum Type; + __declspec(property(get=GetAttributes,put=PutAttributes)) + long Attributes; + + // + // Wrapper methods for error-handling + // + + _variant_t GetValue ( ); + void PutValue ( + const _variant_t & pval ); + _bstr_t GetName ( ); + enum DataTypeEnum GetType ( ); + long GetAttributes ( ); + void PutAttributes ( + long plAttributes ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Value ( + /*[out,retval]*/ VARIANT * pval ) = 0; + virtual HRESULT __stdcall put_Value ( + /*[in]*/ VARIANT pval ) = 0; + virtual HRESULT __stdcall get_Name ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall get_Type ( + /*[out,retval]*/ enum DataTypeEnum * ptype ) = 0; + virtual HRESULT __stdcall get_Attributes ( + /*[out,retval]*/ long * plAttributes ) = 0; + virtual HRESULT __stdcall put_Attributes ( + /*[in]*/ long plAttributes ) = 0; +}; + +struct __declspec(uuid("00000504-0000-0010-8000-00aa006d2ea4")) +Properties : _Collection +{ + // + // Property data + // + + __declspec(property(get=GetItem)) + PropertyPtr Item[]; + + // + // Wrapper methods for error-handling + // + + PropertyPtr GetItem ( + const _variant_t & Index ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Item ( + /*[in]*/ VARIANT Index, + /*[out,retval]*/ struct Property * * ppvObject ) = 0; +}; + +struct __declspec(uuid("00000534-0000-0010-8000-00aa006d2ea4")) +_ADO : IDispatch +{ + // + // Property data + // + + __declspec(property(get=GetProperties)) + PropertiesPtr Properties; + + // + // Wrapper methods for error-handling + // + + PropertiesPtr GetProperties ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Properties ( + /*[out,retval]*/ struct Properties * * ppvObject ) = 0; +}; + +struct __declspec(uuid("00000500-0000-0010-8000-00aa006d2ea4")) +Error : IDispatch +{ + // + // Property data + // + + __declspec(property(get=GetDescription)) + _bstr_t Description; + __declspec(property(get=GetNumber)) + long Number; + __declspec(property(get=GetSource)) + _bstr_t Source; + __declspec(property(get=GetHelpFile)) + _bstr_t HelpFile; + __declspec(property(get=GetHelpContext)) + long HelpContext; + __declspec(property(get=GetSQLState)) + _bstr_t SQLState; + __declspec(property(get=GetNativeError)) + long NativeError; + + // + // Wrapper methods for error-handling + // + + long GetNumber ( ); + _bstr_t GetSource ( ); + _bstr_t GetDescription ( ); + _bstr_t GetHelpFile ( ); + long GetHelpContext ( ); + _bstr_t GetSQLState ( ); + long GetNativeError ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Number ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall get_Source ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall get_Description ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall get_HelpFile ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall get_HelpContext ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall get_SQLState ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall get_NativeError ( + /*[out,retval]*/ long * pl ) = 0; +}; + +struct __declspec(uuid("00000501-0000-0010-8000-00aa006d2ea4")) +Errors : _Collection +{ + // + // Property data + // + + __declspec(property(get=GetItem)) + ErrorPtr Item[]; + + // + // Wrapper methods for error-handling + // + + ErrorPtr GetItem ( + const _variant_t & Index ); + HRESULT Clear ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Item ( + /*[in]*/ VARIANT Index, + /*[out,retval]*/ struct Error * * ppvObject ) = 0; + virtual HRESULT __stdcall raw_Clear ( ) = 0; +}; + +struct __declspec(uuid("0000154c-0000-0010-8000-00aa006d2ea4")) +Field20 : _ADO +{ + // + // Property data + // + + __declspec(property(get=GetValue,put=PutValue)) + _variant_t Value; + __declspec(property(get=GetName)) + _bstr_t Name; + __declspec(property(get=GetType,put=PutType)) + enum DataTypeEnum Type; + __declspec(property(get=GetDefinedSize,put=PutDefinedSize)) + long DefinedSize; + __declspec(property(get=GetOriginalValue)) + _variant_t OriginalValue; + __declspec(property(get=GetUnderlyingValue)) + _variant_t UnderlyingValue; + __declspec(property(get=GetActualSize)) + long ActualSize; + __declspec(property(get=GetPrecision,put=PutPrecision)) + unsigned char Precision; + __declspec(property(get=GetNumericScale,put=PutNumericScale)) + unsigned char NumericScale; + __declspec(property(get=GetAttributes,put=PutAttributes)) + long Attributes; + __declspec(property(get=GetDataFormat,put=PutRefDataFormat)) + IUnknownPtr DataFormat; + + // + // Wrapper methods for error-handling + // + + long GetActualSize ( ); + long GetAttributes ( ); + long GetDefinedSize ( ); + _bstr_t GetName ( ); + enum DataTypeEnum GetType ( ); + _variant_t GetValue ( ); + void PutValue ( + const _variant_t & pvar ); + unsigned char GetPrecision ( ); + unsigned char GetNumericScale ( ); + HRESULT AppendChunk ( + const _variant_t & Data ); + _variant_t GetChunk ( + long Length ); + _variant_t GetOriginalValue ( ); + _variant_t GetUnderlyingValue ( ); + IUnknownPtr GetDataFormat ( ); + void PutRefDataFormat ( + IUnknown * ppiDF ); + void PutPrecision ( + unsigned char pbPrecision ); + void PutNumericScale ( + unsigned char pbNumericScale ); + void PutType ( + enum DataTypeEnum pDataType ); + void PutDefinedSize ( + long pl ); + void PutAttributes ( + long pl ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_ActualSize ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall get_Attributes ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall get_DefinedSize ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall get_Name ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall get_Type ( + /*[out,retval]*/ enum DataTypeEnum * pDataType ) = 0; + virtual HRESULT __stdcall get_Value ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall put_Value ( + /*[in]*/ VARIANT pvar ) = 0; + virtual HRESULT __stdcall get_Precision ( + /*[out,retval]*/ unsigned char * pbPrecision ) = 0; + virtual HRESULT __stdcall get_NumericScale ( + /*[out,retval]*/ unsigned char * pbNumericScale ) = 0; + virtual HRESULT __stdcall raw_AppendChunk ( + /*[in]*/ VARIANT Data ) = 0; + virtual HRESULT __stdcall raw_GetChunk ( + /*[in]*/ long Length, + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall get_OriginalValue ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall get_UnderlyingValue ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall get_DataFormat ( + /*[out,retval]*/ IUnknown * * ppiDF ) = 0; + virtual HRESULT __stdcall putref_DataFormat ( + /*[in]*/ IUnknown * ppiDF ) = 0; + virtual HRESULT __stdcall put_Precision ( + /*[in]*/ unsigned char pbPrecision ) = 0; + virtual HRESULT __stdcall put_NumericScale ( + /*[in]*/ unsigned char pbNumericScale ) = 0; + virtual HRESULT __stdcall put_Type ( + /*[in]*/ enum DataTypeEnum pDataType ) = 0; + virtual HRESULT __stdcall put_DefinedSize ( + /*[in]*/ long pl ) = 0; + virtual HRESULT __stdcall put_Attributes ( + /*[in]*/ long pl ) = 0; +}; + +struct __declspec(uuid("00001569-0000-0010-8000-00aa006d2ea4")) +Field : Field20 +{ + // + // Property data + // + + __declspec(property(get=GetStatus)) + long Status; + + // + // Wrapper methods for error-handling + // + + long GetStatus ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Status ( + /*[out,retval]*/ long * pFStatus ) = 0; +}; + +struct __declspec(uuid("00001506-0000-0010-8000-00aa006d2ea4")) +Fields15 : _Collection +{ + // + // Property data + // + + __declspec(property(get=GetItem)) + FieldPtr Item[]; + + // + // Wrapper methods for error-handling + // + + FieldPtr GetItem ( + const _variant_t & Index ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Item ( + /*[in]*/ VARIANT Index, + /*[out,retval]*/ struct Field * * ppvObject ) = 0; +}; + +struct __declspec(uuid("0000154d-0000-0010-8000-00aa006d2ea4")) +Fields20 : Fields15 +{ + // + // Wrapper methods for error-handling + // + + HRESULT _Append ( + _bstr_t Name, + enum DataTypeEnum Type, + long DefinedSize, + enum FieldAttributeEnum Attrib ); + HRESULT Delete ( + const _variant_t & Index ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall raw__Append ( + /*[in]*/ BSTR Name, + /*[in]*/ enum DataTypeEnum Type, + /*[in]*/ long DefinedSize, + /*[in]*/ enum FieldAttributeEnum Attrib ) = 0; + virtual HRESULT __stdcall raw_Delete ( + /*[in]*/ VARIANT Index ) = 0; +}; + +struct __declspec(uuid("00001564-0000-0010-8000-00aa006d2ea4")) +Fields : Fields20 +{ + // + // Wrapper methods for error-handling + // + + HRESULT Append ( + _bstr_t Name, + enum DataTypeEnum Type, + long DefinedSize, + enum FieldAttributeEnum Attrib, + const _variant_t & FieldValue = vtMissing ); + HRESULT Update ( ); + HRESULT Resync ( + enum ResyncEnum ResyncValues ); + HRESULT CancelUpdate ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall raw_Append ( + /*[in]*/ BSTR Name, + /*[in]*/ enum DataTypeEnum Type, + /*[in]*/ long DefinedSize, + /*[in]*/ enum FieldAttributeEnum Attrib, + /*[in]*/ VARIANT FieldValue = vtMissing ) = 0; + virtual HRESULT __stdcall raw_Update ( ) = 0; + virtual HRESULT __stdcall raw_Resync ( + /*[in]*/ enum ResyncEnum ResyncValues ) = 0; + virtual HRESULT __stdcall raw_CancelUpdate ( ) = 0; +}; + +struct __declspec(uuid("0000150c-0000-0010-8000-00aa006d2ea4")) +_Parameter : _ADO +{ + // + // Property data + // + + __declspec(property(get=GetValue,put=PutValue)) + _variant_t Value; + __declspec(property(get=GetName,put=PutName)) + _bstr_t Name; + __declspec(property(get=GetType,put=PutType)) + enum DataTypeEnum Type; + __declspec(property(get=GetDirection,put=PutDirection)) + enum ParameterDirectionEnum Direction; + __declspec(property(get=GetPrecision,put=PutPrecision)) + unsigned char Precision; + __declspec(property(get=GetNumericScale,put=PutNumericScale)) + unsigned char NumericScale; + __declspec(property(get=GetSize,put=PutSize)) + long Size; + __declspec(property(get=GetAttributes,put=PutAttributes)) + long Attributes; + + // + // Wrapper methods for error-handling + // + + _bstr_t GetName ( ); + void PutName ( + _bstr_t pbstr ); + _variant_t GetValue ( ); + void PutValue ( + const _variant_t & pvar ); + enum DataTypeEnum GetType ( ); + void PutType ( + enum DataTypeEnum psDataType ); + void PutDirection ( + enum ParameterDirectionEnum plParmDirection ); + enum ParameterDirectionEnum GetDirection ( ); + void PutPrecision ( + unsigned char pbPrecision ); + unsigned char GetPrecision ( ); + void PutNumericScale ( + unsigned char pbScale ); + unsigned char GetNumericScale ( ); + void PutSize ( + long pl ); + long GetSize ( ); + HRESULT AppendChunk ( + const _variant_t & Val ); + long GetAttributes ( ); + void PutAttributes ( + long plParmAttribs ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Name ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall put_Name ( + /*[in]*/ BSTR pbstr ) = 0; + virtual HRESULT __stdcall get_Value ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall put_Value ( + /*[in]*/ VARIANT pvar ) = 0; + virtual HRESULT __stdcall get_Type ( + /*[out,retval]*/ enum DataTypeEnum * psDataType ) = 0; + virtual HRESULT __stdcall put_Type ( + /*[in]*/ enum DataTypeEnum psDataType ) = 0; + virtual HRESULT __stdcall put_Direction ( + /*[in]*/ enum ParameterDirectionEnum plParmDirection ) = 0; + virtual HRESULT __stdcall get_Direction ( + /*[out,retval]*/ enum ParameterDirectionEnum * plParmDirection ) = 0; + virtual HRESULT __stdcall put_Precision ( + /*[in]*/ unsigned char pbPrecision ) = 0; + virtual HRESULT __stdcall get_Precision ( + /*[out,retval]*/ unsigned char * pbPrecision ) = 0; + virtual HRESULT __stdcall put_NumericScale ( + /*[in]*/ unsigned char pbScale ) = 0; + virtual HRESULT __stdcall get_NumericScale ( + /*[out,retval]*/ unsigned char * pbScale ) = 0; + virtual HRESULT __stdcall put_Size ( + /*[in]*/ long pl ) = 0; + virtual HRESULT __stdcall get_Size ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall raw_AppendChunk ( + /*[in]*/ VARIANT Val ) = 0; + virtual HRESULT __stdcall get_Attributes ( + /*[out,retval]*/ long * plParmAttribs ) = 0; + virtual HRESULT __stdcall put_Attributes ( + /*[in]*/ long plParmAttribs ) = 0; +}; + +struct __declspec(uuid("0000150d-0000-0010-8000-00aa006d2ea4")) +Parameters : _DynaCollection +{ + // + // Property data + // + + __declspec(property(get=GetItem)) + _ParameterPtr Item[]; + + // + // Wrapper methods for error-handling + // + + _ParameterPtr GetItem ( + const _variant_t & Index ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Item ( + /*[in]*/ VARIANT Index, + /*[out,retval]*/ struct _Parameter * * ppvObject ) = 0; +}; + +struct __declspec(uuid("00001400-0000-0010-8000-00aa006d2ea4")) +ConnectionEvents : IDispatch +{ + // + // Wrapper methods for error-handling + // + + // Methods: + HRESULT InfoMessage ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection * pConnection ); + HRESULT BeginTransComplete ( + long TransactionLevel, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection * pConnection ); + HRESULT CommitTransComplete ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection * pConnection ); + HRESULT RollbackTransComplete ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection * pConnection ); + HRESULT WillExecute ( + BSTR * Source, + enum CursorTypeEnum * CursorType, + enum LockTypeEnum * LockType, + long * Options, + enum EventStatusEnum * adStatus, + struct _Command * pCommand, + struct _Recordset * pRecordset, + struct _Connection * pConnection ); + HRESULT ExecuteComplete ( + long RecordsAffected, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Command * pCommand, + struct _Recordset * pRecordset, + struct _Connection * pConnection ); + HRESULT WillConnect ( + BSTR * ConnectionString, + BSTR * UserID, + BSTR * Password, + long * Options, + enum EventStatusEnum * adStatus, + struct _Connection * pConnection ); + HRESULT ConnectComplete ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection * pConnection ); + HRESULT Disconnect ( + enum EventStatusEnum * adStatus, + struct _Connection * pConnection ); +}; + +struct __declspec(uuid("00001266-0000-0010-8000-00aa006d2ea4")) +RecordsetEvents : IDispatch +{ + // + // Wrapper methods for error-handling + // + + // Methods: + HRESULT WillChangeField ( + long cFields, + const _variant_t & Fields, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT FieldChangeComplete ( + long cFields, + const _variant_t & Fields, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT WillChangeRecord ( + enum EventReasonEnum adReason, + long cRecords, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT RecordChangeComplete ( + enum EventReasonEnum adReason, + long cRecords, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT WillChangeRecordset ( + enum EventReasonEnum adReason, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT RecordsetChangeComplete ( + enum EventReasonEnum adReason, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT WillMove ( + enum EventReasonEnum adReason, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT MoveComplete ( + enum EventReasonEnum adReason, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT EndOfRecordset ( + VARIANT_BOOL * fMoreData, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT FetchProgress ( + long Progress, + long MaxProgress, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT FetchComplete ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); +}; + +struct __declspec(uuid("00000516-0000-0010-8000-00aa006d2ea4")) +ADOConnectionConstruction15 : IUnknown +{ + // + // Property data + // + + __declspec(property(get=GetDSO)) + IUnknownPtr DSO; + __declspec(property(get=GetSession)) + IUnknownPtr Session; + + // + // Wrapper methods for error-handling + // + + IUnknownPtr GetDSO ( ); + IUnknownPtr GetSession ( ); + HRESULT WrapDSOandSession ( + IUnknown * pDSO, + IUnknown * pSession ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_DSO ( + /*[out,retval]*/ IUnknown * * ppDSO ) = 0; + virtual HRESULT __stdcall get_Session ( + /*[out,retval]*/ IUnknown * * ppSession ) = 0; + virtual HRESULT __stdcall raw_WrapDSOandSession ( + /*[in]*/ IUnknown * pDSO, + /*[in]*/ IUnknown * pSession ) = 0; +}; + +struct __declspec(uuid("00000551-0000-0010-8000-00aa006d2ea4")) +ADOConnectionConstruction : ADOConnectionConstruction15 +{}; + +struct __declspec(uuid("00000514-0000-0010-8000-00aa006d2ea4")) +Connection; + // [ default ] interface _Connection + // [ default, source ] dispinterface ConnectionEvents + +struct __declspec(uuid("00000560-0000-0010-8000-00aa006d2ea4")) +Record; + // [ default ] interface _Record + +struct __declspec(uuid("00001565-0000-0010-8000-00aa006d2ea4")) +_Stream : IDispatch +{ + // + // Property data + // + + __declspec(property(get=GetSize)) + long Size; + __declspec(property(get=GetEOS)) + VARIANT_BOOL EOS; + __declspec(property(get=GetPosition,put=PutPosition)) + long Position; + __declspec(property(get=GetType,put=PutType)) + enum StreamTypeEnum Type; + __declspec(property(get=GetLineSeparator,put=PutLineSeparator)) + enum LineSeparatorEnum LineSeparator; + __declspec(property(get=GetState)) + enum ObjectStateEnum State; + __declspec(property(get=GetMode,put=PutMode)) + enum ConnectModeEnum Mode; + __declspec(property(get=GetCharset,put=PutCharset)) + _bstr_t Charset; + + // + // Wrapper methods for error-handling + // + + long GetSize ( ); + VARIANT_BOOL GetEOS ( ); + long GetPosition ( ); + void PutPosition ( + long pPos ); + enum StreamTypeEnum GetType ( ); + void PutType ( + enum StreamTypeEnum ptype ); + enum LineSeparatorEnum GetLineSeparator ( ); + void PutLineSeparator ( + enum LineSeparatorEnum pLS ); + enum ObjectStateEnum GetState ( ); + enum ConnectModeEnum GetMode ( ); + void PutMode ( + enum ConnectModeEnum pMode ); + _bstr_t GetCharset ( ); + void PutCharset ( + _bstr_t pbstrCharset ); + _variant_t Read ( + long NumBytes ); + HRESULT Open ( + const _variant_t & Source, + enum ConnectModeEnum Mode, + enum StreamOpenOptionsEnum Options, + _bstr_t UserName, + _bstr_t Password ); + HRESULT Close ( ); + HRESULT SkipLine ( ); + HRESULT Write ( + const _variant_t & Buffer ); + HRESULT SetEOS ( ); + HRESULT CopyTo ( + struct _Stream * DestStream, + long CharNumber ); + HRESULT Flush ( ); + HRESULT SaveToFile ( + _bstr_t FileName, + enum SaveOptionsEnum Options ); + HRESULT LoadFromFile ( + _bstr_t FileName ); + _bstr_t ReadText ( + long NumChars ); + HRESULT WriteText ( + _bstr_t Data, + enum StreamWriteEnum Options ); + HRESULT Cancel ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Size ( + /*[out,retval]*/ long * pSize ) = 0; + virtual HRESULT __stdcall get_EOS ( + /*[out,retval]*/ VARIANT_BOOL * pEOS ) = 0; + virtual HRESULT __stdcall get_Position ( + /*[out,retval]*/ long * pPos ) = 0; + virtual HRESULT __stdcall put_Position ( + /*[in]*/ long pPos ) = 0; + virtual HRESULT __stdcall get_Type ( + /*[out,retval]*/ enum StreamTypeEnum * ptype ) = 0; + virtual HRESULT __stdcall put_Type ( + /*[in]*/ enum StreamTypeEnum ptype ) = 0; + virtual HRESULT __stdcall get_LineSeparator ( + /*[out,retval]*/ enum LineSeparatorEnum * pLS ) = 0; + virtual HRESULT __stdcall put_LineSeparator ( + /*[in]*/ enum LineSeparatorEnum pLS ) = 0; + virtual HRESULT __stdcall get_State ( + /*[out,retval]*/ enum ObjectStateEnum * pState ) = 0; + virtual HRESULT __stdcall get_Mode ( + /*[out,retval]*/ enum ConnectModeEnum * pMode ) = 0; + virtual HRESULT __stdcall put_Mode ( + /*[in]*/ enum ConnectModeEnum pMode ) = 0; + virtual HRESULT __stdcall get_Charset ( + /*[out,retval]*/ BSTR * pbstrCharset ) = 0; + virtual HRESULT __stdcall put_Charset ( + /*[in]*/ BSTR pbstrCharset ) = 0; + virtual HRESULT __stdcall raw_Read ( + /*[in]*/ long NumBytes, + /*[out,retval]*/ VARIANT * pval ) = 0; + virtual HRESULT __stdcall raw_Open ( + /*[in]*/ VARIANT Source, + /*[in]*/ enum ConnectModeEnum Mode, + /*[in]*/ enum StreamOpenOptionsEnum Options, + /*[in]*/ BSTR UserName, + /*[in]*/ BSTR Password ) = 0; + virtual HRESULT __stdcall raw_Close ( ) = 0; + virtual HRESULT __stdcall raw_SkipLine ( ) = 0; + virtual HRESULT __stdcall raw_Write ( + /*[in]*/ VARIANT Buffer ) = 0; + virtual HRESULT __stdcall raw_SetEOS ( ) = 0; + virtual HRESULT __stdcall raw_CopyTo ( + /*[in]*/ struct _Stream * DestStream, + /*[in]*/ long CharNumber ) = 0; + virtual HRESULT __stdcall raw_Flush ( ) = 0; + virtual HRESULT __stdcall raw_SaveToFile ( + /*[in]*/ BSTR FileName, + /*[in]*/ enum SaveOptionsEnum Options ) = 0; + virtual HRESULT __stdcall raw_LoadFromFile ( + /*[in]*/ BSTR FileName ) = 0; + virtual HRESULT __stdcall raw_ReadText ( + /*[in]*/ long NumChars, + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall raw_WriteText ( + /*[in]*/ BSTR Data, + /*[in]*/ enum StreamWriteEnum Options ) = 0; + virtual HRESULT __stdcall raw_Cancel ( ) = 0; +}; + +struct __declspec(uuid("00000566-0000-0010-8000-00aa006d2ea4")) +Stream; + // [ default ] interface _Stream + +struct __declspec(uuid("00000567-0000-0010-8000-00aa006d2ea4")) +ADORecordConstruction : IDispatch +{ + // + // Property data + // + + __declspec(property(get=GetRow,put=PutRow)) + IUnknownPtr Row; + __declspec(property(put=PutParentRow)) + IUnknownPtr ParentRow; + + // + // Wrapper methods for error-handling + // + + IUnknownPtr GetRow ( ); + void PutRow ( + IUnknown * ppRow ); + void PutParentRow ( + IUnknown * _arg1 ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Row ( + /*[out,retval]*/ IUnknown * * ppRow ) = 0; + virtual HRESULT __stdcall put_Row ( + /*[in]*/ IUnknown * ppRow ) = 0; + virtual HRESULT __stdcall put_ParentRow ( + /*[in]*/ IUnknown * _arg1 ) = 0; +}; + +struct __declspec(uuid("00000568-0000-0010-8000-00aa006d2ea4")) +ADOStreamConstruction : IDispatch +{ + // + // Property data + // + + __declspec(property(get=GetStream,put=PutStream)) + IUnknownPtr Stream; + + // + // Wrapper methods for error-handling + // + + IUnknownPtr GetStream ( ); + void PutStream ( + IUnknown * ppStm ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Stream ( + /*[out,retval]*/ IUnknown * * ppStm ) = 0; + virtual HRESULT __stdcall put_Stream ( + /*[in]*/ IUnknown * ppStm ) = 0; +}; + +struct __declspec(uuid("00000517-0000-0010-8000-00aa006d2ea4")) +ADOCommandConstruction : IUnknown +{ + // + // Property data + // + + __declspec(property(get=GetOLEDBCommand,put=PutOLEDBCommand)) + IUnknownPtr OLEDBCommand; + + // + // Wrapper methods for error-handling + // + + IUnknownPtr GetOLEDBCommand ( ); + void PutOLEDBCommand ( + IUnknown * ppOLEDBCommand ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_OLEDBCommand ( + /*[out,retval]*/ IUnknown * * ppOLEDBCommand ) = 0; + virtual HRESULT __stdcall put_OLEDBCommand ( + /*[in]*/ IUnknown * ppOLEDBCommand ) = 0; +}; + +struct __declspec(uuid("00000507-0000-0010-8000-00aa006d2ea4")) +Command; + // [ default ] interface _Command + +struct __declspec(uuid("00000535-0000-0010-8000-00aa006d2ea4")) +Recordset; + // [ default ] interface _Recordset + // [ default, source ] dispinterface RecordsetEvents + +struct __declspec(uuid("00000283-0000-0010-8000-00aa006d2ea4")) +ADORecordsetConstruction : IDispatch +{ + // + // Property data + // + + __declspec(property(get=GetRowset,put=PutRowset)) + IUnknownPtr Rowset; + __declspec(property(get=GetChapter,put=PutChapter)) + ADO_LONGPTR Chapter; + __declspec(property(get=GetRowPosition,put=PutRowPosition)) + IUnknownPtr RowPosition; + + // + // Wrapper methods for error-handling + // + + IUnknownPtr GetRowset ( ); + void PutRowset ( + IUnknown * ppRowset ); + ADO_LONGPTR GetChapter ( ); + void PutChapter ( + ADO_LONGPTR plChapter ); + IUnknownPtr GetRowPosition ( ); + void PutRowPosition ( + IUnknown * ppRowPos ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Rowset ( + /*[out,retval]*/ IUnknown * * ppRowset ) = 0; + virtual HRESULT __stdcall put_Rowset ( + /*[in]*/ IUnknown * ppRowset ) = 0; + virtual HRESULT __stdcall get_Chapter ( + /*[out,retval]*/ ADO_LONGPTR * plChapter ) = 0; + virtual HRESULT __stdcall put_Chapter ( + /*[in]*/ ADO_LONGPTR plChapter ) = 0; + virtual HRESULT __stdcall get_RowPosition ( + /*[out,retval]*/ IUnknown * * ppRowPos ) = 0; + virtual HRESULT __stdcall put_RowPosition ( + /*[in]*/ IUnknown * ppRowPos ) = 0; +}; + +struct __declspec(uuid("00001505-0000-0010-8000-00aa006d2ea4")) +Field15 : _ADO +{ + // + // Property data + // + + __declspec(property(get=GetValue,put=PutValue)) + _variant_t Value; + __declspec(property(get=GetName)) + _bstr_t Name; + __declspec(property(get=GetType)) + enum DataTypeEnum Type; + __declspec(property(get=GetDefinedSize)) + long DefinedSize; + __declspec(property(get=GetOriginalValue)) + _variant_t OriginalValue; + __declspec(property(get=GetUnderlyingValue)) + _variant_t UnderlyingValue; + __declspec(property(get=GetActualSize)) + long ActualSize; + __declspec(property(get=GetPrecision)) + unsigned char Precision; + __declspec(property(get=GetNumericScale)) + unsigned char NumericScale; + __declspec(property(get=GetAttributes)) + long Attributes; + + // + // Wrapper methods for error-handling + // + + long GetActualSize ( ); + long GetAttributes ( ); + long GetDefinedSize ( ); + _bstr_t GetName ( ); + enum DataTypeEnum GetType ( ); + _variant_t GetValue ( ); + void PutValue ( + const _variant_t & pvar ); + unsigned char GetPrecision ( ); + unsigned char GetNumericScale ( ); + HRESULT AppendChunk ( + const _variant_t & Data ); + _variant_t GetChunk ( + long Length ); + _variant_t GetOriginalValue ( ); + _variant_t GetUnderlyingValue ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_ActualSize ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall get_Attributes ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall get_DefinedSize ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall get_Name ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall get_Type ( + /*[out,retval]*/ enum DataTypeEnum * pDataType ) = 0; + virtual HRESULT __stdcall get_Value ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall put_Value ( + /*[in]*/ VARIANT pvar ) = 0; + virtual HRESULT __stdcall get_Precision ( + /*[out,retval]*/ unsigned char * pbPrecision ) = 0; + virtual HRESULT __stdcall get_NumericScale ( + /*[out,retval]*/ unsigned char * pbNumericScale ) = 0; + virtual HRESULT __stdcall raw_AppendChunk ( + /*[in]*/ VARIANT Data ) = 0; + virtual HRESULT __stdcall raw_GetChunk ( + /*[in]*/ long Length, + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall get_OriginalValue ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall get_UnderlyingValue ( + /*[out,retval]*/ VARIANT * pvar ) = 0; +}; + +struct __declspec(uuid("0000050b-0000-0010-8000-00aa006d2ea4")) +Parameter; + // [ default ] interface _Parameter + +struct __declspec(uuid("0000054c-0000-0010-8000-00aa006d2ea4")) +Field20_Deprecated : _ADO +{ + // + // Property data + // + + __declspec(property(get=GetValue,put=PutValue)) + _variant_t Value; + __declspec(property(get=GetName)) + _bstr_t Name; + __declspec(property(get=GetType,put=PutType)) + enum DataTypeEnum Type; + __declspec(property(get=GetDefinedSize,put=PutDefinedSize)) + ADO_LONGPTR DefinedSize; + __declspec(property(get=GetOriginalValue)) + _variant_t OriginalValue; + __declspec(property(get=GetUnderlyingValue)) + _variant_t UnderlyingValue; + __declspec(property(get=GetActualSize)) + ADO_LONGPTR ActualSize; + __declspec(property(get=GetPrecision,put=PutPrecision)) + unsigned char Precision; + __declspec(property(get=GetNumericScale,put=PutNumericScale)) + unsigned char NumericScale; + __declspec(property(get=GetAttributes,put=PutAttributes)) + long Attributes; + __declspec(property(get=GetDataFormat,put=PutRefDataFormat)) + IUnknownPtr DataFormat; + + // + // Wrapper methods for error-handling + // + + ADO_LONGPTR GetActualSize ( ); + long GetAttributes ( ); + ADO_LONGPTR GetDefinedSize ( ); + _bstr_t GetName ( ); + enum DataTypeEnum GetType ( ); + _variant_t GetValue ( ); + void PutValue ( + const _variant_t & pvar ); + unsigned char GetPrecision ( ); + unsigned char GetNumericScale ( ); + HRESULT AppendChunk ( + const _variant_t & Data ); + _variant_t GetChunk ( + long Length ); + _variant_t GetOriginalValue ( ); + _variant_t GetUnderlyingValue ( ); + IUnknownPtr GetDataFormat ( ); + void PutRefDataFormat ( + IUnknown * ppiDF ); + void PutPrecision ( + unsigned char pbPrecision ); + void PutNumericScale ( + unsigned char pbNumericScale ); + void PutType ( + enum DataTypeEnum pDataType ); + void PutDefinedSize ( + ADO_LONGPTR pl ); + void PutAttributes ( + long pl ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_ActualSize ( + /*[out,retval]*/ ADO_LONGPTR * pl ) = 0; + virtual HRESULT __stdcall get_Attributes ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall get_DefinedSize ( + /*[out,retval]*/ ADO_LONGPTR * pl ) = 0; + virtual HRESULT __stdcall get_Name ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall get_Type ( + /*[out,retval]*/ enum DataTypeEnum * pDataType ) = 0; + virtual HRESULT __stdcall get_Value ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall put_Value ( + /*[in]*/ VARIANT pvar ) = 0; + virtual HRESULT __stdcall get_Precision ( + /*[out,retval]*/ unsigned char * pbPrecision ) = 0; + virtual HRESULT __stdcall get_NumericScale ( + /*[out,retval]*/ unsigned char * pbNumericScale ) = 0; + virtual HRESULT __stdcall raw_AppendChunk ( + /*[in]*/ VARIANT Data ) = 0; + virtual HRESULT __stdcall raw_GetChunk ( + /*[in]*/ long Length, + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall get_OriginalValue ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall get_UnderlyingValue ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall get_DataFormat ( + /*[out,retval]*/ IUnknown * * ppiDF ) = 0; + virtual HRESULT __stdcall putref_DataFormat ( + /*[in]*/ IUnknown * ppiDF ) = 0; + virtual HRESULT __stdcall put_Precision ( + /*[in]*/ unsigned char pbPrecision ) = 0; + virtual HRESULT __stdcall put_NumericScale ( + /*[in]*/ unsigned char pbNumericScale ) = 0; + virtual HRESULT __stdcall put_Type ( + /*[in]*/ enum DataTypeEnum pDataType ) = 0; + virtual HRESULT __stdcall put_DefinedSize ( + /*[in]*/ ADO_LONGPTR pl ) = 0; + virtual HRESULT __stdcall put_Attributes ( + /*[in]*/ long pl ) = 0; +}; + +struct __declspec(uuid("00000569-0000-0010-8000-00aa006d2ea4")) +Field_Deprecated : Field20_Deprecated +{ + // + // Property data + // + + __declspec(property(get=GetStatus)) + long Status; + + // + // Wrapper methods for error-handling + // + + long GetStatus ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Status ( + /*[out,retval]*/ long * pFStatus ) = 0; +}; + +struct __declspec(uuid("00000506-0000-0010-8000-00aa006d2ea4")) +Fields15_Deprecated : _Collection +{ + // + // Property data + // + + __declspec(property(get=GetItem)) + Field_DeprecatedPtr Item[]; + + // + // Wrapper methods for error-handling + // + + Field_DeprecatedPtr GetItem ( + const _variant_t & Index ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Item ( + /*[in]*/ VARIANT Index, + /*[out,retval]*/ struct Field_Deprecated * * ppvObject ) = 0; +}; + +struct __declspec(uuid("0000054d-0000-0010-8000-00aa006d2ea4")) +Fields20_Deprecated : Fields15_Deprecated +{ + // + // Wrapper methods for error-handling + // + + HRESULT _Append ( + _bstr_t Name, + enum DataTypeEnum Type, + ADO_LONGPTR DefinedSize, + enum FieldAttributeEnum Attrib ); + HRESULT Delete ( + const _variant_t & Index ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall raw__Append ( + /*[in]*/ BSTR Name, + /*[in]*/ enum DataTypeEnum Type, + /*[in]*/ ADO_LONGPTR DefinedSize, + /*[in]*/ enum FieldAttributeEnum Attrib ) = 0; + virtual HRESULT __stdcall raw_Delete ( + /*[in]*/ VARIANT Index ) = 0; +}; + +struct __declspec(uuid("00000564-0000-0010-8000-00aa006d2ea4")) +Fields_Deprecated : Fields20_Deprecated +{ + // + // Wrapper methods for error-handling + // + + HRESULT Append ( + _bstr_t Name, + enum DataTypeEnum Type, + ADO_LONGPTR DefinedSize, + enum FieldAttributeEnum Attrib, + const _variant_t & FieldValue = vtMissing ); + HRESULT Update ( ); + HRESULT Resync ( + enum ResyncEnum ResyncValues ); + HRESULT CancelUpdate ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall raw_Append ( + /*[in]*/ BSTR Name, + /*[in]*/ enum DataTypeEnum Type, + /*[in]*/ ADO_LONGPTR DefinedSize, + /*[in]*/ enum FieldAttributeEnum Attrib, + /*[in]*/ VARIANT FieldValue = vtMissing ) = 0; + virtual HRESULT __stdcall raw_Update ( ) = 0; + virtual HRESULT __stdcall raw_Resync ( + /*[in]*/ enum ResyncEnum ResyncValues ) = 0; + virtual HRESULT __stdcall raw_CancelUpdate ( ) = 0; +}; + +struct __declspec(uuid("0000050c-0000-0010-8000-00aa006d2ea4")) +_Parameter_Deprecated : _ADO +{ + // + // Property data + // + + __declspec(property(get=GetValue,put=PutValue)) + _variant_t Value; + __declspec(property(get=GetName,put=PutName)) + _bstr_t Name; + __declspec(property(get=GetType,put=PutType)) + enum DataTypeEnum Type; + __declspec(property(get=GetDirection,put=PutDirection)) + enum ParameterDirectionEnum Direction; + __declspec(property(get=GetPrecision,put=PutPrecision)) + unsigned char Precision; + __declspec(property(get=GetNumericScale,put=PutNumericScale)) + unsigned char NumericScale; + __declspec(property(get=GetSize,put=PutSize)) + ADO_LONGPTR Size; + __declspec(property(get=GetAttributes,put=PutAttributes)) + long Attributes; + + // + // Wrapper methods for error-handling + // + + _bstr_t GetName ( ); + void PutName ( + _bstr_t pbstr ); + _variant_t GetValue ( ); + void PutValue ( + const _variant_t & pvar ); + enum DataTypeEnum GetType ( ); + void PutType ( + enum DataTypeEnum psDataType ); + void PutDirection ( + enum ParameterDirectionEnum plParmDirection ); + enum ParameterDirectionEnum GetDirection ( ); + void PutPrecision ( + unsigned char pbPrecision ); + unsigned char GetPrecision ( ); + void PutNumericScale ( + unsigned char pbScale ); + unsigned char GetNumericScale ( ); + void PutSize ( + ADO_LONGPTR pl ); + ADO_LONGPTR GetSize ( ); + HRESULT AppendChunk ( + const _variant_t & Val ); + long GetAttributes ( ); + void PutAttributes ( + long plParmAttribs ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Name ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall put_Name ( + /*[in]*/ BSTR pbstr ) = 0; + virtual HRESULT __stdcall get_Value ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall put_Value ( + /*[in]*/ VARIANT pvar ) = 0; + virtual HRESULT __stdcall get_Type ( + /*[out,retval]*/ enum DataTypeEnum * psDataType ) = 0; + virtual HRESULT __stdcall put_Type ( + /*[in]*/ enum DataTypeEnum psDataType ) = 0; + virtual HRESULT __stdcall put_Direction ( + /*[in]*/ enum ParameterDirectionEnum plParmDirection ) = 0; + virtual HRESULT __stdcall get_Direction ( + /*[out,retval]*/ enum ParameterDirectionEnum * plParmDirection ) = 0; + virtual HRESULT __stdcall put_Precision ( + /*[in]*/ unsigned char pbPrecision ) = 0; + virtual HRESULT __stdcall get_Precision ( + /*[out,retval]*/ unsigned char * pbPrecision ) = 0; + virtual HRESULT __stdcall put_NumericScale ( + /*[in]*/ unsigned char pbScale ) = 0; + virtual HRESULT __stdcall get_NumericScale ( + /*[out,retval]*/ unsigned char * pbScale ) = 0; + virtual HRESULT __stdcall put_Size ( + /*[in]*/ ADO_LONGPTR pl ) = 0; + virtual HRESULT __stdcall get_Size ( + /*[out,retval]*/ ADO_LONGPTR * pl ) = 0; + virtual HRESULT __stdcall raw_AppendChunk ( + /*[in]*/ VARIANT Val ) = 0; + virtual HRESULT __stdcall get_Attributes ( + /*[out,retval]*/ long * plParmAttribs ) = 0; + virtual HRESULT __stdcall put_Attributes ( + /*[in]*/ long plParmAttribs ) = 0; +}; + +struct __declspec(uuid("0000050d-0000-0010-8000-00aa006d2ea4")) +Parameters_Deprecated : _DynaCollection +{ + // + // Property data + // + + __declspec(property(get=GetItem)) + _Parameter_DeprecatedPtr Item[]; + + // + // Wrapper methods for error-handling + // + + _Parameter_DeprecatedPtr GetItem ( + const _variant_t & Index ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Item ( + /*[in]*/ VARIANT Index, + /*[out,retval]*/ struct _Parameter_Deprecated * * ppvObject ) = 0; +}; + +struct __declspec(uuid("00000400-0000-0010-8000-00aa006d2ea4")) +ConnectionEvents_Deprecated : IDispatch +{ + // + // Wrapper methods for error-handling + // + + // Methods: + HRESULT InfoMessage ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection_Deprecated * pConnection ); + HRESULT BeginTransComplete ( + long TransactionLevel, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection_Deprecated * pConnection ); + HRESULT CommitTransComplete ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection_Deprecated * pConnection ); + HRESULT RollbackTransComplete ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection_Deprecated * pConnection ); + HRESULT WillExecute ( + BSTR * Source, + enum CursorTypeEnum * CursorType, + enum LockTypeEnum * LockType, + long * Options, + enum EventStatusEnum * adStatus, + struct _Command_Deprecated * pCommand, + struct _Recordset_Deprecated * pRecordset, + struct _Connection_Deprecated * pConnection ); + HRESULT ExecuteComplete ( + long RecordsAffected, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Command_Deprecated * pCommand, + struct _Recordset_Deprecated * pRecordset, + struct _Connection_Deprecated * pConnection ); + HRESULT WillConnect ( + BSTR * ConnectionString, + BSTR * UserID, + BSTR * Password, + long * Options, + enum EventStatusEnum * adStatus, + struct _Connection_Deprecated * pConnection ); + HRESULT ConnectComplete ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection_Deprecated * pConnection ); + HRESULT Disconnect ( + enum EventStatusEnum * adStatus, + struct _Connection_Deprecated * pConnection ); +}; + +struct __declspec(uuid("00000266-0000-0010-8000-00aa006d2ea4")) +RecordsetEvents_Deprecated : IDispatch +{ + // + // Wrapper methods for error-handling + // + + // Methods: + HRESULT WillChangeField ( + long cFields, + const _variant_t & Fields, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT FieldChangeComplete ( + long cFields, + const _variant_t & Fields, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT WillChangeRecord ( + enum EventReasonEnum adReason, + long cRecords, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT RecordChangeComplete ( + enum EventReasonEnum adReason, + long cRecords, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT WillChangeRecordset ( + enum EventReasonEnum adReason, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT RecordsetChangeComplete ( + enum EventReasonEnum adReason, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT WillMove ( + enum EventReasonEnum adReason, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT MoveComplete ( + enum EventReasonEnum adReason, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT EndOfRecordset ( + VARIANT_BOOL * fMoreData, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT FetchProgress ( + long Progress, + long MaxProgress, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT FetchComplete ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); +}; + +struct __declspec(uuid("00000565-0000-0010-8000-00aa006d2ea4")) +_Stream_Deprecated : IDispatch +{ + // + // Property data + // + + __declspec(property(get=GetSize)) + ADO_LONGPTR Size; + __declspec(property(get=GetEOS)) + VARIANT_BOOL EOS; + __declspec(property(get=GetPosition,put=PutPosition)) + ADO_LONGPTR Position; + __declspec(property(get=GetType,put=PutType)) + enum StreamTypeEnum Type; + __declspec(property(get=GetLineSeparator,put=PutLineSeparator)) + enum LineSeparatorEnum LineSeparator; + __declspec(property(get=GetState)) + enum ObjectStateEnum State; + __declspec(property(get=GetMode,put=PutMode)) + enum ConnectModeEnum Mode; + __declspec(property(get=GetCharset,put=PutCharset)) + _bstr_t Charset; + + // + // Wrapper methods for error-handling + // + + ADO_LONGPTR GetSize ( ); + VARIANT_BOOL GetEOS ( ); + ADO_LONGPTR GetPosition ( ); + void PutPosition ( + ADO_LONGPTR pPos ); + enum StreamTypeEnum GetType ( ); + void PutType ( + enum StreamTypeEnum ptype ); + enum LineSeparatorEnum GetLineSeparator ( ); + void PutLineSeparator ( + enum LineSeparatorEnum pLS ); + enum ObjectStateEnum GetState ( ); + enum ConnectModeEnum GetMode ( ); + void PutMode ( + enum ConnectModeEnum pMode ); + _bstr_t GetCharset ( ); + void PutCharset ( + _bstr_t pbstrCharset ); + _variant_t Read ( + long NumBytes ); + HRESULT Open ( + const _variant_t & Source, + enum ConnectModeEnum Mode, + enum StreamOpenOptionsEnum Options, + _bstr_t UserName, + _bstr_t Password ); + HRESULT Close ( ); + HRESULT SkipLine ( ); + HRESULT Write ( + const _variant_t & Buffer ); + HRESULT SetEOS ( ); + HRESULT CopyTo ( + struct _Stream_Deprecated * DestStream, + ADO_LONGPTR CharNumber ); + HRESULT Flush ( ); + HRESULT SaveToFile ( + _bstr_t FileName, + enum SaveOptionsEnum Options ); + HRESULT LoadFromFile ( + _bstr_t FileName ); + _bstr_t ReadText ( + long NumChars ); + HRESULT WriteText ( + _bstr_t Data, + enum StreamWriteEnum Options ); + HRESULT Cancel ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_Size ( + /*[out,retval]*/ ADO_LONGPTR * pSize ) = 0; + virtual HRESULT __stdcall get_EOS ( + /*[out,retval]*/ VARIANT_BOOL * pEOS ) = 0; + virtual HRESULT __stdcall get_Position ( + /*[out,retval]*/ ADO_LONGPTR * pPos ) = 0; + virtual HRESULT __stdcall put_Position ( + /*[in]*/ ADO_LONGPTR pPos ) = 0; + virtual HRESULT __stdcall get_Type ( + /*[out,retval]*/ enum StreamTypeEnum * ptype ) = 0; + virtual HRESULT __stdcall put_Type ( + /*[in]*/ enum StreamTypeEnum ptype ) = 0; + virtual HRESULT __stdcall get_LineSeparator ( + /*[out,retval]*/ enum LineSeparatorEnum * pLS ) = 0; + virtual HRESULT __stdcall put_LineSeparator ( + /*[in]*/ enum LineSeparatorEnum pLS ) = 0; + virtual HRESULT __stdcall get_State ( + /*[out,retval]*/ enum ObjectStateEnum * pState ) = 0; + virtual HRESULT __stdcall get_Mode ( + /*[out,retval]*/ enum ConnectModeEnum * pMode ) = 0; + virtual HRESULT __stdcall put_Mode ( + /*[in]*/ enum ConnectModeEnum pMode ) = 0; + virtual HRESULT __stdcall get_Charset ( + /*[out,retval]*/ BSTR * pbstrCharset ) = 0; + virtual HRESULT __stdcall put_Charset ( + /*[in]*/ BSTR pbstrCharset ) = 0; + virtual HRESULT __stdcall raw_Read ( + /*[in]*/ long NumBytes, + /*[out,retval]*/ VARIANT * pval ) = 0; + virtual HRESULT __stdcall raw_Open ( + /*[in]*/ VARIANT Source, + /*[in]*/ enum ConnectModeEnum Mode, + /*[in]*/ enum StreamOpenOptionsEnum Options, + /*[in]*/ BSTR UserName, + /*[in]*/ BSTR Password ) = 0; + virtual HRESULT __stdcall raw_Close ( ) = 0; + virtual HRESULT __stdcall raw_SkipLine ( ) = 0; + virtual HRESULT __stdcall raw_Write ( + /*[in]*/ VARIANT Buffer ) = 0; + virtual HRESULT __stdcall raw_SetEOS ( ) = 0; + virtual HRESULT __stdcall raw_CopyTo ( + /*[in]*/ struct _Stream_Deprecated * DestStream, + /*[in]*/ ADO_LONGPTR CharNumber ) = 0; + virtual HRESULT __stdcall raw_Flush ( ) = 0; + virtual HRESULT __stdcall raw_SaveToFile ( + /*[in]*/ BSTR FileName, + /*[in]*/ enum SaveOptionsEnum Options ) = 0; + virtual HRESULT __stdcall raw_LoadFromFile ( + /*[in]*/ BSTR FileName ) = 0; + virtual HRESULT __stdcall raw_ReadText ( + /*[in]*/ long NumChars, + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall raw_WriteText ( + /*[in]*/ BSTR Data, + /*[in]*/ enum StreamWriteEnum Options ) = 0; + virtual HRESULT __stdcall raw_Cancel ( ) = 0; +}; + +struct __declspec(uuid("00000505-0000-0010-8000-00aa006d2ea4")) +Field15_Deprecated : _ADO +{ + // + // Property data + // + + __declspec(property(get=GetValue,put=PutValue)) + _variant_t Value; + __declspec(property(get=GetName)) + _bstr_t Name; + __declspec(property(get=GetType)) + enum DataTypeEnum Type; + __declspec(property(get=GetDefinedSize)) + ADO_LONGPTR DefinedSize; + __declspec(property(get=GetOriginalValue)) + _variant_t OriginalValue; + __declspec(property(get=GetUnderlyingValue)) + _variant_t UnderlyingValue; + __declspec(property(get=GetActualSize)) + ADO_LONGPTR ActualSize; + __declspec(property(get=GetPrecision)) + unsigned char Precision; + __declspec(property(get=GetNumericScale)) + unsigned char NumericScale; + __declspec(property(get=GetAttributes)) + long Attributes; + + // + // Wrapper methods for error-handling + // + + ADO_LONGPTR GetActualSize ( ); + long GetAttributes ( ); + ADO_LONGPTR GetDefinedSize ( ); + _bstr_t GetName ( ); + enum DataTypeEnum GetType ( ); + _variant_t GetValue ( ); + void PutValue ( + const _variant_t & pvar ); + unsigned char GetPrecision ( ); + unsigned char GetNumericScale ( ); + HRESULT AppendChunk ( + const _variant_t & Data ); + _variant_t GetChunk ( + long Length ); + _variant_t GetOriginalValue ( ); + _variant_t GetUnderlyingValue ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_ActualSize ( + /*[out,retval]*/ ADO_LONGPTR * pl ) = 0; + virtual HRESULT __stdcall get_Attributes ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall get_DefinedSize ( + /*[out,retval]*/ ADO_LONGPTR * pl ) = 0; + virtual HRESULT __stdcall get_Name ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall get_Type ( + /*[out,retval]*/ enum DataTypeEnum * pDataType ) = 0; + virtual HRESULT __stdcall get_Value ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall put_Value ( + /*[in]*/ VARIANT pvar ) = 0; + virtual HRESULT __stdcall get_Precision ( + /*[out,retval]*/ unsigned char * pbPrecision ) = 0; + virtual HRESULT __stdcall get_NumericScale ( + /*[out,retval]*/ unsigned char * pbNumericScale ) = 0; + virtual HRESULT __stdcall raw_AppendChunk ( + /*[in]*/ VARIANT Data ) = 0; + virtual HRESULT __stdcall raw_GetChunk ( + /*[in]*/ long Length, + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall get_OriginalValue ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall get_UnderlyingValue ( + /*[out,retval]*/ VARIANT * pvar ) = 0; +}; + +struct __declspec(uuid("00001508-0000-0010-8000-00aa006d2ea4")) +Command15 : _ADO +{ + // + // Property data + // + + __declspec(property(get=GetParameters)) + ParametersPtr Parameters; + __declspec(property(get=GetActiveConnection,put=PutRefActiveConnection)) + _ConnectionPtr ActiveConnection; + __declspec(property(get=GetCommandText,put=PutCommandText)) + _bstr_t CommandText; + __declspec(property(get=GetCommandTimeout,put=PutCommandTimeout)) + long CommandTimeout; + __declspec(property(get=GetPrepared,put=PutPrepared)) + VARIANT_BOOL Prepared; + __declspec(property(get=GetCommandType,put=PutCommandType)) + enum CommandTypeEnum CommandType; + __declspec(property(get=GetName,put=PutName)) + _bstr_t Name; + + // + // Wrapper methods for error-handling + // + + _ConnectionPtr GetActiveConnection ( ); + void PutRefActiveConnection ( + struct _Connection * ppvObject ); + void PutActiveConnection ( + const _variant_t & ppvObject ); + _bstr_t GetCommandText ( ); + void PutCommandText ( + _bstr_t pbstr ); + long GetCommandTimeout ( ); + void PutCommandTimeout ( + long pl ); + VARIANT_BOOL GetPrepared ( ); + void PutPrepared ( + VARIANT_BOOL pfPrepared ); + _RecordsetPtr Execute ( + VARIANT * RecordsAffected, + VARIANT * Parameters, + long Options ); + _ParameterPtr CreateParameter ( + _bstr_t Name, + enum DataTypeEnum Type, + enum ParameterDirectionEnum Direction, + long Size, + const _variant_t & Value = vtMissing ); + ParametersPtr GetParameters ( ); + void PutCommandType ( + enum CommandTypeEnum plCmdType ); + enum CommandTypeEnum GetCommandType ( ); + _bstr_t GetName ( ); + void PutName ( + _bstr_t pbstrName ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_ActiveConnection ( + /*[out,retval]*/ struct _Connection * * ppvObject ) = 0; + virtual HRESULT __stdcall putref_ActiveConnection ( + /*[in]*/ struct _Connection * ppvObject ) = 0; + virtual HRESULT __stdcall put_ActiveConnection ( + /*[in]*/ VARIANT ppvObject ) = 0; + virtual HRESULT __stdcall get_CommandText ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall put_CommandText ( + /*[in]*/ BSTR pbstr ) = 0; + virtual HRESULT __stdcall get_CommandTimeout ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall put_CommandTimeout ( + /*[in]*/ long pl ) = 0; + virtual HRESULT __stdcall get_Prepared ( + /*[out,retval]*/ VARIANT_BOOL * pfPrepared ) = 0; + virtual HRESULT __stdcall put_Prepared ( + /*[in]*/ VARIANT_BOOL pfPrepared ) = 0; + virtual HRESULT __stdcall raw_Execute ( + /*[out]*/ VARIANT * RecordsAffected, + /*[in]*/ VARIANT * Parameters, + /*[in]*/ long Options, + /*[out,retval]*/ struct _Recordset * * ppiRs ) = 0; + virtual HRESULT __stdcall raw_CreateParameter ( + /*[in]*/ BSTR Name, + /*[in]*/ enum DataTypeEnum Type, + /*[in]*/ enum ParameterDirectionEnum Direction, + /*[in]*/ long Size, + /*[in]*/ VARIANT Value, + /*[out,retval]*/ struct _Parameter * * ppiprm ) = 0; + virtual HRESULT __stdcall get_Parameters ( + /*[out,retval]*/ struct Parameters * * ppvObject ) = 0; + virtual HRESULT __stdcall put_CommandType ( + /*[in]*/ enum CommandTypeEnum plCmdType ) = 0; + virtual HRESULT __stdcall get_CommandType ( + /*[out,retval]*/ enum CommandTypeEnum * plCmdType ) = 0; + virtual HRESULT __stdcall get_Name ( + /*[out,retval]*/ BSTR * pbstrName ) = 0; + virtual HRESULT __stdcall put_Name ( + /*[in]*/ BSTR pbstrName ) = 0; +}; + +struct __declspec(uuid("0000154e-0000-0010-8000-00aa006d2ea4")) +Command25 : Command15 +{ + // + // Property data + // + + __declspec(property(get=GetState)) + long State; + + // + // Wrapper methods for error-handling + // + + long GetState ( ); + HRESULT Cancel ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_State ( + /*[out,retval]*/ long * plObjState ) = 0; + virtual HRESULT __stdcall raw_Cancel ( ) = 0; +}; + +struct __declspec(uuid("986761e8-7269-4890-aa65-ad7c03697a6d")) +_Command : Command25 +{ + // + // Property data + // + + __declspec(property(get=GetDialect,put=PutDialect)) + _bstr_t Dialect; + __declspec(property(get=GetNamedParameters,put=PutNamedParameters)) + VARIANT_BOOL NamedParameters; + + // + // Wrapper methods for error-handling + // + + void PutRefCommandStream ( + IUnknown * pvStream ); + _variant_t GetCommandStream ( ); + void PutDialect ( + _bstr_t pbstrDialect ); + _bstr_t GetDialect ( ); + void PutNamedParameters ( + VARIANT_BOOL pfNamedParameters ); + VARIANT_BOOL GetNamedParameters ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall putref_CommandStream ( + /*[in]*/ IUnknown * pvStream ) = 0; + virtual HRESULT __stdcall get_CommandStream ( + /*[out,retval]*/ VARIANT * pvStream ) = 0; + virtual HRESULT __stdcall put_Dialect ( + /*[in]*/ BSTR pbstrDialect ) = 0; + virtual HRESULT __stdcall get_Dialect ( + /*[out,retval]*/ BSTR * pbstrDialect ) = 0; + virtual HRESULT __stdcall put_NamedParameters ( + /*[in]*/ VARIANT_BOOL pfNamedParameters ) = 0; + virtual HRESULT __stdcall get_NamedParameters ( + /*[out,retval]*/ VARIANT_BOOL * pfNamedParameters ) = 0; +}; + +struct __declspec(uuid("00001515-0000-0010-8000-00aa006d2ea4")) +Connection15 : _ADO +{ + // + // Property data + // + + __declspec(property(get=GetConnectionString,put=PutConnectionString)) + _bstr_t ConnectionString; + __declspec(property(get=GetCommandTimeout,put=PutCommandTimeout)) + long CommandTimeout; + __declspec(property(get=GetConnectionTimeout,put=PutConnectionTimeout)) + long ConnectionTimeout; + __declspec(property(get=GetVersion)) + _bstr_t Version; + __declspec(property(get=GetErrors)) + ErrorsPtr Errors; + __declspec(property(get=GetDefaultDatabase,put=PutDefaultDatabase)) + _bstr_t DefaultDatabase; + __declspec(property(get=GetIsolationLevel,put=PutIsolationLevel)) + enum IsolationLevelEnum IsolationLevel; + __declspec(property(get=GetAttributes,put=PutAttributes)) + long Attributes; + __declspec(property(get=GetCursorLocation,put=PutCursorLocation)) + enum CursorLocationEnum CursorLocation; + __declspec(property(get=GetMode,put=PutMode)) + enum ConnectModeEnum Mode; + __declspec(property(get=GetProvider,put=PutProvider)) + _bstr_t Provider; + __declspec(property(get=GetState)) + long State; + + // + // Wrapper methods for error-handling + // + + _bstr_t GetConnectionString ( ); + void PutConnectionString ( + _bstr_t pbstr ); + long GetCommandTimeout ( ); + void PutCommandTimeout ( + long plTimeout ); + long GetConnectionTimeout ( ); + void PutConnectionTimeout ( + long plTimeout ); + _bstr_t GetVersion ( ); + HRESULT Close ( ); + _RecordsetPtr Execute ( + _bstr_t CommandText, + VARIANT * RecordsAffected, + long Options ); + long BeginTrans ( ); + HRESULT CommitTrans ( ); + HRESULT RollbackTrans ( ); + HRESULT Open ( + _bstr_t ConnectionString, + _bstr_t UserID, + _bstr_t Password, + long Options ); + ErrorsPtr GetErrors ( ); + _bstr_t GetDefaultDatabase ( ); + void PutDefaultDatabase ( + _bstr_t pbstr ); + enum IsolationLevelEnum GetIsolationLevel ( ); + void PutIsolationLevel ( + enum IsolationLevelEnum Level ); + long GetAttributes ( ); + void PutAttributes ( + long plAttr ); + enum CursorLocationEnum GetCursorLocation ( ); + void PutCursorLocation ( + enum CursorLocationEnum plCursorLoc ); + enum ConnectModeEnum GetMode ( ); + void PutMode ( + enum ConnectModeEnum plMode ); + _bstr_t GetProvider ( ); + void PutProvider ( + _bstr_t pbstr ); + long GetState ( ); + _RecordsetPtr OpenSchema ( + enum SchemaEnum Schema, + const _variant_t & Restrictions = vtMissing, + const _variant_t & SchemaID = vtMissing ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_ConnectionString ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall put_ConnectionString ( + /*[in]*/ BSTR pbstr ) = 0; + virtual HRESULT __stdcall get_CommandTimeout ( + /*[out,retval]*/ long * plTimeout ) = 0; + virtual HRESULT __stdcall put_CommandTimeout ( + /*[in]*/ long plTimeout ) = 0; + virtual HRESULT __stdcall get_ConnectionTimeout ( + /*[out,retval]*/ long * plTimeout ) = 0; + virtual HRESULT __stdcall put_ConnectionTimeout ( + /*[in]*/ long plTimeout ) = 0; + virtual HRESULT __stdcall get_Version ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall raw_Close ( ) = 0; + virtual HRESULT __stdcall raw_Execute ( + /*[in]*/ BSTR CommandText, + /*[out]*/ VARIANT * RecordsAffected, + /*[in]*/ long Options, + /*[out,retval]*/ struct _Recordset * * ppiRset ) = 0; + virtual HRESULT __stdcall raw_BeginTrans ( + /*[out,retval]*/ long * TransactionLevel ) = 0; + virtual HRESULT __stdcall raw_CommitTrans ( ) = 0; + virtual HRESULT __stdcall raw_RollbackTrans ( ) = 0; + virtual HRESULT __stdcall raw_Open ( + /*[in]*/ BSTR ConnectionString, + /*[in]*/ BSTR UserID, + /*[in]*/ BSTR Password, + /*[in]*/ long Options ) = 0; + virtual HRESULT __stdcall get_Errors ( + /*[out,retval]*/ struct Errors * * ppvObject ) = 0; + virtual HRESULT __stdcall get_DefaultDatabase ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall put_DefaultDatabase ( + /*[in]*/ BSTR pbstr ) = 0; + virtual HRESULT __stdcall get_IsolationLevel ( + /*[out,retval]*/ enum IsolationLevelEnum * Level ) = 0; + virtual HRESULT __stdcall put_IsolationLevel ( + /*[in]*/ enum IsolationLevelEnum Level ) = 0; + virtual HRESULT __stdcall get_Attributes ( + /*[out,retval]*/ long * plAttr ) = 0; + virtual HRESULT __stdcall put_Attributes ( + /*[in]*/ long plAttr ) = 0; + virtual HRESULT __stdcall get_CursorLocation ( + /*[out,retval]*/ enum CursorLocationEnum * plCursorLoc ) = 0; + virtual HRESULT __stdcall put_CursorLocation ( + /*[in]*/ enum CursorLocationEnum plCursorLoc ) = 0; + virtual HRESULT __stdcall get_Mode ( + /*[out,retval]*/ enum ConnectModeEnum * plMode ) = 0; + virtual HRESULT __stdcall put_Mode ( + /*[in]*/ enum ConnectModeEnum plMode ) = 0; + virtual HRESULT __stdcall get_Provider ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall put_Provider ( + /*[in]*/ BSTR pbstr ) = 0; + virtual HRESULT __stdcall get_State ( + /*[out,retval]*/ long * plObjState ) = 0; + virtual HRESULT __stdcall raw_OpenSchema ( + /*[in]*/ enum SchemaEnum Schema, + /*[in]*/ VARIANT Restrictions, + /*[in]*/ VARIANT SchemaID, + /*[out,retval]*/ struct _Recordset * * pprset ) = 0; +}; + +struct __declspec(uuid("00001550-0000-0010-8000-00aa006d2ea4")) +_Connection : Connection15 +{ + // + // Wrapper methods for error-handling + // + + HRESULT Cancel ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall raw_Cancel ( ) = 0; +}; + +struct __declspec(uuid("0000150e-0000-0010-8000-00aa006d2ea4")) +Recordset15 : _ADO +{ + // + // Property data + // + + __declspec(property(get=GetFields)) + FieldsPtr Fields; + __declspec(property(get=GetPageSize,put=PutPageSize)) + long PageSize; + __declspec(property(get=GetPageCount)) + long PageCount; + __declspec(property(get=GetCursorLocation,put=PutCursorLocation)) + enum CursorLocationEnum CursorLocation; + __declspec(property(get=GetState)) + long State; + __declspec(property(get=GetMarshalOptions,put=PutMarshalOptions)) + enum MarshalOptionsEnum MarshalOptions; + __declspec(property(get=GetCollect,put=PutCollect)) + _variant_t Collect[]; + __declspec(property(get=GetEditMode)) + enum EditModeEnum EditMode; + __declspec(property(get=GetStatus)) + long Status; + __declspec(property(get=GetFilter,put=PutFilter)) + _variant_t Filter; + __declspec(property(get=GetSort,put=PutSort)) + _bstr_t Sort; + __declspec(property(get=GetAbsolutePosition,put=PutAbsolutePosition)) + enum PositionEnum AbsolutePosition; + __declspec(property(get=GetadoBOF)) + VARIANT_BOOL adoBOF; + __declspec(property(get=GetBookmark,put=PutBookmark)) + _variant_t Bookmark; + __declspec(property(get=GetCacheSize,put=PutCacheSize)) + long CacheSize; + __declspec(property(get=GetCursorType,put=PutCursorType)) + enum CursorTypeEnum CursorType; + __declspec(property(get=GetadoEOF)) + VARIANT_BOOL adoEOF; + __declspec(property(get=GetAbsolutePage,put=PutAbsolutePage)) + enum PositionEnum AbsolutePage; + __declspec(property(get=GetLockType,put=PutLockType)) + enum LockTypeEnum LockType; + __declspec(property(get=GetMaxRecords,put=PutMaxRecords)) + long MaxRecords; + __declspec(property(get=GetRecordCount)) + long RecordCount; + + // + // Wrapper methods for error-handling + // + + enum PositionEnum GetAbsolutePosition ( ); + void PutAbsolutePosition ( + enum PositionEnum pl ); + void PutRefActiveConnection ( + IDispatch * pvar ); + void PutActiveConnection ( + const _variant_t & pvar ); + _variant_t GetActiveConnection ( ); + VARIANT_BOOL GetadoBOF ( ); + _variant_t GetBookmark ( ); + void PutBookmark ( + const _variant_t & pvBookmark ); + long GetCacheSize ( ); + void PutCacheSize ( + long pl ); + enum CursorTypeEnum GetCursorType ( ); + void PutCursorType ( + enum CursorTypeEnum plCursorType ); + VARIANT_BOOL GetadoEOF ( ); + FieldsPtr GetFields ( ); + enum LockTypeEnum GetLockType ( ); + void PutLockType ( + enum LockTypeEnum plLockType ); + long GetMaxRecords ( ); + void PutMaxRecords ( + long plMaxRecords ); + long GetRecordCount ( ); + void PutRefSource ( + IDispatch * pvSource ); + void PutSource ( + _bstr_t pvSource ); + _variant_t GetSource ( ); + HRESULT AddNew ( + const _variant_t & FieldList = vtMissing, + const _variant_t & Values = vtMissing ); + HRESULT CancelUpdate ( ); + HRESULT Close ( ); + HRESULT Delete ( + enum AffectEnum AffectRecords ); + _variant_t GetRows ( + long Rows, + const _variant_t & Start = vtMissing, + const _variant_t & Fields = vtMissing ); + HRESULT Move ( + long NumRecords, + const _variant_t & Start = vtMissing ); + HRESULT MoveNext ( ); + HRESULT MovePrevious ( ); + HRESULT MoveFirst ( ); + HRESULT MoveLast ( ); + HRESULT Open ( + const _variant_t & Source, + const _variant_t & ActiveConnection, + enum CursorTypeEnum CursorType, + enum LockTypeEnum LockType, + long Options ); + HRESULT Requery ( + long Options ); + HRESULT _xResync ( + enum AffectEnum AffectRecords ); + HRESULT Update ( + const _variant_t & Fields = vtMissing, + const _variant_t & Values = vtMissing ); + enum PositionEnum GetAbsolutePage ( ); + void PutAbsolutePage ( + enum PositionEnum pl ); + enum EditModeEnum GetEditMode ( ); + _variant_t GetFilter ( ); + void PutFilter ( + const _variant_t & Criteria ); + long GetPageCount ( ); + long GetPageSize ( ); + void PutPageSize ( + long pl ); + _bstr_t GetSort ( ); + void PutSort ( + _bstr_t Criteria ); + long GetStatus ( ); + long GetState ( ); + _RecordsetPtr _xClone ( ); + HRESULT UpdateBatch ( + enum AffectEnum AffectRecords ); + HRESULT CancelBatch ( + enum AffectEnum AffectRecords ); + enum CursorLocationEnum GetCursorLocation ( ); + void PutCursorLocation ( + enum CursorLocationEnum plCursorLoc ); + _RecordsetPtr NextRecordset ( + VARIANT * RecordsAffected ); + VARIANT_BOOL Supports ( + enum CursorOptionEnum CursorOptions ); + _variant_t GetCollect ( + const _variant_t & Index ); + void PutCollect ( + const _variant_t & Index, + const _variant_t & pvar ); + enum MarshalOptionsEnum GetMarshalOptions ( ); + void PutMarshalOptions ( + enum MarshalOptionsEnum peMarshal ); + HRESULT Find ( + _bstr_t Criteria, + long SkipRecords, + enum SearchDirectionEnum SearchDirection, + const _variant_t & Start = vtMissing ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_AbsolutePosition ( + /*[out,retval]*/ enum PositionEnum * pl ) = 0; + virtual HRESULT __stdcall put_AbsolutePosition ( + /*[in]*/ enum PositionEnum pl ) = 0; + virtual HRESULT __stdcall putref_ActiveConnection ( + /*[in]*/ IDispatch * pvar ) = 0; + virtual HRESULT __stdcall put_ActiveConnection ( + /*[in]*/ VARIANT pvar ) = 0; + virtual HRESULT __stdcall get_ActiveConnection ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall get_adoBOF ( + /*[out,retval]*/ VARIANT_BOOL * pb ) = 0; + virtual HRESULT __stdcall get_Bookmark ( + /*[out,retval]*/ VARIANT * pvBookmark ) = 0; + virtual HRESULT __stdcall put_Bookmark ( + /*[in]*/ VARIANT pvBookmark ) = 0; + virtual HRESULT __stdcall get_CacheSize ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall put_CacheSize ( + /*[in]*/ long pl ) = 0; + virtual HRESULT __stdcall get_CursorType ( + /*[out,retval]*/ enum CursorTypeEnum * plCursorType ) = 0; + virtual HRESULT __stdcall put_CursorType ( + /*[in]*/ enum CursorTypeEnum plCursorType ) = 0; + virtual HRESULT __stdcall get_adoEOF ( + /*[out,retval]*/ VARIANT_BOOL * pb ) = 0; + virtual HRESULT __stdcall get_Fields ( + /*[out,retval]*/ struct Fields * * ppvObject ) = 0; + virtual HRESULT __stdcall get_LockType ( + /*[out,retval]*/ enum LockTypeEnum * plLockType ) = 0; + virtual HRESULT __stdcall put_LockType ( + /*[in]*/ enum LockTypeEnum plLockType ) = 0; + virtual HRESULT __stdcall get_MaxRecords ( + /*[out,retval]*/ long * plMaxRecords ) = 0; + virtual HRESULT __stdcall put_MaxRecords ( + /*[in]*/ long plMaxRecords ) = 0; + virtual HRESULT __stdcall get_RecordCount ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall putref_Source ( + /*[in]*/ IDispatch * pvSource ) = 0; + virtual HRESULT __stdcall put_Source ( + /*[in]*/ BSTR pvSource ) = 0; + virtual HRESULT __stdcall get_Source ( + /*[out,retval]*/ VARIANT * pvSource ) = 0; + virtual HRESULT __stdcall raw_AddNew ( + /*[in]*/ VARIANT FieldList = vtMissing, + /*[in]*/ VARIANT Values = vtMissing ) = 0; + virtual HRESULT __stdcall raw_CancelUpdate ( ) = 0; + virtual HRESULT __stdcall raw_Close ( ) = 0; + virtual HRESULT __stdcall raw_Delete ( + /*[in]*/ enum AffectEnum AffectRecords ) = 0; + virtual HRESULT __stdcall raw_GetRows ( + /*[in]*/ long Rows, + /*[in]*/ VARIANT Start, + /*[in]*/ VARIANT Fields, + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall raw_Move ( + /*[in]*/ long NumRecords, + /*[in]*/ VARIANT Start = vtMissing ) = 0; + virtual HRESULT __stdcall raw_MoveNext ( ) = 0; + virtual HRESULT __stdcall raw_MovePrevious ( ) = 0; + virtual HRESULT __stdcall raw_MoveFirst ( ) = 0; + virtual HRESULT __stdcall raw_MoveLast ( ) = 0; + virtual HRESULT __stdcall raw_Open ( + /*[in]*/ VARIANT Source, + /*[in]*/ VARIANT ActiveConnection, + /*[in]*/ enum CursorTypeEnum CursorType, + /*[in]*/ enum LockTypeEnum LockType, + /*[in]*/ long Options ) = 0; + virtual HRESULT __stdcall raw_Requery ( + /*[in]*/ long Options ) = 0; + virtual HRESULT __stdcall raw__xResync ( + /*[in]*/ enum AffectEnum AffectRecords ) = 0; + virtual HRESULT __stdcall raw_Update ( + /*[in]*/ VARIANT Fields = vtMissing, + /*[in]*/ VARIANT Values = vtMissing ) = 0; + virtual HRESULT __stdcall get_AbsolutePage ( + /*[out,retval]*/ enum PositionEnum * pl ) = 0; + virtual HRESULT __stdcall put_AbsolutePage ( + /*[in]*/ enum PositionEnum pl ) = 0; + virtual HRESULT __stdcall get_EditMode ( + /*[out,retval]*/ enum EditModeEnum * pl ) = 0; + virtual HRESULT __stdcall get_Filter ( + /*[out,retval]*/ VARIANT * Criteria ) = 0; + virtual HRESULT __stdcall put_Filter ( + /*[in]*/ VARIANT Criteria ) = 0; + virtual HRESULT __stdcall get_PageCount ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall get_PageSize ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall put_PageSize ( + /*[in]*/ long pl ) = 0; + virtual HRESULT __stdcall get_Sort ( + /*[out,retval]*/ BSTR * Criteria ) = 0; + virtual HRESULT __stdcall put_Sort ( + /*[in]*/ BSTR Criteria ) = 0; + virtual HRESULT __stdcall get_Status ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall get_State ( + /*[out,retval]*/ long * plObjState ) = 0; + virtual HRESULT __stdcall raw__xClone ( + /*[out,retval]*/ struct _Recordset * * ppvObject ) = 0; + virtual HRESULT __stdcall raw_UpdateBatch ( + /*[in]*/ enum AffectEnum AffectRecords ) = 0; + virtual HRESULT __stdcall raw_CancelBatch ( + /*[in]*/ enum AffectEnum AffectRecords ) = 0; + virtual HRESULT __stdcall get_CursorLocation ( + /*[out,retval]*/ enum CursorLocationEnum * plCursorLoc ) = 0; + virtual HRESULT __stdcall put_CursorLocation ( + /*[in]*/ enum CursorLocationEnum plCursorLoc ) = 0; + virtual HRESULT __stdcall raw_NextRecordset ( + /*[out]*/ VARIANT * RecordsAffected, + /*[out,retval]*/ struct _Recordset * * ppiRs ) = 0; + virtual HRESULT __stdcall raw_Supports ( + /*[in]*/ enum CursorOptionEnum CursorOptions, + /*[out,retval]*/ VARIANT_BOOL * pb ) = 0; + virtual HRESULT __stdcall get_Collect ( + /*[in]*/ VARIANT Index, + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall put_Collect ( + /*[in]*/ VARIANT Index, + /*[in]*/ VARIANT pvar ) = 0; + virtual HRESULT __stdcall get_MarshalOptions ( + /*[out,retval]*/ enum MarshalOptionsEnum * peMarshal ) = 0; + virtual HRESULT __stdcall put_MarshalOptions ( + /*[in]*/ enum MarshalOptionsEnum peMarshal ) = 0; + virtual HRESULT __stdcall raw_Find ( + /*[in]*/ BSTR Criteria, + /*[in]*/ long SkipRecords, + /*[in]*/ enum SearchDirectionEnum SearchDirection, + /*[in]*/ VARIANT Start = vtMissing ) = 0; +}; + +struct __declspec(uuid("0000154f-0000-0010-8000-00aa006d2ea4")) +Recordset20 : Recordset15 +{ + // + // Property data + // + + __declspec(property(get=GetDataSource,put=PutRefDataSource)) + IUnknownPtr DataSource; + __declspec(property(get=GetActiveCommand)) + IDispatchPtr ActiveCommand; + __declspec(property(get=GetStayInSync,put=PutStayInSync)) + VARIANT_BOOL StayInSync; + __declspec(property(get=GetDataMember,put=PutDataMember)) + _bstr_t DataMember; + + // + // Wrapper methods for error-handling + // + + HRESULT Cancel ( ); + IUnknownPtr GetDataSource ( ); + void PutRefDataSource ( + IUnknown * ppunkDataSource ); + HRESULT _xSave ( + _bstr_t FileName, + enum PersistFormatEnum PersistFormat ); + IDispatchPtr GetActiveCommand ( ); + void PutStayInSync ( + VARIANT_BOOL pbStayInSync ); + VARIANT_BOOL GetStayInSync ( ); + _bstr_t GetString ( + enum StringFormatEnum StringFormat, + long NumRows, + _bstr_t ColumnDelimeter, + _bstr_t RowDelimeter, + _bstr_t NullExpr ); + _bstr_t GetDataMember ( ); + void PutDataMember ( + _bstr_t pbstrDataMember ); + enum CompareEnum CompareBookmarks ( + const _variant_t & Bookmark1, + const _variant_t & Bookmark2 ); + _RecordsetPtr Clone ( + enum LockTypeEnum LockType ); + HRESULT Resync ( + enum AffectEnum AffectRecords, + enum ResyncEnum ResyncValues ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall raw_Cancel ( ) = 0; + virtual HRESULT __stdcall get_DataSource ( + /*[out,retval]*/ IUnknown * * ppunkDataSource ) = 0; + virtual HRESULT __stdcall putref_DataSource ( + /*[in]*/ IUnknown * ppunkDataSource ) = 0; + virtual HRESULT __stdcall raw__xSave ( + /*[in]*/ BSTR FileName, + /*[in]*/ enum PersistFormatEnum PersistFormat ) = 0; + virtual HRESULT __stdcall get_ActiveCommand ( + /*[out,retval]*/ IDispatch * * ppCmd ) = 0; + virtual HRESULT __stdcall put_StayInSync ( + /*[in]*/ VARIANT_BOOL pbStayInSync ) = 0; + virtual HRESULT __stdcall get_StayInSync ( + /*[out,retval]*/ VARIANT_BOOL * pbStayInSync ) = 0; + virtual HRESULT __stdcall raw_GetString ( + /*[in]*/ enum StringFormatEnum StringFormat, + /*[in]*/ long NumRows, + /*[in]*/ BSTR ColumnDelimeter, + /*[in]*/ BSTR RowDelimeter, + /*[in]*/ BSTR NullExpr, + /*[out,retval]*/ BSTR * pRetString ) = 0; + virtual HRESULT __stdcall get_DataMember ( + /*[out,retval]*/ BSTR * pbstrDataMember ) = 0; + virtual HRESULT __stdcall put_DataMember ( + /*[in]*/ BSTR pbstrDataMember ) = 0; + virtual HRESULT __stdcall raw_CompareBookmarks ( + /*[in]*/ VARIANT Bookmark1, + /*[in]*/ VARIANT Bookmark2, + /*[out,retval]*/ enum CompareEnum * pCompare ) = 0; + virtual HRESULT __stdcall raw_Clone ( + /*[in]*/ enum LockTypeEnum LockType, + /*[out,retval]*/ struct _Recordset * * ppvObject ) = 0; + virtual HRESULT __stdcall raw_Resync ( + /*[in]*/ enum AffectEnum AffectRecords, + /*[in]*/ enum ResyncEnum ResyncValues ) = 0; +}; + +struct __declspec(uuid("00001555-0000-0010-8000-00aa006d2ea4")) +Recordset21 : Recordset20 +{ + // + // Property data + // + + __declspec(property(get=GetIndex,put=PutIndex)) + _bstr_t Index; + + // + // Wrapper methods for error-handling + // + + HRESULT Seek ( + const _variant_t & KeyValues, + enum SeekEnum SeekOption ); + void PutIndex ( + _bstr_t pbstrIndex ); + _bstr_t GetIndex ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall raw_Seek ( + /*[in]*/ VARIANT KeyValues, + /*[in]*/ enum SeekEnum SeekOption ) = 0; + virtual HRESULT __stdcall put_Index ( + /*[in]*/ BSTR pbstrIndex ) = 0; + virtual HRESULT __stdcall get_Index ( + /*[out,retval]*/ BSTR * pbstrIndex ) = 0; +}; + +struct __declspec(uuid("00001556-0000-0010-8000-00aa006d2ea4")) +_Recordset : Recordset21 +{ + // + // Wrapper methods for error-handling + // + + HRESULT Save ( + const _variant_t & Destination, + enum PersistFormatEnum PersistFormat ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall raw_Save ( + /*[in]*/ VARIANT Destination, + /*[in]*/ enum PersistFormatEnum PersistFormat ) = 0; +}; + +struct __declspec(uuid("00001402-0000-0010-8000-00aa006d2ea4")) +ConnectionEventsVt : IUnknown +{ + // + // Wrapper methods for error-handling + // + + HRESULT InfoMessage ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection * pConnection ); + HRESULT BeginTransComplete ( + long TransactionLevel, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection * pConnection ); + HRESULT CommitTransComplete ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection * pConnection ); + HRESULT RollbackTransComplete ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection * pConnection ); + HRESULT WillExecute ( + BSTR * Source, + enum CursorTypeEnum * CursorType, + enum LockTypeEnum * LockType, + long * Options, + enum EventStatusEnum * adStatus, + struct _Command * pCommand, + struct _Recordset * pRecordset, + struct _Connection * pConnection ); + HRESULT ExecuteComplete ( + long RecordsAffected, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Command * pCommand, + struct _Recordset * pRecordset, + struct _Connection * pConnection ); + HRESULT WillConnect ( + BSTR * ConnectionString, + BSTR * UserID, + BSTR * Password, + long * Options, + enum EventStatusEnum * adStatus, + struct _Connection * pConnection ); + HRESULT ConnectComplete ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection * pConnection ); + HRESULT Disconnect ( + enum EventStatusEnum * adStatus, + struct _Connection * pConnection ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall raw_InfoMessage ( + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Connection * pConnection ) = 0; + virtual HRESULT __stdcall raw_BeginTransComplete ( + /*[in]*/ long TransactionLevel, + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Connection * pConnection ) = 0; + virtual HRESULT __stdcall raw_CommitTransComplete ( + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Connection * pConnection ) = 0; + virtual HRESULT __stdcall raw_RollbackTransComplete ( + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Connection * pConnection ) = 0; + virtual HRESULT __stdcall raw_WillExecute ( + /*[in,out]*/ BSTR * Source, + /*[in,out]*/ enum CursorTypeEnum * CursorType, + /*[in,out]*/ enum LockTypeEnum * LockType, + /*[in,out]*/ long * Options, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Command * pCommand, + /*[in]*/ struct _Recordset * pRecordset, + /*[in]*/ struct _Connection * pConnection ) = 0; + virtual HRESULT __stdcall raw_ExecuteComplete ( + /*[in]*/ long RecordsAffected, + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Command * pCommand, + /*[in]*/ struct _Recordset * pRecordset, + /*[in]*/ struct _Connection * pConnection ) = 0; + virtual HRESULT __stdcall raw_WillConnect ( + /*[in,out]*/ BSTR * ConnectionString, + /*[in,out]*/ BSTR * UserID, + /*[in,out]*/ BSTR * Password, + /*[in,out]*/ long * Options, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Connection * pConnection ) = 0; + virtual HRESULT __stdcall raw_ConnectComplete ( + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Connection * pConnection ) = 0; + virtual HRESULT __stdcall raw_Disconnect ( + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Connection * pConnection ) = 0; +}; + +struct __declspec(uuid("00001403-0000-0010-8000-00aa006d2ea4")) +RecordsetEventsVt : IUnknown +{ + // + // Wrapper methods for error-handling + // + + HRESULT WillChangeField ( + long cFields, + const _variant_t & Fields, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT FieldChangeComplete ( + long cFields, + const _variant_t & Fields, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT WillChangeRecord ( + enum EventReasonEnum adReason, + long cRecords, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT RecordChangeComplete ( + enum EventReasonEnum adReason, + long cRecords, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT WillChangeRecordset ( + enum EventReasonEnum adReason, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT RecordsetChangeComplete ( + enum EventReasonEnum adReason, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT WillMove ( + enum EventReasonEnum adReason, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT MoveComplete ( + enum EventReasonEnum adReason, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT EndOfRecordset ( + VARIANT_BOOL * fMoreData, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT FetchProgress ( + long Progress, + long MaxProgress, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + HRESULT FetchComplete ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset * pRecordset ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall raw_WillChangeField ( + /*[in]*/ long cFields, + /*[in]*/ VARIANT Fields, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset * pRecordset ) = 0; + virtual HRESULT __stdcall raw_FieldChangeComplete ( + /*[in]*/ long cFields, + /*[in]*/ VARIANT Fields, + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset * pRecordset ) = 0; + virtual HRESULT __stdcall raw_WillChangeRecord ( + /*[in]*/ enum EventReasonEnum adReason, + /*[in]*/ long cRecords, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset * pRecordset ) = 0; + virtual HRESULT __stdcall raw_RecordChangeComplete ( + /*[in]*/ enum EventReasonEnum adReason, + /*[in]*/ long cRecords, + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset * pRecordset ) = 0; + virtual HRESULT __stdcall raw_WillChangeRecordset ( + /*[in]*/ enum EventReasonEnum adReason, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset * pRecordset ) = 0; + virtual HRESULT __stdcall raw_RecordsetChangeComplete ( + /*[in]*/ enum EventReasonEnum adReason, + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset * pRecordset ) = 0; + virtual HRESULT __stdcall raw_WillMove ( + /*[in]*/ enum EventReasonEnum adReason, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset * pRecordset ) = 0; + virtual HRESULT __stdcall raw_MoveComplete ( + /*[in]*/ enum EventReasonEnum adReason, + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset * pRecordset ) = 0; + virtual HRESULT __stdcall raw_EndOfRecordset ( + /*[in,out]*/ VARIANT_BOOL * fMoreData, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset * pRecordset ) = 0; + virtual HRESULT __stdcall raw_FetchProgress ( + /*[in]*/ long Progress, + /*[in]*/ long MaxProgress, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset * pRecordset ) = 0; + virtual HRESULT __stdcall raw_FetchComplete ( + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset * pRecordset ) = 0; +}; + +struct __declspec(uuid("00001562-0000-0010-8000-00aa006d2ea4")) +_Record : _ADO +{ + // + // Property data + // + + __declspec(property(get=GetFields)) + FieldsPtr Fields; + __declspec(property(get=GetState)) + enum ObjectStateEnum State; + __declspec(property(get=GetMode,put=PutMode)) + enum ConnectModeEnum Mode; + __declspec(property(get=GetParentURL)) + _bstr_t ParentURL; + __declspec(property(get=GetRecordType)) + enum RecordTypeEnum RecordType; + + // + // Wrapper methods for error-handling + // + + _variant_t GetActiveConnection ( ); + void PutActiveConnection ( + _bstr_t pvar ); + void PutRefActiveConnection ( + struct _Connection * pvar ); + enum ObjectStateEnum GetState ( ); + _variant_t GetSource ( ); + void PutSource ( + _bstr_t pvar ); + void PutRefSource ( + IDispatch * pvar ); + enum ConnectModeEnum GetMode ( ); + void PutMode ( + enum ConnectModeEnum pMode ); + _bstr_t GetParentURL ( ); + _bstr_t MoveRecord ( + _bstr_t Source, + _bstr_t Destination, + _bstr_t UserName, + _bstr_t Password, + enum MoveRecordOptionsEnum Options, + VARIANT_BOOL Async ); + _bstr_t CopyRecord ( + _bstr_t Source, + _bstr_t Destination, + _bstr_t UserName, + _bstr_t Password, + enum CopyRecordOptionsEnum Options, + VARIANT_BOOL Async ); + HRESULT DeleteRecord ( + _bstr_t Source, + VARIANT_BOOL Async ); + HRESULT Open ( + const _variant_t & Source, + const _variant_t & ActiveConnection, + enum ConnectModeEnum Mode, + enum RecordCreateOptionsEnum CreateOptions, + enum RecordOpenOptionsEnum Options, + _bstr_t UserName, + _bstr_t Password ); + HRESULT Close ( ); + FieldsPtr GetFields ( ); + enum RecordTypeEnum GetRecordType ( ); + _RecordsetPtr GetChildren ( ); + HRESULT Cancel ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_ActiveConnection ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall put_ActiveConnection ( + /*[in]*/ BSTR pvar ) = 0; + virtual HRESULT __stdcall putref_ActiveConnection ( + /*[in]*/ struct _Connection * pvar ) = 0; + virtual HRESULT __stdcall get_State ( + /*[out,retval]*/ enum ObjectStateEnum * pState ) = 0; + virtual HRESULT __stdcall get_Source ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall put_Source ( + /*[in]*/ BSTR pvar ) = 0; + virtual HRESULT __stdcall putref_Source ( + /*[in]*/ IDispatch * pvar ) = 0; + virtual HRESULT __stdcall get_Mode ( + /*[out,retval]*/ enum ConnectModeEnum * pMode ) = 0; + virtual HRESULT __stdcall put_Mode ( + /*[in]*/ enum ConnectModeEnum pMode ) = 0; + virtual HRESULT __stdcall get_ParentURL ( + /*[out,retval]*/ BSTR * pbstrParentURL ) = 0; + virtual HRESULT __stdcall raw_MoveRecord ( + /*[in]*/ BSTR Source, + /*[in]*/ BSTR Destination, + /*[in]*/ BSTR UserName, + /*[in]*/ BSTR Password, + /*[in]*/ enum MoveRecordOptionsEnum Options, + /*[in]*/ VARIANT_BOOL Async, + /*[out,retval]*/ BSTR * pbstrNewURL ) = 0; + virtual HRESULT __stdcall raw_CopyRecord ( + /*[in]*/ BSTR Source, + /*[in]*/ BSTR Destination, + /*[in]*/ BSTR UserName, + /*[in]*/ BSTR Password, + /*[in]*/ enum CopyRecordOptionsEnum Options, + /*[in]*/ VARIANT_BOOL Async, + /*[out,retval]*/ BSTR * pbstrNewURL ) = 0; + virtual HRESULT __stdcall raw_DeleteRecord ( + /*[in]*/ BSTR Source, + /*[in]*/ VARIANT_BOOL Async ) = 0; + virtual HRESULT __stdcall raw_Open ( + /*[in]*/ VARIANT Source, + /*[in]*/ VARIANT ActiveConnection, + /*[in]*/ enum ConnectModeEnum Mode, + /*[in]*/ enum RecordCreateOptionsEnum CreateOptions, + /*[in]*/ enum RecordOpenOptionsEnum Options, + /*[in]*/ BSTR UserName, + /*[in]*/ BSTR Password ) = 0; + virtual HRESULT __stdcall raw_Close ( ) = 0; + virtual HRESULT __stdcall get_Fields ( + /*[out,retval]*/ struct Fields * * ppFlds ) = 0; + virtual HRESULT __stdcall get_RecordType ( + /*[out,retval]*/ enum RecordTypeEnum * ptype ) = 0; + virtual HRESULT __stdcall raw_GetChildren ( + /*[out,retval]*/ struct _Recordset * * pprset ) = 0; + virtual HRESULT __stdcall raw_Cancel ( ) = 0; +}; + +struct __declspec(uuid("00000402-0000-0010-8000-00aa006d2ea4")) +ConnectionEventsVt_Deprecated : IUnknown +{ + // + // Wrapper methods for error-handling + // + + HRESULT InfoMessage ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection_Deprecated * pConnection ); + HRESULT BeginTransComplete ( + long TransactionLevel, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection_Deprecated * pConnection ); + HRESULT CommitTransComplete ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection_Deprecated * pConnection ); + HRESULT RollbackTransComplete ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection_Deprecated * pConnection ); + HRESULT WillExecute ( + BSTR * Source, + enum CursorTypeEnum * CursorType, + enum LockTypeEnum * LockType, + long * Options, + enum EventStatusEnum * adStatus, + struct _Command_Deprecated * pCommand, + struct _Recordset_Deprecated * pRecordset, + struct _Connection_Deprecated * pConnection ); + HRESULT ExecuteComplete ( + long RecordsAffected, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Command_Deprecated * pCommand, + struct _Recordset_Deprecated * pRecordset, + struct _Connection_Deprecated * pConnection ); + HRESULT WillConnect ( + BSTR * ConnectionString, + BSTR * UserID, + BSTR * Password, + long * Options, + enum EventStatusEnum * adStatus, + struct _Connection_Deprecated * pConnection ); + HRESULT ConnectComplete ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Connection_Deprecated * pConnection ); + HRESULT Disconnect ( + enum EventStatusEnum * adStatus, + struct _Connection_Deprecated * pConnection ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall raw_InfoMessage ( + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Connection_Deprecated * pConnection ) = 0; + virtual HRESULT __stdcall raw_BeginTransComplete ( + /*[in]*/ long TransactionLevel, + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Connection_Deprecated * pConnection ) = 0; + virtual HRESULT __stdcall raw_CommitTransComplete ( + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Connection_Deprecated * pConnection ) = 0; + virtual HRESULT __stdcall raw_RollbackTransComplete ( + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Connection_Deprecated * pConnection ) = 0; + virtual HRESULT __stdcall raw_WillExecute ( + /*[in,out]*/ BSTR * Source, + /*[in,out]*/ enum CursorTypeEnum * CursorType, + /*[in,out]*/ enum LockTypeEnum * LockType, + /*[in,out]*/ long * Options, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Command_Deprecated * pCommand, + /*[in]*/ struct _Recordset_Deprecated * pRecordset, + /*[in]*/ struct _Connection_Deprecated * pConnection ) = 0; + virtual HRESULT __stdcall raw_ExecuteComplete ( + /*[in]*/ long RecordsAffected, + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Command_Deprecated * pCommand, + /*[in]*/ struct _Recordset_Deprecated * pRecordset, + /*[in]*/ struct _Connection_Deprecated * pConnection ) = 0; + virtual HRESULT __stdcall raw_WillConnect ( + /*[in,out]*/ BSTR * ConnectionString, + /*[in,out]*/ BSTR * UserID, + /*[in,out]*/ BSTR * Password, + /*[in,out]*/ long * Options, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Connection_Deprecated * pConnection ) = 0; + virtual HRESULT __stdcall raw_ConnectComplete ( + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Connection_Deprecated * pConnection ) = 0; + virtual HRESULT __stdcall raw_Disconnect ( + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Connection_Deprecated * pConnection ) = 0; +}; + +struct __declspec(uuid("00000515-0000-0010-8000-00aa006d2ea4")) +Connection15_Deprecated : _ADO +{ + // + // Property data + // + + __declspec(property(get=GetConnectionString,put=PutConnectionString)) + _bstr_t ConnectionString; + __declspec(property(get=GetCommandTimeout,put=PutCommandTimeout)) + long CommandTimeout; + __declspec(property(get=GetConnectionTimeout,put=PutConnectionTimeout)) + long ConnectionTimeout; + __declspec(property(get=GetVersion)) + _bstr_t Version; + __declspec(property(get=GetErrors)) + ErrorsPtr Errors; + __declspec(property(get=GetDefaultDatabase,put=PutDefaultDatabase)) + _bstr_t DefaultDatabase; + __declspec(property(get=GetIsolationLevel,put=PutIsolationLevel)) + enum IsolationLevelEnum IsolationLevel; + __declspec(property(get=GetAttributes,put=PutAttributes)) + long Attributes; + __declspec(property(get=GetCursorLocation,put=PutCursorLocation)) + enum CursorLocationEnum CursorLocation; + __declspec(property(get=GetMode,put=PutMode)) + enum ConnectModeEnum Mode; + __declspec(property(get=GetProvider,put=PutProvider)) + _bstr_t Provider; + __declspec(property(get=GetState)) + long State; + + // + // Wrapper methods for error-handling + // + + _bstr_t GetConnectionString ( ); + void PutConnectionString ( + _bstr_t pbstr ); + long GetCommandTimeout ( ); + void PutCommandTimeout ( + long plTimeout ); + long GetConnectionTimeout ( ); + void PutConnectionTimeout ( + long plTimeout ); + _bstr_t GetVersion ( ); + HRESULT Close ( ); + _Recordset_DeprecatedPtr Execute ( + _bstr_t CommandText, + VARIANT * RecordsAffected, + long Options ); + long BeginTrans ( ); + HRESULT CommitTrans ( ); + HRESULT RollbackTrans ( ); + HRESULT Open ( + _bstr_t ConnectionString, + _bstr_t UserID, + _bstr_t Password, + long Options ); + ErrorsPtr GetErrors ( ); + _bstr_t GetDefaultDatabase ( ); + void PutDefaultDatabase ( + _bstr_t pbstr ); + enum IsolationLevelEnum GetIsolationLevel ( ); + void PutIsolationLevel ( + enum IsolationLevelEnum Level ); + long GetAttributes ( ); + void PutAttributes ( + long plAttr ); + enum CursorLocationEnum GetCursorLocation ( ); + void PutCursorLocation ( + enum CursorLocationEnum plCursorLoc ); + enum ConnectModeEnum GetMode ( ); + void PutMode ( + enum ConnectModeEnum plMode ); + _bstr_t GetProvider ( ); + void PutProvider ( + _bstr_t pbstr ); + long GetState ( ); + _Recordset_DeprecatedPtr OpenSchema ( + enum SchemaEnum Schema, + const _variant_t & Restrictions = vtMissing, + const _variant_t & SchemaID = vtMissing ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_ConnectionString ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall put_ConnectionString ( + /*[in]*/ BSTR pbstr ) = 0; + virtual HRESULT __stdcall get_CommandTimeout ( + /*[out,retval]*/ long * plTimeout ) = 0; + virtual HRESULT __stdcall put_CommandTimeout ( + /*[in]*/ long plTimeout ) = 0; + virtual HRESULT __stdcall get_ConnectionTimeout ( + /*[out,retval]*/ long * plTimeout ) = 0; + virtual HRESULT __stdcall put_ConnectionTimeout ( + /*[in]*/ long plTimeout ) = 0; + virtual HRESULT __stdcall get_Version ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall raw_Close ( ) = 0; + virtual HRESULT __stdcall raw_Execute ( + /*[in]*/ BSTR CommandText, + /*[out]*/ VARIANT * RecordsAffected, + /*[in]*/ long Options, + /*[out,retval]*/ struct _Recordset_Deprecated * * ppiRset ) = 0; + virtual HRESULT __stdcall raw_BeginTrans ( + /*[out,retval]*/ long * TransactionLevel ) = 0; + virtual HRESULT __stdcall raw_CommitTrans ( ) = 0; + virtual HRESULT __stdcall raw_RollbackTrans ( ) = 0; + virtual HRESULT __stdcall raw_Open ( + /*[in]*/ BSTR ConnectionString, + /*[in]*/ BSTR UserID, + /*[in]*/ BSTR Password, + /*[in]*/ long Options ) = 0; + virtual HRESULT __stdcall get_Errors ( + /*[out,retval]*/ struct Errors * * ppvObject ) = 0; + virtual HRESULT __stdcall get_DefaultDatabase ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall put_DefaultDatabase ( + /*[in]*/ BSTR pbstr ) = 0; + virtual HRESULT __stdcall get_IsolationLevel ( + /*[out,retval]*/ enum IsolationLevelEnum * Level ) = 0; + virtual HRESULT __stdcall put_IsolationLevel ( + /*[in]*/ enum IsolationLevelEnum Level ) = 0; + virtual HRESULT __stdcall get_Attributes ( + /*[out,retval]*/ long * plAttr ) = 0; + virtual HRESULT __stdcall put_Attributes ( + /*[in]*/ long plAttr ) = 0; + virtual HRESULT __stdcall get_CursorLocation ( + /*[out,retval]*/ enum CursorLocationEnum * plCursorLoc ) = 0; + virtual HRESULT __stdcall put_CursorLocation ( + /*[in]*/ enum CursorLocationEnum plCursorLoc ) = 0; + virtual HRESULT __stdcall get_Mode ( + /*[out,retval]*/ enum ConnectModeEnum * plMode ) = 0; + virtual HRESULT __stdcall put_Mode ( + /*[in]*/ enum ConnectModeEnum plMode ) = 0; + virtual HRESULT __stdcall get_Provider ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall put_Provider ( + /*[in]*/ BSTR pbstr ) = 0; + virtual HRESULT __stdcall get_State ( + /*[out,retval]*/ long * plObjState ) = 0; + virtual HRESULT __stdcall raw_OpenSchema ( + /*[in]*/ enum SchemaEnum Schema, + /*[in]*/ VARIANT Restrictions, + /*[in]*/ VARIANT SchemaID, + /*[out,retval]*/ struct _Recordset_Deprecated * * pprset ) = 0; +}; + +struct __declspec(uuid("00000550-0000-0010-8000-00aa006d2ea4")) +_Connection_Deprecated : Connection15_Deprecated +{ + // + // Wrapper methods for error-handling + // + + HRESULT Cancel ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall raw_Cancel ( ) = 0; +}; + +struct __declspec(uuid("0000050e-0000-0010-8000-00aa006d2ea4")) +Recordset15_Deprecated : _ADO +{ + // + // Property data + // + + __declspec(property(get=GetFields)) + Fields_DeprecatedPtr Fields; + __declspec(property(get=GetPageSize,put=PutPageSize)) + long PageSize; + __declspec(property(get=GetPageCount)) + ADO_LONGPTR PageCount; + __declspec(property(get=GetCursorLocation,put=PutCursorLocation)) + enum CursorLocationEnum CursorLocation; + __declspec(property(get=GetState)) + long State; + __declspec(property(get=GetMarshalOptions,put=PutMarshalOptions)) + enum MarshalOptionsEnum MarshalOptions; + __declspec(property(get=GetCollect,put=PutCollect)) + _variant_t Collect[]; + __declspec(property(get=GetEditMode)) + enum EditModeEnum EditMode; + __declspec(property(get=GetStatus)) + long Status; + __declspec(property(get=GetFilter,put=PutFilter)) + _variant_t Filter; + __declspec(property(get=GetSort,put=PutSort)) + _bstr_t Sort; + __declspec(property(get=GetAbsolutePosition,put=PutAbsolutePosition)) + PositionEnum_Param AbsolutePosition; + __declspec(property(get=GetadoBOF)) + VARIANT_BOOL adoBOF; + __declspec(property(get=GetBookmark,put=PutBookmark)) + _variant_t Bookmark; + __declspec(property(get=GetCacheSize,put=PutCacheSize)) + long CacheSize; + __declspec(property(get=GetCursorType,put=PutCursorType)) + enum CursorTypeEnum CursorType; + __declspec(property(get=GetadoEOF)) + VARIANT_BOOL adoEOF; + __declspec(property(get=GetAbsolutePage,put=PutAbsolutePage)) + PositionEnum_Param AbsolutePage; + __declspec(property(get=GetLockType,put=PutLockType)) + enum LockTypeEnum LockType; + __declspec(property(get=GetMaxRecords,put=PutMaxRecords)) + ADO_LONGPTR MaxRecords; + __declspec(property(get=GetRecordCount)) + ADO_LONGPTR RecordCount; + + // + // Wrapper methods for error-handling + // + + PositionEnum_Param GetAbsolutePosition ( ); + void PutAbsolutePosition ( + PositionEnum_Param pl ); + void PutRefActiveConnection ( + IDispatch * pvar ); + void PutActiveConnection ( + const _variant_t & pvar ); + _variant_t GetActiveConnection ( ); + VARIANT_BOOL GetadoBOF ( ); + _variant_t GetBookmark ( ); + void PutBookmark ( + const _variant_t & pvBookmark ); + long GetCacheSize ( ); + void PutCacheSize ( + long pl ); + enum CursorTypeEnum GetCursorType ( ); + void PutCursorType ( + enum CursorTypeEnum plCursorType ); + VARIANT_BOOL GetadoEOF ( ); + Fields_DeprecatedPtr GetFields ( ); + enum LockTypeEnum GetLockType ( ); + void PutLockType ( + enum LockTypeEnum plLockType ); + ADO_LONGPTR GetMaxRecords ( ); + void PutMaxRecords ( + ADO_LONGPTR plMaxRecords ); + ADO_LONGPTR GetRecordCount ( ); + void PutRefSource ( + IDispatch * pvSource ); + void PutSource ( + _bstr_t pvSource ); + _variant_t GetSource ( ); + HRESULT AddNew ( + const _variant_t & FieldList = vtMissing, + const _variant_t & Values = vtMissing ); + HRESULT CancelUpdate ( ); + HRESULT Close ( ); + HRESULT Delete ( + enum AffectEnum AffectRecords ); + _variant_t GetRows ( + long Rows, + const _variant_t & Start = vtMissing, + const _variant_t & Fields = vtMissing ); + HRESULT Move ( + ADO_LONGPTR NumRecords, + const _variant_t & Start = vtMissing ); + HRESULT MoveNext ( ); + HRESULT MovePrevious ( ); + HRESULT MoveFirst ( ); + HRESULT MoveLast ( ); + HRESULT Open ( + const _variant_t & Source, + const _variant_t & ActiveConnection, + enum CursorTypeEnum CursorType, + enum LockTypeEnum LockType, + long Options ); + HRESULT Requery ( + long Options ); + HRESULT _xResync ( + enum AffectEnum AffectRecords ); + HRESULT Update ( + const _variant_t & Fields = vtMissing, + const _variant_t & Values = vtMissing ); + PositionEnum_Param GetAbsolutePage ( ); + void PutAbsolutePage ( + PositionEnum_Param pl ); + enum EditModeEnum GetEditMode ( ); + _variant_t GetFilter ( ); + void PutFilter ( + const _variant_t & Criteria ); + ADO_LONGPTR GetPageCount ( ); + long GetPageSize ( ); + void PutPageSize ( + long pl ); + _bstr_t GetSort ( ); + void PutSort ( + _bstr_t Criteria ); + long GetStatus ( ); + long GetState ( ); + _Recordset_DeprecatedPtr _xClone ( ); + HRESULT UpdateBatch ( + enum AffectEnum AffectRecords ); + HRESULT CancelBatch ( + enum AffectEnum AffectRecords ); + enum CursorLocationEnum GetCursorLocation ( ); + void PutCursorLocation ( + enum CursorLocationEnum plCursorLoc ); + _Recordset_DeprecatedPtr NextRecordset ( + VARIANT * RecordsAffected ); + VARIANT_BOOL Supports ( + enum CursorOptionEnum CursorOptions ); + _variant_t GetCollect ( + const _variant_t & Index ); + void PutCollect ( + const _variant_t & Index, + const _variant_t & pvar ); + enum MarshalOptionsEnum GetMarshalOptions ( ); + void PutMarshalOptions ( + enum MarshalOptionsEnum peMarshal ); + HRESULT Find ( + _bstr_t Criteria, + ADO_LONGPTR SkipRecords, + enum SearchDirectionEnum SearchDirection, + const _variant_t & Start = vtMissing ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_AbsolutePosition ( + /*[out,retval]*/ PositionEnum_Param * pl ) = 0; + virtual HRESULT __stdcall put_AbsolutePosition ( + /*[in]*/ PositionEnum_Param pl ) = 0; + virtual HRESULT __stdcall putref_ActiveConnection ( + /*[in]*/ IDispatch * pvar ) = 0; + virtual HRESULT __stdcall put_ActiveConnection ( + /*[in]*/ VARIANT pvar ) = 0; + virtual HRESULT __stdcall get_ActiveConnection ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall get_adoBOF ( + /*[out,retval]*/ VARIANT_BOOL * pb ) = 0; + virtual HRESULT __stdcall get_Bookmark ( + /*[out,retval]*/ VARIANT * pvBookmark ) = 0; + virtual HRESULT __stdcall put_Bookmark ( + /*[in]*/ VARIANT pvBookmark ) = 0; + virtual HRESULT __stdcall get_CacheSize ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall put_CacheSize ( + /*[in]*/ long pl ) = 0; + virtual HRESULT __stdcall get_CursorType ( + /*[out,retval]*/ enum CursorTypeEnum * plCursorType ) = 0; + virtual HRESULT __stdcall put_CursorType ( + /*[in]*/ enum CursorTypeEnum plCursorType ) = 0; + virtual HRESULT __stdcall get_adoEOF ( + /*[out,retval]*/ VARIANT_BOOL * pb ) = 0; + virtual HRESULT __stdcall get_Fields ( + /*[out,retval]*/ struct Fields_Deprecated * * ppvObject ) = 0; + virtual HRESULT __stdcall get_LockType ( + /*[out,retval]*/ enum LockTypeEnum * plLockType ) = 0; + virtual HRESULT __stdcall put_LockType ( + /*[in]*/ enum LockTypeEnum plLockType ) = 0; + virtual HRESULT __stdcall get_MaxRecords ( + /*[out,retval]*/ ADO_LONGPTR * plMaxRecords ) = 0; + virtual HRESULT __stdcall put_MaxRecords ( + /*[in]*/ ADO_LONGPTR plMaxRecords ) = 0; + virtual HRESULT __stdcall get_RecordCount ( + /*[out,retval]*/ ADO_LONGPTR * pl ) = 0; + virtual HRESULT __stdcall putref_Source ( + /*[in]*/ IDispatch * pvSource ) = 0; + virtual HRESULT __stdcall put_Source ( + /*[in]*/ BSTR pvSource ) = 0; + virtual HRESULT __stdcall get_Source ( + /*[out,retval]*/ VARIANT * pvSource ) = 0; + virtual HRESULT __stdcall raw_AddNew ( + /*[in]*/ VARIANT FieldList = vtMissing, + /*[in]*/ VARIANT Values = vtMissing ) = 0; + virtual HRESULT __stdcall raw_CancelUpdate ( ) = 0; + virtual HRESULT __stdcall raw_Close ( ) = 0; + virtual HRESULT __stdcall raw_Delete ( + /*[in]*/ enum AffectEnum AffectRecords ) = 0; + virtual HRESULT __stdcall raw_GetRows ( + /*[in]*/ long Rows, + /*[in]*/ VARIANT Start, + /*[in]*/ VARIANT Fields, + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall raw_Move ( + /*[in]*/ ADO_LONGPTR NumRecords, + /*[in]*/ VARIANT Start = vtMissing ) = 0; + virtual HRESULT __stdcall raw_MoveNext ( ) = 0; + virtual HRESULT __stdcall raw_MovePrevious ( ) = 0; + virtual HRESULT __stdcall raw_MoveFirst ( ) = 0; + virtual HRESULT __stdcall raw_MoveLast ( ) = 0; + virtual HRESULT __stdcall raw_Open ( + /*[in]*/ VARIANT Source, + /*[in]*/ VARIANT ActiveConnection, + /*[in]*/ enum CursorTypeEnum CursorType, + /*[in]*/ enum LockTypeEnum LockType, + /*[in]*/ long Options ) = 0; + virtual HRESULT __stdcall raw_Requery ( + /*[in]*/ long Options ) = 0; + virtual HRESULT __stdcall raw__xResync ( + /*[in]*/ enum AffectEnum AffectRecords ) = 0; + virtual HRESULT __stdcall raw_Update ( + /*[in]*/ VARIANT Fields = vtMissing, + /*[in]*/ VARIANT Values = vtMissing ) = 0; + virtual HRESULT __stdcall get_AbsolutePage ( + /*[out,retval]*/ PositionEnum_Param * pl ) = 0; + virtual HRESULT __stdcall put_AbsolutePage ( + /*[in]*/ PositionEnum_Param pl ) = 0; + virtual HRESULT __stdcall get_EditMode ( + /*[out,retval]*/ enum EditModeEnum * pl ) = 0; + virtual HRESULT __stdcall get_Filter ( + /*[out,retval]*/ VARIANT * Criteria ) = 0; + virtual HRESULT __stdcall put_Filter ( + /*[in]*/ VARIANT Criteria ) = 0; + virtual HRESULT __stdcall get_PageCount ( + /*[out,retval]*/ ADO_LONGPTR * pl ) = 0; + virtual HRESULT __stdcall get_PageSize ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall put_PageSize ( + /*[in]*/ long pl ) = 0; + virtual HRESULT __stdcall get_Sort ( + /*[out,retval]*/ BSTR * Criteria ) = 0; + virtual HRESULT __stdcall put_Sort ( + /*[in]*/ BSTR Criteria ) = 0; + virtual HRESULT __stdcall get_Status ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall get_State ( + /*[out,retval]*/ long * plObjState ) = 0; + virtual HRESULT __stdcall raw__xClone ( + /*[out,retval]*/ struct _Recordset_Deprecated * * ppvObject ) = 0; + virtual HRESULT __stdcall raw_UpdateBatch ( + /*[in]*/ enum AffectEnum AffectRecords ) = 0; + virtual HRESULT __stdcall raw_CancelBatch ( + /*[in]*/ enum AffectEnum AffectRecords ) = 0; + virtual HRESULT __stdcall get_CursorLocation ( + /*[out,retval]*/ enum CursorLocationEnum * plCursorLoc ) = 0; + virtual HRESULT __stdcall put_CursorLocation ( + /*[in]*/ enum CursorLocationEnum plCursorLoc ) = 0; + virtual HRESULT __stdcall raw_NextRecordset ( + /*[out]*/ VARIANT * RecordsAffected, + /*[out,retval]*/ struct _Recordset_Deprecated * * ppiRs ) = 0; + virtual HRESULT __stdcall raw_Supports ( + /*[in]*/ enum CursorOptionEnum CursorOptions, + /*[out,retval]*/ VARIANT_BOOL * pb ) = 0; + virtual HRESULT __stdcall get_Collect ( + /*[in]*/ VARIANT Index, + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall put_Collect ( + /*[in]*/ VARIANT Index, + /*[in]*/ VARIANT pvar ) = 0; + virtual HRESULT __stdcall get_MarshalOptions ( + /*[out,retval]*/ enum MarshalOptionsEnum * peMarshal ) = 0; + virtual HRESULT __stdcall put_MarshalOptions ( + /*[in]*/ enum MarshalOptionsEnum peMarshal ) = 0; + virtual HRESULT __stdcall raw_Find ( + /*[in]*/ BSTR Criteria, + /*[in]*/ ADO_LONGPTR SkipRecords, + /*[in]*/ enum SearchDirectionEnum SearchDirection, + /*[in]*/ VARIANT Start = vtMissing ) = 0; +}; + +struct __declspec(uuid("0000054f-0000-0010-8000-00aa006d2ea4")) +Recordset20_Deprecated : Recordset15_Deprecated +{ + // + // Property data + // + + __declspec(property(get=GetDataSource,put=PutRefDataSource)) + IUnknownPtr DataSource; + __declspec(property(get=GetActiveCommand)) + IDispatchPtr ActiveCommand; + __declspec(property(get=GetStayInSync,put=PutStayInSync)) + VARIANT_BOOL StayInSync; + __declspec(property(get=GetDataMember,put=PutDataMember)) + _bstr_t DataMember; + + // + // Wrapper methods for error-handling + // + + HRESULT Cancel ( ); + IUnknownPtr GetDataSource ( ); + void PutRefDataSource ( + IUnknown * ppunkDataSource ); + HRESULT _xSave ( + _bstr_t FileName, + enum PersistFormatEnum PersistFormat ); + IDispatchPtr GetActiveCommand ( ); + void PutStayInSync ( + VARIANT_BOOL pbStayInSync ); + VARIANT_BOOL GetStayInSync ( ); + _bstr_t GetString ( + enum StringFormatEnum StringFormat, + long NumRows, + _bstr_t ColumnDelimeter, + _bstr_t RowDelimeter, + _bstr_t NullExpr ); + _bstr_t GetDataMember ( ); + void PutDataMember ( + _bstr_t pbstrDataMember ); + enum CompareEnum CompareBookmarks ( + const _variant_t & Bookmark1, + const _variant_t & Bookmark2 ); + _Recordset_DeprecatedPtr Clone ( + enum LockTypeEnum LockType ); + HRESULT Resync ( + enum AffectEnum AffectRecords, + enum ResyncEnum ResyncValues ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall raw_Cancel ( ) = 0; + virtual HRESULT __stdcall get_DataSource ( + /*[out,retval]*/ IUnknown * * ppunkDataSource ) = 0; + virtual HRESULT __stdcall putref_DataSource ( + /*[in]*/ IUnknown * ppunkDataSource ) = 0; + virtual HRESULT __stdcall raw__xSave ( + /*[in]*/ BSTR FileName, + /*[in]*/ enum PersistFormatEnum PersistFormat ) = 0; + virtual HRESULT __stdcall get_ActiveCommand ( + /*[out,retval]*/ IDispatch * * ppCmd ) = 0; + virtual HRESULT __stdcall put_StayInSync ( + /*[in]*/ VARIANT_BOOL pbStayInSync ) = 0; + virtual HRESULT __stdcall get_StayInSync ( + /*[out,retval]*/ VARIANT_BOOL * pbStayInSync ) = 0; + virtual HRESULT __stdcall raw_GetString ( + /*[in]*/ enum StringFormatEnum StringFormat, + /*[in]*/ long NumRows, + /*[in]*/ BSTR ColumnDelimeter, + /*[in]*/ BSTR RowDelimeter, + /*[in]*/ BSTR NullExpr, + /*[out,retval]*/ BSTR * pRetString ) = 0; + virtual HRESULT __stdcall get_DataMember ( + /*[out,retval]*/ BSTR * pbstrDataMember ) = 0; + virtual HRESULT __stdcall put_DataMember ( + /*[in]*/ BSTR pbstrDataMember ) = 0; + virtual HRESULT __stdcall raw_CompareBookmarks ( + /*[in]*/ VARIANT Bookmark1, + /*[in]*/ VARIANT Bookmark2, + /*[out,retval]*/ enum CompareEnum * pCompare ) = 0; + virtual HRESULT __stdcall raw_Clone ( + /*[in]*/ enum LockTypeEnum LockType, + /*[out,retval]*/ struct _Recordset_Deprecated * * ppvObject ) = 0; + virtual HRESULT __stdcall raw_Resync ( + /*[in]*/ enum AffectEnum AffectRecords, + /*[in]*/ enum ResyncEnum ResyncValues ) = 0; +}; + +struct __declspec(uuid("00000555-0000-0010-8000-00aa006d2ea4")) +Recordset21_Deprecated : Recordset20_Deprecated +{ + // + // Property data + // + + __declspec(property(get=GetIndex,put=PutIndex)) + _bstr_t Index; + + // + // Wrapper methods for error-handling + // + + HRESULT Seek ( + const _variant_t & KeyValues, + enum SeekEnum SeekOption ); + void PutIndex ( + _bstr_t pbstrIndex ); + _bstr_t GetIndex ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall raw_Seek ( + /*[in]*/ VARIANT KeyValues, + /*[in]*/ enum SeekEnum SeekOption ) = 0; + virtual HRESULT __stdcall put_Index ( + /*[in]*/ BSTR pbstrIndex ) = 0; + virtual HRESULT __stdcall get_Index ( + /*[out,retval]*/ BSTR * pbstrIndex ) = 0; +}; + +struct __declspec(uuid("00000556-0000-0010-8000-00aa006d2ea4")) +_Recordset_Deprecated : Recordset21_Deprecated +{ + // + // Wrapper methods for error-handling + // + + HRESULT Save ( + const _variant_t & Destination, + enum PersistFormatEnum PersistFormat ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall raw_Save ( + /*[in]*/ VARIANT Destination, + /*[in]*/ enum PersistFormatEnum PersistFormat ) = 0; +}; + +struct __declspec(uuid("00000508-0000-0010-8000-00aa006d2ea4")) +Command15_Deprecated : _ADO +{ + // + // Property data + // + + __declspec(property(get=GetParameters)) + Parameters_DeprecatedPtr Parameters; + __declspec(property(get=GetActiveConnection,put=PutRefActiveConnection)) + _Connection_DeprecatedPtr ActiveConnection; + __declspec(property(get=GetCommandText,put=PutCommandText)) + _bstr_t CommandText; + __declspec(property(get=GetCommandTimeout,put=PutCommandTimeout)) + long CommandTimeout; + __declspec(property(get=GetPrepared,put=PutPrepared)) + VARIANT_BOOL Prepared; + __declspec(property(get=GetCommandType,put=PutCommandType)) + enum CommandTypeEnum CommandType; + __declspec(property(get=GetName,put=PutName)) + _bstr_t Name; + + // + // Wrapper methods for error-handling + // + + _Connection_DeprecatedPtr GetActiveConnection ( ); + void PutRefActiveConnection ( + struct _Connection_Deprecated * ppvObject ); + void PutActiveConnection ( + const _variant_t & ppvObject ); + _bstr_t GetCommandText ( ); + void PutCommandText ( + _bstr_t pbstr ); + long GetCommandTimeout ( ); + void PutCommandTimeout ( + long pl ); + VARIANT_BOOL GetPrepared ( ); + void PutPrepared ( + VARIANT_BOOL pfPrepared ); + _Recordset_DeprecatedPtr Execute ( + VARIANT * RecordsAffected, + VARIANT * Parameters, + long Options ); + _Parameter_DeprecatedPtr CreateParameter ( + _bstr_t Name, + enum DataTypeEnum Type, + enum ParameterDirectionEnum Direction, + ADO_LONGPTR Size, + const _variant_t & Value = vtMissing ); + Parameters_DeprecatedPtr GetParameters ( ); + void PutCommandType ( + enum CommandTypeEnum plCmdType ); + enum CommandTypeEnum GetCommandType ( ); + _bstr_t GetName ( ); + void PutName ( + _bstr_t pbstrName ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_ActiveConnection ( + /*[out,retval]*/ struct _Connection_Deprecated * * ppvObject ) = 0; + virtual HRESULT __stdcall putref_ActiveConnection ( + /*[in]*/ struct _Connection_Deprecated * ppvObject ) = 0; + virtual HRESULT __stdcall put_ActiveConnection ( + /*[in]*/ VARIANT ppvObject ) = 0; + virtual HRESULT __stdcall get_CommandText ( + /*[out,retval]*/ BSTR * pbstr ) = 0; + virtual HRESULT __stdcall put_CommandText ( + /*[in]*/ BSTR pbstr ) = 0; + virtual HRESULT __stdcall get_CommandTimeout ( + /*[out,retval]*/ long * pl ) = 0; + virtual HRESULT __stdcall put_CommandTimeout ( + /*[in]*/ long pl ) = 0; + virtual HRESULT __stdcall get_Prepared ( + /*[out,retval]*/ VARIANT_BOOL * pfPrepared ) = 0; + virtual HRESULT __stdcall put_Prepared ( + /*[in]*/ VARIANT_BOOL pfPrepared ) = 0; + virtual HRESULT __stdcall raw_Execute ( + /*[out]*/ VARIANT * RecordsAffected, + /*[in]*/ VARIANT * Parameters, + /*[in]*/ long Options, + /*[out,retval]*/ struct _Recordset_Deprecated * * ppiRs ) = 0; + virtual HRESULT __stdcall raw_CreateParameter ( + /*[in]*/ BSTR Name, + /*[in]*/ enum DataTypeEnum Type, + /*[in]*/ enum ParameterDirectionEnum Direction, + /*[in]*/ ADO_LONGPTR Size, + /*[in]*/ VARIANT Value, + /*[out,retval]*/ struct _Parameter_Deprecated * * ppiprm ) = 0; + virtual HRESULT __stdcall get_Parameters ( + /*[out,retval]*/ struct Parameters_Deprecated * * ppvObject ) = 0; + virtual HRESULT __stdcall put_CommandType ( + /*[in]*/ enum CommandTypeEnum plCmdType ) = 0; + virtual HRESULT __stdcall get_CommandType ( + /*[out,retval]*/ enum CommandTypeEnum * plCmdType ) = 0; + virtual HRESULT __stdcall get_Name ( + /*[out,retval]*/ BSTR * pbstrName ) = 0; + virtual HRESULT __stdcall put_Name ( + /*[in]*/ BSTR pbstrName ) = 0; +}; + +struct __declspec(uuid("0000054e-0000-0010-8000-00aa006d2ea4")) +Command25_Deprecated : Command15_Deprecated +{ + // + // Property data + // + + __declspec(property(get=GetState)) + long State; + + // + // Wrapper methods for error-handling + // + + long GetState ( ); + HRESULT Cancel ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_State ( + /*[out,retval]*/ long * plObjState ) = 0; + virtual HRESULT __stdcall raw_Cancel ( ) = 0; +}; + +struct __declspec(uuid("b08400bd-f9d1-4d02-b856-71d5dba123e9")) +_Command_Deprecated : Command25_Deprecated +{ + // + // Property data + // + + __declspec(property(get=GetDialect,put=PutDialect)) + _bstr_t Dialect; + __declspec(property(get=GetNamedParameters,put=PutNamedParameters)) + VARIANT_BOOL NamedParameters; + + // + // Wrapper methods for error-handling + // + + void PutRefCommandStream ( + IUnknown * pvStream ); + _variant_t GetCommandStream ( ); + void PutDialect ( + _bstr_t pbstrDialect ); + _bstr_t GetDialect ( ); + void PutNamedParameters ( + VARIANT_BOOL pfNamedParameters ); + VARIANT_BOOL GetNamedParameters ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall putref_CommandStream ( + /*[in]*/ IUnknown * pvStream ) = 0; + virtual HRESULT __stdcall get_CommandStream ( + /*[out,retval]*/ VARIANT * pvStream ) = 0; + virtual HRESULT __stdcall put_Dialect ( + /*[in]*/ BSTR pbstrDialect ) = 0; + virtual HRESULT __stdcall get_Dialect ( + /*[out,retval]*/ BSTR * pbstrDialect ) = 0; + virtual HRESULT __stdcall put_NamedParameters ( + /*[in]*/ VARIANT_BOOL pfNamedParameters ) = 0; + virtual HRESULT __stdcall get_NamedParameters ( + /*[out,retval]*/ VARIANT_BOOL * pfNamedParameters ) = 0; +}; + +struct __declspec(uuid("00000403-0000-0010-8000-00aa006d2ea4")) +RecordsetEventsVt_Deprecated : IUnknown +{ + // + // Wrapper methods for error-handling + // + + HRESULT WillChangeField ( + long cFields, + const _variant_t & Fields, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT FieldChangeComplete ( + long cFields, + const _variant_t & Fields, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT WillChangeRecord ( + enum EventReasonEnum adReason, + long cRecords, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT RecordChangeComplete ( + enum EventReasonEnum adReason, + long cRecords, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT WillChangeRecordset ( + enum EventReasonEnum adReason, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT RecordsetChangeComplete ( + enum EventReasonEnum adReason, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT WillMove ( + enum EventReasonEnum adReason, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT MoveComplete ( + enum EventReasonEnum adReason, + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT EndOfRecordset ( + VARIANT_BOOL * fMoreData, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT FetchProgress ( + long Progress, + long MaxProgress, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + HRESULT FetchComplete ( + struct Error * pError, + enum EventStatusEnum * adStatus, + struct _Recordset_Deprecated * pRecordset ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall raw_WillChangeField ( + /*[in]*/ long cFields, + /*[in]*/ VARIANT Fields, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset_Deprecated * pRecordset ) = 0; + virtual HRESULT __stdcall raw_FieldChangeComplete ( + /*[in]*/ long cFields, + /*[in]*/ VARIANT Fields, + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset_Deprecated * pRecordset ) = 0; + virtual HRESULT __stdcall raw_WillChangeRecord ( + /*[in]*/ enum EventReasonEnum adReason, + /*[in]*/ long cRecords, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset_Deprecated * pRecordset ) = 0; + virtual HRESULT __stdcall raw_RecordChangeComplete ( + /*[in]*/ enum EventReasonEnum adReason, + /*[in]*/ long cRecords, + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset_Deprecated * pRecordset ) = 0; + virtual HRESULT __stdcall raw_WillChangeRecordset ( + /*[in]*/ enum EventReasonEnum adReason, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset_Deprecated * pRecordset ) = 0; + virtual HRESULT __stdcall raw_RecordsetChangeComplete ( + /*[in]*/ enum EventReasonEnum adReason, + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset_Deprecated * pRecordset ) = 0; + virtual HRESULT __stdcall raw_WillMove ( + /*[in]*/ enum EventReasonEnum adReason, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset_Deprecated * pRecordset ) = 0; + virtual HRESULT __stdcall raw_MoveComplete ( + /*[in]*/ enum EventReasonEnum adReason, + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset_Deprecated * pRecordset ) = 0; + virtual HRESULT __stdcall raw_EndOfRecordset ( + /*[in,out]*/ VARIANT_BOOL * fMoreData, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset_Deprecated * pRecordset ) = 0; + virtual HRESULT __stdcall raw_FetchProgress ( + /*[in]*/ long Progress, + /*[in]*/ long MaxProgress, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset_Deprecated * pRecordset ) = 0; + virtual HRESULT __stdcall raw_FetchComplete ( + /*[in]*/ struct Error * pError, + /*[in,out]*/ enum EventStatusEnum * adStatus, + /*[in]*/ struct _Recordset_Deprecated * pRecordset ) = 0; +}; + +struct __declspec(uuid("00000562-0000-0010-8000-00aa006d2ea4")) +_Record_Deprecated : _ADO +{ + // + // Property data + // + + __declspec(property(get=GetFields)) + Fields_DeprecatedPtr Fields; + __declspec(property(get=GetState)) + enum ObjectStateEnum State; + __declspec(property(get=GetMode,put=PutMode)) + enum ConnectModeEnum Mode; + __declspec(property(get=GetParentURL)) + _bstr_t ParentURL; + __declspec(property(get=GetRecordType)) + enum RecordTypeEnum RecordType; + + // + // Wrapper methods for error-handling + // + + _variant_t GetActiveConnection ( ); + void PutActiveConnection ( + _bstr_t pvar ); + void PutRefActiveConnection ( + struct _Connection_Deprecated * pvar ); + enum ObjectStateEnum GetState ( ); + _variant_t GetSource ( ); + void PutSource ( + _bstr_t pvar ); + void PutRefSource ( + IDispatch * pvar ); + enum ConnectModeEnum GetMode ( ); + void PutMode ( + enum ConnectModeEnum pMode ); + _bstr_t GetParentURL ( ); + _bstr_t MoveRecord ( + _bstr_t Source, + _bstr_t Destination, + _bstr_t UserName, + _bstr_t Password, + enum MoveRecordOptionsEnum Options, + VARIANT_BOOL Async ); + _bstr_t CopyRecord ( + _bstr_t Source, + _bstr_t Destination, + _bstr_t UserName, + _bstr_t Password, + enum CopyRecordOptionsEnum Options, + VARIANT_BOOL Async ); + HRESULT DeleteRecord ( + _bstr_t Source, + VARIANT_BOOL Async ); + HRESULT Open ( + const _variant_t & Source, + const _variant_t & ActiveConnection, + enum ConnectModeEnum Mode, + enum RecordCreateOptionsEnum CreateOptions, + enum RecordOpenOptionsEnum Options, + _bstr_t UserName, + _bstr_t Password ); + HRESULT Close ( ); + Fields_DeprecatedPtr GetFields ( ); + enum RecordTypeEnum GetRecordType ( ); + _Recordset_DeprecatedPtr GetChildren ( ); + HRESULT Cancel ( ); + + // + // Raw methods provided by interface + // + + virtual HRESULT __stdcall get_ActiveConnection ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall put_ActiveConnection ( + /*[in]*/ BSTR pvar ) = 0; + virtual HRESULT __stdcall putref_ActiveConnection ( + /*[in]*/ struct _Connection_Deprecated * pvar ) = 0; + virtual HRESULT __stdcall get_State ( + /*[out,retval]*/ enum ObjectStateEnum * pState ) = 0; + virtual HRESULT __stdcall get_Source ( + /*[out,retval]*/ VARIANT * pvar ) = 0; + virtual HRESULT __stdcall put_Source ( + /*[in]*/ BSTR pvar ) = 0; + virtual HRESULT __stdcall putref_Source ( + /*[in]*/ IDispatch * pvar ) = 0; + virtual HRESULT __stdcall get_Mode ( + /*[out,retval]*/ enum ConnectModeEnum * pMode ) = 0; + virtual HRESULT __stdcall put_Mode ( + /*[in]*/ enum ConnectModeEnum pMode ) = 0; + virtual HRESULT __stdcall get_ParentURL ( + /*[out,retval]*/ BSTR * pbstrParentURL ) = 0; + virtual HRESULT __stdcall raw_MoveRecord ( + /*[in]*/ BSTR Source, + /*[in]*/ BSTR Destination, + /*[in]*/ BSTR UserName, + /*[in]*/ BSTR Password, + /*[in]*/ enum MoveRecordOptionsEnum Options, + /*[in]*/ VARIANT_BOOL Async, + /*[out,retval]*/ BSTR * pbstrNewURL ) = 0; + virtual HRESULT __stdcall raw_CopyRecord ( + /*[in]*/ BSTR Source, + /*[in]*/ BSTR Destination, + /*[in]*/ BSTR UserName, + /*[in]*/ BSTR Password, + /*[in]*/ enum CopyRecordOptionsEnum Options, + /*[in]*/ VARIANT_BOOL Async, + /*[out,retval]*/ BSTR * pbstrNewURL ) = 0; + virtual HRESULT __stdcall raw_DeleteRecord ( + /*[in]*/ BSTR Source, + /*[in]*/ VARIANT_BOOL Async ) = 0; + virtual HRESULT __stdcall raw_Open ( + /*[in]*/ VARIANT Source, + /*[in]*/ VARIANT ActiveConnection, + /*[in]*/ enum ConnectModeEnum Mode, + /*[in]*/ enum RecordCreateOptionsEnum CreateOptions, + /*[in]*/ enum RecordOpenOptionsEnum Options, + /*[in]*/ BSTR UserName, + /*[in]*/ BSTR Password ) = 0; + virtual HRESULT __stdcall raw_Close ( ) = 0; + virtual HRESULT __stdcall get_Fields ( + /*[out,retval]*/ struct Fields_Deprecated * * ppFlds ) = 0; + virtual HRESULT __stdcall get_RecordType ( + /*[out,retval]*/ enum RecordTypeEnum * ptype ) = 0; + virtual HRESULT __stdcall raw_GetChildren ( + /*[out,retval]*/ struct _Recordset_Deprecated * * pprset ) = 0; + virtual HRESULT __stdcall raw_Cancel ( ) = 0; +}; + +// +// Wrapper method implementations +// + +#include "E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\Release\msado15.tli" + +#pragma pack(pop) diff --git a/zf_itk_c/x64/Release/msado15.tli b/zf_itk_c/x64/Release/msado15.tli new file mode 100644 index 0000000..b5ad602 --- /dev/null +++ b/zf_itk_c/x64/Release/msado15.tli @@ -0,0 +1,3952 @@ +// Created by Microsoft (R) C/C++ Compiler Version 14.29.30157.0 (1009eea2). +// +// E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\Release\msado15.tli +// +// Wrapper implementations for type library C:\Program Files\Common Files\System\ado\msado15.dll +// compiler-generated file created 04/14/25 at 13:16:58 - DO NOT EDIT! + +#pragma once + +// +// interface _Collection wrapper method implementations +// + +inline long _Collection::GetCount ( ) { + long _result = 0; + HRESULT _hr = get_Count(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline IUnknownPtr _Collection::_NewEnum ( ) { + IUnknown * _result = 0; + HRESULT _hr = raw__NewEnum(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return IUnknownPtr(_result, false); +} + +inline HRESULT _Collection::Refresh ( ) { + HRESULT _hr = raw_Refresh(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface _DynaCollection wrapper method implementations +// + +inline HRESULT _DynaCollection::Append ( IDispatch * Object ) { + HRESULT _hr = raw_Append(Object); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _DynaCollection::Delete ( const _variant_t & Index ) { + HRESULT _hr = raw_Delete(Index); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface Property wrapper method implementations +// + +inline _variant_t Property::GetValue ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_Value(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void Property::PutValue ( const _variant_t & pval ) { + HRESULT _hr = put_Value(pval); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _bstr_t Property::GetName ( ) { + BSTR _result = 0; + HRESULT _hr = get_Name(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline enum DataTypeEnum Property::GetType ( ) { + enum DataTypeEnum _result; + HRESULT _hr = get_Type(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline long Property::GetAttributes ( ) { + long _result = 0; + HRESULT _hr = get_Attributes(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Property::PutAttributes ( long plAttributes ) { + HRESULT _hr = put_Attributes(plAttributes); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +// +// interface Properties wrapper method implementations +// + +inline PropertyPtr Properties::GetItem ( const _variant_t & Index ) { + struct Property * _result = 0; + HRESULT _hr = get_Item(Index, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return PropertyPtr(_result, false); +} + +// +// interface _ADO wrapper method implementations +// + +inline PropertiesPtr _ADO::GetProperties ( ) { + struct Properties * _result = 0; + HRESULT _hr = get_Properties(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return PropertiesPtr(_result, false); +} + +// +// interface Error wrapper method implementations +// + +inline long Error::GetNumber ( ) { + long _result = 0; + HRESULT _hr = get_Number(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _bstr_t Error::GetSource ( ) { + BSTR _result = 0; + HRESULT _hr = get_Source(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline _bstr_t Error::GetDescription ( ) { + BSTR _result = 0; + HRESULT _hr = get_Description(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline _bstr_t Error::GetHelpFile ( ) { + BSTR _result = 0; + HRESULT _hr = get_HelpFile(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline long Error::GetHelpContext ( ) { + long _result = 0; + HRESULT _hr = get_HelpContext(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _bstr_t Error::GetSQLState ( ) { + BSTR _result = 0; + HRESULT _hr = get_SQLState(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline long Error::GetNativeError ( ) { + long _result = 0; + HRESULT _hr = get_NativeError(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +// +// interface Errors wrapper method implementations +// + +inline ErrorPtr Errors::GetItem ( const _variant_t & Index ) { + struct Error * _result = 0; + HRESULT _hr = get_Item(Index, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return ErrorPtr(_result, false); +} + +inline HRESULT Errors::Clear ( ) { + HRESULT _hr = raw_Clear(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface Field20 wrapper method implementations +// + +inline long Field20::GetActualSize ( ) { + long _result = 0; + HRESULT _hr = get_ActualSize(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline long Field20::GetAttributes ( ) { + long _result = 0; + HRESULT _hr = get_Attributes(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline long Field20::GetDefinedSize ( ) { + long _result = 0; + HRESULT _hr = get_DefinedSize(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _bstr_t Field20::GetName ( ) { + BSTR _result = 0; + HRESULT _hr = get_Name(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline enum DataTypeEnum Field20::GetType ( ) { + enum DataTypeEnum _result; + HRESULT _hr = get_Type(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _variant_t Field20::GetValue ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_Value(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void Field20::PutValue ( const _variant_t & pvar ) { + HRESULT _hr = put_Value(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline unsigned char Field20::GetPrecision ( ) { + unsigned char _result = 0; + HRESULT _hr = get_Precision(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline unsigned char Field20::GetNumericScale ( ) { + unsigned char _result = 0; + HRESULT _hr = get_NumericScale(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline HRESULT Field20::AppendChunk ( const _variant_t & Data ) { + HRESULT _hr = raw_AppendChunk(Data); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline _variant_t Field20::GetChunk ( long Length ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = raw_GetChunk(Length, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline _variant_t Field20::GetOriginalValue ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_OriginalValue(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline _variant_t Field20::GetUnderlyingValue ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_UnderlyingValue(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline IUnknownPtr Field20::GetDataFormat ( ) { + IUnknown * _result = 0; + HRESULT _hr = get_DataFormat(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return IUnknownPtr(_result, false); +} + +inline void Field20::PutRefDataFormat ( IUnknown * ppiDF ) { + HRESULT _hr = putref_DataFormat(ppiDF); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Field20::PutPrecision ( unsigned char pbPrecision ) { + HRESULT _hr = put_Precision(pbPrecision); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Field20::PutNumericScale ( unsigned char pbNumericScale ) { + HRESULT _hr = put_NumericScale(pbNumericScale); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Field20::PutType ( enum DataTypeEnum pDataType ) { + HRESULT _hr = put_Type(pDataType); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Field20::PutDefinedSize ( long pl ) { + HRESULT _hr = put_DefinedSize(pl); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Field20::PutAttributes ( long pl ) { + HRESULT _hr = put_Attributes(pl); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +// +// interface Field wrapper method implementations +// + +inline long Field::GetStatus ( ) { + long _result = 0; + HRESULT _hr = get_Status(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +// +// interface Fields15 wrapper method implementations +// + +inline FieldPtr Fields15::GetItem ( const _variant_t & Index ) { + struct Field * _result = 0; + HRESULT _hr = get_Item(Index, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return FieldPtr(_result, false); +} + +// +// interface Fields20 wrapper method implementations +// + +inline HRESULT Fields20::_Append ( _bstr_t Name, enum DataTypeEnum Type, long DefinedSize, enum FieldAttributeEnum Attrib ) { + HRESULT _hr = raw__Append(Name, Type, DefinedSize, Attrib); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Fields20::Delete ( const _variant_t & Index ) { + HRESULT _hr = raw_Delete(Index); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface Fields wrapper method implementations +// + +inline HRESULT Fields::Append ( _bstr_t Name, enum DataTypeEnum Type, long DefinedSize, enum FieldAttributeEnum Attrib, const _variant_t & FieldValue ) { + HRESULT _hr = raw_Append(Name, Type, DefinedSize, Attrib, FieldValue); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Fields::Update ( ) { + HRESULT _hr = raw_Update(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Fields::Resync ( enum ResyncEnum ResyncValues ) { + HRESULT _hr = raw_Resync(ResyncValues); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Fields::CancelUpdate ( ) { + HRESULT _hr = raw_CancelUpdate(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface _Parameter wrapper method implementations +// + +inline _bstr_t _Parameter::GetName ( ) { + BSTR _result = 0; + HRESULT _hr = get_Name(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void _Parameter::PutName ( _bstr_t pbstr ) { + HRESULT _hr = put_Name(pbstr); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _variant_t _Parameter::GetValue ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_Value(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void _Parameter::PutValue ( const _variant_t & pvar ) { + HRESULT _hr = put_Value(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum DataTypeEnum _Parameter::GetType ( ) { + enum DataTypeEnum _result; + HRESULT _hr = get_Type(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Parameter::PutType ( enum DataTypeEnum psDataType ) { + HRESULT _hr = put_Type(psDataType); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void _Parameter::PutDirection ( enum ParameterDirectionEnum plParmDirection ) { + HRESULT _hr = put_Direction(plParmDirection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum ParameterDirectionEnum _Parameter::GetDirection ( ) { + enum ParameterDirectionEnum _result; + HRESULT _hr = get_Direction(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Parameter::PutPrecision ( unsigned char pbPrecision ) { + HRESULT _hr = put_Precision(pbPrecision); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline unsigned char _Parameter::GetPrecision ( ) { + unsigned char _result = 0; + HRESULT _hr = get_Precision(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Parameter::PutNumericScale ( unsigned char pbScale ) { + HRESULT _hr = put_NumericScale(pbScale); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline unsigned char _Parameter::GetNumericScale ( ) { + unsigned char _result = 0; + HRESULT _hr = get_NumericScale(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Parameter::PutSize ( long pl ) { + HRESULT _hr = put_Size(pl); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long _Parameter::GetSize ( ) { + long _result = 0; + HRESULT _hr = get_Size(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline HRESULT _Parameter::AppendChunk ( const _variant_t & Val ) { + HRESULT _hr = raw_AppendChunk(Val); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline long _Parameter::GetAttributes ( ) { + long _result = 0; + HRESULT _hr = get_Attributes(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Parameter::PutAttributes ( long plParmAttribs ) { + HRESULT _hr = put_Attributes(plParmAttribs); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +// +// interface Parameters wrapper method implementations +// + +inline _ParameterPtr Parameters::GetItem ( const _variant_t & Index ) { + struct _Parameter * _result = 0; + HRESULT _hr = get_Item(Index, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _ParameterPtr(_result, false); +} + +// +// dispinterface ConnectionEvents wrapper method implementations +// + +inline HRESULT ConnectionEvents::InfoMessage ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x0, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0009\x4003\x0009", pError, adStatus, pConnection); + return _result; +} + +inline HRESULT ConnectionEvents::BeginTransComplete ( long TransactionLevel, struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x1, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x0009\x4003\x0009", TransactionLevel, pError, adStatus, pConnection); + return _result; +} + +inline HRESULT ConnectionEvents::CommitTransComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x3, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0009\x4003\x0009", pError, adStatus, pConnection); + return _result; +} + +inline HRESULT ConnectionEvents::RollbackTransComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x2, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0009\x4003\x0009", pError, adStatus, pConnection); + return _result; +} + +inline HRESULT ConnectionEvents::WillExecute ( BSTR * Source, enum CursorTypeEnum * CursorType, enum LockTypeEnum * LockType, long * Options, enum EventStatusEnum * adStatus, struct _Command * pCommand, struct _Recordset * pRecordset, struct _Connection * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x4, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x4008\x4003\x4003\x4003\x4003\x0009\x0009\x0009", Source, CursorType, LockType, Options, adStatus, pCommand, pRecordset, pConnection); + return _result; +} + +inline HRESULT ConnectionEvents::ExecuteComplete ( long RecordsAffected, struct Error * pError, enum EventStatusEnum * adStatus, struct _Command * pCommand, struct _Recordset * pRecordset, struct _Connection * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x5, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x0009\x4003\x0009\x0009\x0009", RecordsAffected, pError, adStatus, pCommand, pRecordset, pConnection); + return _result; +} + +inline HRESULT ConnectionEvents::WillConnect ( BSTR * ConnectionString, BSTR * UserID, BSTR * Password, long * Options, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x6, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x4008\x4008\x4008\x4003\x4003\x0009", ConnectionString, UserID, Password, Options, adStatus, pConnection); + return _result; +} + +inline HRESULT ConnectionEvents::ConnectComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x7, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0009\x4003\x0009", pError, adStatus, pConnection); + return _result; +} + +inline HRESULT ConnectionEvents::Disconnect ( enum EventStatusEnum * adStatus, struct _Connection * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x8, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x4003\x0009", adStatus, pConnection); + return _result; +} + +// +// dispinterface RecordsetEvents wrapper method implementations +// + +inline HRESULT RecordsetEvents::WillChangeField ( long cFields, const _variant_t & Fields, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x9, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x000c\x4003\x0009", cFields, &Fields, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents::FieldChangeComplete ( long cFields, const _variant_t & Fields, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0xa, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x000c\x0009\x4003\x0009", cFields, &Fields, pError, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents::WillChangeRecord ( enum EventReasonEnum adReason, long cRecords, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0xb, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x0003\x4003\x0009", adReason, cRecords, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents::RecordChangeComplete ( enum EventReasonEnum adReason, long cRecords, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0xc, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x0003\x0009\x4003\x0009", adReason, cRecords, pError, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents::WillChangeRecordset ( enum EventReasonEnum adReason, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0xd, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x4003\x0009", adReason, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents::RecordsetChangeComplete ( enum EventReasonEnum adReason, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0xe, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x0009\x4003\x0009", adReason, pError, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents::WillMove ( enum EventReasonEnum adReason, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0xf, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x4003\x0009", adReason, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents::MoveComplete ( enum EventReasonEnum adReason, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x10, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x0009\x4003\x0009", adReason, pError, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents::EndOfRecordset ( VARIANT_BOOL * fMoreData, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x11, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x400b\x4003\x0009", fMoreData, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents::FetchProgress ( long Progress, long MaxProgress, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x12, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x0003\x4003\x0009", Progress, MaxProgress, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents::FetchComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x13, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0009\x4003\x0009", pError, adStatus, pRecordset); + return _result; +} + +// +// interface ADOConnectionConstruction15 wrapper method implementations +// + +inline IUnknownPtr ADOConnectionConstruction15::GetDSO ( ) { + IUnknown * _result = 0; + HRESULT _hr = get_DSO(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return IUnknownPtr(_result, false); +} + +inline IUnknownPtr ADOConnectionConstruction15::GetSession ( ) { + IUnknown * _result = 0; + HRESULT _hr = get_Session(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return IUnknownPtr(_result, false); +} + +inline HRESULT ADOConnectionConstruction15::WrapDSOandSession ( IUnknown * pDSO, IUnknown * pSession ) { + HRESULT _hr = raw_WrapDSOandSession(pDSO, pSession); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface _Stream wrapper method implementations +// + +inline long _Stream::GetSize ( ) { + long _result = 0; + HRESULT _hr = get_Size(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline VARIANT_BOOL _Stream::GetEOS ( ) { + VARIANT_BOOL _result = 0; + HRESULT _hr = get_EOS(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline long _Stream::GetPosition ( ) { + long _result = 0; + HRESULT _hr = get_Position(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Stream::PutPosition ( long pPos ) { + HRESULT _hr = put_Position(pPos); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum StreamTypeEnum _Stream::GetType ( ) { + enum StreamTypeEnum _result; + HRESULT _hr = get_Type(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Stream::PutType ( enum StreamTypeEnum ptype ) { + HRESULT _hr = put_Type(ptype); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum LineSeparatorEnum _Stream::GetLineSeparator ( ) { + enum LineSeparatorEnum _result; + HRESULT _hr = get_LineSeparator(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Stream::PutLineSeparator ( enum LineSeparatorEnum pLS ) { + HRESULT _hr = put_LineSeparator(pLS); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum ObjectStateEnum _Stream::GetState ( ) { + enum ObjectStateEnum _result; + HRESULT _hr = get_State(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline enum ConnectModeEnum _Stream::GetMode ( ) { + enum ConnectModeEnum _result; + HRESULT _hr = get_Mode(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Stream::PutMode ( enum ConnectModeEnum pMode ) { + HRESULT _hr = put_Mode(pMode); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _bstr_t _Stream::GetCharset ( ) { + BSTR _result = 0; + HRESULT _hr = get_Charset(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void _Stream::PutCharset ( _bstr_t pbstrCharset ) { + HRESULT _hr = put_Charset(pbstrCharset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _variant_t _Stream::Read ( long NumBytes ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = raw_Read(NumBytes, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline HRESULT _Stream::Open ( const _variant_t & Source, enum ConnectModeEnum Mode, enum StreamOpenOptionsEnum Options, _bstr_t UserName, _bstr_t Password ) { + HRESULT _hr = raw_Open(Source, Mode, Options, UserName, Password); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream::Close ( ) { + HRESULT _hr = raw_Close(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream::SkipLine ( ) { + HRESULT _hr = raw_SkipLine(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream::Write ( const _variant_t & Buffer ) { + HRESULT _hr = raw_Write(Buffer); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream::SetEOS ( ) { + HRESULT _hr = raw_SetEOS(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream::CopyTo ( struct _Stream * DestStream, long CharNumber ) { + HRESULT _hr = raw_CopyTo(DestStream, CharNumber); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream::Flush ( ) { + HRESULT _hr = raw_Flush(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream::SaveToFile ( _bstr_t FileName, enum SaveOptionsEnum Options ) { + HRESULT _hr = raw_SaveToFile(FileName, Options); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream::LoadFromFile ( _bstr_t FileName ) { + HRESULT _hr = raw_LoadFromFile(FileName); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline _bstr_t _Stream::ReadText ( long NumChars ) { + BSTR _result = 0; + HRESULT _hr = raw_ReadText(NumChars, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline HRESULT _Stream::WriteText ( _bstr_t Data, enum StreamWriteEnum Options ) { + HRESULT _hr = raw_WriteText(Data, Options); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream::Cancel ( ) { + HRESULT _hr = raw_Cancel(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface ADORecordConstruction wrapper method implementations +// + +inline IUnknownPtr ADORecordConstruction::GetRow ( ) { + IUnknown * _result = 0; + HRESULT _hr = get_Row(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return IUnknownPtr(_result, false); +} + +inline void ADORecordConstruction::PutRow ( IUnknown * ppRow ) { + HRESULT _hr = put_Row(ppRow); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void ADORecordConstruction::PutParentRow ( IUnknown * _arg1 ) { + HRESULT _hr = put_ParentRow(_arg1); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +// +// interface ADOStreamConstruction wrapper method implementations +// + +inline IUnknownPtr ADOStreamConstruction::GetStream ( ) { + IUnknown * _result = 0; + HRESULT _hr = get_Stream(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return IUnknownPtr(_result, false); +} + +inline void ADOStreamConstruction::PutStream ( IUnknown * ppStm ) { + HRESULT _hr = put_Stream(ppStm); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +// +// interface ADOCommandConstruction wrapper method implementations +// + +inline IUnknownPtr ADOCommandConstruction::GetOLEDBCommand ( ) { + IUnknown * _result = 0; + HRESULT _hr = get_OLEDBCommand(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return IUnknownPtr(_result, false); +} + +inline void ADOCommandConstruction::PutOLEDBCommand ( IUnknown * ppOLEDBCommand ) { + HRESULT _hr = put_OLEDBCommand(ppOLEDBCommand); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +// +// interface ADORecordsetConstruction wrapper method implementations +// + +inline IUnknownPtr ADORecordsetConstruction::GetRowset ( ) { + IUnknown * _result = 0; + HRESULT _hr = get_Rowset(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return IUnknownPtr(_result, false); +} + +inline void ADORecordsetConstruction::PutRowset ( IUnknown * ppRowset ) { + HRESULT _hr = put_Rowset(ppRowset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline ADO_LONGPTR ADORecordsetConstruction::GetChapter ( ) { + ADO_LONGPTR _result; + HRESULT _hr = get_Chapter(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void ADORecordsetConstruction::PutChapter ( ADO_LONGPTR plChapter ) { + HRESULT _hr = put_Chapter(plChapter); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline IUnknownPtr ADORecordsetConstruction::GetRowPosition ( ) { + IUnknown * _result = 0; + HRESULT _hr = get_RowPosition(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return IUnknownPtr(_result, false); +} + +inline void ADORecordsetConstruction::PutRowPosition ( IUnknown * ppRowPos ) { + HRESULT _hr = put_RowPosition(ppRowPos); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +// +// interface Field15 wrapper method implementations +// + +inline long Field15::GetActualSize ( ) { + long _result = 0; + HRESULT _hr = get_ActualSize(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline long Field15::GetAttributes ( ) { + long _result = 0; + HRESULT _hr = get_Attributes(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline long Field15::GetDefinedSize ( ) { + long _result = 0; + HRESULT _hr = get_DefinedSize(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _bstr_t Field15::GetName ( ) { + BSTR _result = 0; + HRESULT _hr = get_Name(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline enum DataTypeEnum Field15::GetType ( ) { + enum DataTypeEnum _result; + HRESULT _hr = get_Type(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _variant_t Field15::GetValue ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_Value(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void Field15::PutValue ( const _variant_t & pvar ) { + HRESULT _hr = put_Value(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline unsigned char Field15::GetPrecision ( ) { + unsigned char _result = 0; + HRESULT _hr = get_Precision(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline unsigned char Field15::GetNumericScale ( ) { + unsigned char _result = 0; + HRESULT _hr = get_NumericScale(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline HRESULT Field15::AppendChunk ( const _variant_t & Data ) { + HRESULT _hr = raw_AppendChunk(Data); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline _variant_t Field15::GetChunk ( long Length ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = raw_GetChunk(Length, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline _variant_t Field15::GetOriginalValue ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_OriginalValue(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline _variant_t Field15::GetUnderlyingValue ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_UnderlyingValue(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +// +// interface Field20_Deprecated wrapper method implementations +// + +inline ADO_LONGPTR Field20_Deprecated::GetActualSize ( ) { + ADO_LONGPTR _result; + HRESULT _hr = get_ActualSize(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline long Field20_Deprecated::GetAttributes ( ) { + long _result = 0; + HRESULT _hr = get_Attributes(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline ADO_LONGPTR Field20_Deprecated::GetDefinedSize ( ) { + ADO_LONGPTR _result; + HRESULT _hr = get_DefinedSize(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _bstr_t Field20_Deprecated::GetName ( ) { + BSTR _result = 0; + HRESULT _hr = get_Name(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline enum DataTypeEnum Field20_Deprecated::GetType ( ) { + enum DataTypeEnum _result; + HRESULT _hr = get_Type(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _variant_t Field20_Deprecated::GetValue ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_Value(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void Field20_Deprecated::PutValue ( const _variant_t & pvar ) { + HRESULT _hr = put_Value(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline unsigned char Field20_Deprecated::GetPrecision ( ) { + unsigned char _result = 0; + HRESULT _hr = get_Precision(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline unsigned char Field20_Deprecated::GetNumericScale ( ) { + unsigned char _result = 0; + HRESULT _hr = get_NumericScale(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline HRESULT Field20_Deprecated::AppendChunk ( const _variant_t & Data ) { + HRESULT _hr = raw_AppendChunk(Data); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline _variant_t Field20_Deprecated::GetChunk ( long Length ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = raw_GetChunk(Length, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline _variant_t Field20_Deprecated::GetOriginalValue ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_OriginalValue(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline _variant_t Field20_Deprecated::GetUnderlyingValue ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_UnderlyingValue(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline IUnknownPtr Field20_Deprecated::GetDataFormat ( ) { + IUnknown * _result = 0; + HRESULT _hr = get_DataFormat(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return IUnknownPtr(_result, false); +} + +inline void Field20_Deprecated::PutRefDataFormat ( IUnknown * ppiDF ) { + HRESULT _hr = putref_DataFormat(ppiDF); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Field20_Deprecated::PutPrecision ( unsigned char pbPrecision ) { + HRESULT _hr = put_Precision(pbPrecision); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Field20_Deprecated::PutNumericScale ( unsigned char pbNumericScale ) { + HRESULT _hr = put_NumericScale(pbNumericScale); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Field20_Deprecated::PutType ( enum DataTypeEnum pDataType ) { + HRESULT _hr = put_Type(pDataType); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Field20_Deprecated::PutDefinedSize ( ADO_LONGPTR pl ) { + HRESULT _hr = put_DefinedSize(pl); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Field20_Deprecated::PutAttributes ( long pl ) { + HRESULT _hr = put_Attributes(pl); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +// +// interface Field_Deprecated wrapper method implementations +// + +inline long Field_Deprecated::GetStatus ( ) { + long _result = 0; + HRESULT _hr = get_Status(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +// +// interface Fields15_Deprecated wrapper method implementations +// + +inline Field_DeprecatedPtr Fields15_Deprecated::GetItem ( const _variant_t & Index ) { + struct Field_Deprecated * _result = 0; + HRESULT _hr = get_Item(Index, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return Field_DeprecatedPtr(_result, false); +} + +// +// interface Fields20_Deprecated wrapper method implementations +// + +inline HRESULT Fields20_Deprecated::_Append ( _bstr_t Name, enum DataTypeEnum Type, ADO_LONGPTR DefinedSize, enum FieldAttributeEnum Attrib ) { + HRESULT _hr = raw__Append(Name, Type, DefinedSize, Attrib); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Fields20_Deprecated::Delete ( const _variant_t & Index ) { + HRESULT _hr = raw_Delete(Index); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface Fields_Deprecated wrapper method implementations +// + +inline HRESULT Fields_Deprecated::Append ( _bstr_t Name, enum DataTypeEnum Type, ADO_LONGPTR DefinedSize, enum FieldAttributeEnum Attrib, const _variant_t & FieldValue ) { + HRESULT _hr = raw_Append(Name, Type, DefinedSize, Attrib, FieldValue); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Fields_Deprecated::Update ( ) { + HRESULT _hr = raw_Update(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Fields_Deprecated::Resync ( enum ResyncEnum ResyncValues ) { + HRESULT _hr = raw_Resync(ResyncValues); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Fields_Deprecated::CancelUpdate ( ) { + HRESULT _hr = raw_CancelUpdate(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface _Parameter_Deprecated wrapper method implementations +// + +inline _bstr_t _Parameter_Deprecated::GetName ( ) { + BSTR _result = 0; + HRESULT _hr = get_Name(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void _Parameter_Deprecated::PutName ( _bstr_t pbstr ) { + HRESULT _hr = put_Name(pbstr); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _variant_t _Parameter_Deprecated::GetValue ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_Value(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void _Parameter_Deprecated::PutValue ( const _variant_t & pvar ) { + HRESULT _hr = put_Value(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum DataTypeEnum _Parameter_Deprecated::GetType ( ) { + enum DataTypeEnum _result; + HRESULT _hr = get_Type(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Parameter_Deprecated::PutType ( enum DataTypeEnum psDataType ) { + HRESULT _hr = put_Type(psDataType); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void _Parameter_Deprecated::PutDirection ( enum ParameterDirectionEnum plParmDirection ) { + HRESULT _hr = put_Direction(plParmDirection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum ParameterDirectionEnum _Parameter_Deprecated::GetDirection ( ) { + enum ParameterDirectionEnum _result; + HRESULT _hr = get_Direction(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Parameter_Deprecated::PutPrecision ( unsigned char pbPrecision ) { + HRESULT _hr = put_Precision(pbPrecision); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline unsigned char _Parameter_Deprecated::GetPrecision ( ) { + unsigned char _result = 0; + HRESULT _hr = get_Precision(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Parameter_Deprecated::PutNumericScale ( unsigned char pbScale ) { + HRESULT _hr = put_NumericScale(pbScale); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline unsigned char _Parameter_Deprecated::GetNumericScale ( ) { + unsigned char _result = 0; + HRESULT _hr = get_NumericScale(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Parameter_Deprecated::PutSize ( ADO_LONGPTR pl ) { + HRESULT _hr = put_Size(pl); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline ADO_LONGPTR _Parameter_Deprecated::GetSize ( ) { + ADO_LONGPTR _result; + HRESULT _hr = get_Size(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline HRESULT _Parameter_Deprecated::AppendChunk ( const _variant_t & Val ) { + HRESULT _hr = raw_AppendChunk(Val); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline long _Parameter_Deprecated::GetAttributes ( ) { + long _result = 0; + HRESULT _hr = get_Attributes(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Parameter_Deprecated::PutAttributes ( long plParmAttribs ) { + HRESULT _hr = put_Attributes(plParmAttribs); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +// +// interface Parameters_Deprecated wrapper method implementations +// + +inline _Parameter_DeprecatedPtr Parameters_Deprecated::GetItem ( const _variant_t & Index ) { + struct _Parameter_Deprecated * _result = 0; + HRESULT _hr = get_Item(Index, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _Parameter_DeprecatedPtr(_result, false); +} + +// +// dispinterface ConnectionEvents_Deprecated wrapper method implementations +// + +inline HRESULT ConnectionEvents_Deprecated::InfoMessage ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection_Deprecated * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x0, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0009\x4003\x0009", pError, adStatus, pConnection); + return _result; +} + +inline HRESULT ConnectionEvents_Deprecated::BeginTransComplete ( long TransactionLevel, struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection_Deprecated * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x1, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x0009\x4003\x0009", TransactionLevel, pError, adStatus, pConnection); + return _result; +} + +inline HRESULT ConnectionEvents_Deprecated::CommitTransComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection_Deprecated * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x3, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0009\x4003\x0009", pError, adStatus, pConnection); + return _result; +} + +inline HRESULT ConnectionEvents_Deprecated::RollbackTransComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection_Deprecated * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x2, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0009\x4003\x0009", pError, adStatus, pConnection); + return _result; +} + +inline HRESULT ConnectionEvents_Deprecated::WillExecute ( BSTR * Source, enum CursorTypeEnum * CursorType, enum LockTypeEnum * LockType, long * Options, enum EventStatusEnum * adStatus, struct _Command_Deprecated * pCommand, struct _Recordset_Deprecated * pRecordset, struct _Connection_Deprecated * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x4, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x4008\x4003\x4003\x4003\x4003\x0009\x0009\x0009", Source, CursorType, LockType, Options, adStatus, pCommand, pRecordset, pConnection); + return _result; +} + +inline HRESULT ConnectionEvents_Deprecated::ExecuteComplete ( long RecordsAffected, struct Error * pError, enum EventStatusEnum * adStatus, struct _Command_Deprecated * pCommand, struct _Recordset_Deprecated * pRecordset, struct _Connection_Deprecated * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x5, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x0009\x4003\x0009\x0009\x0009", RecordsAffected, pError, adStatus, pCommand, pRecordset, pConnection); + return _result; +} + +inline HRESULT ConnectionEvents_Deprecated::WillConnect ( BSTR * ConnectionString, BSTR * UserID, BSTR * Password, long * Options, enum EventStatusEnum * adStatus, struct _Connection_Deprecated * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x6, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x4008\x4008\x4008\x4003\x4003\x0009", ConnectionString, UserID, Password, Options, adStatus, pConnection); + return _result; +} + +inline HRESULT ConnectionEvents_Deprecated::ConnectComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection_Deprecated * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x7, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0009\x4003\x0009", pError, adStatus, pConnection); + return _result; +} + +inline HRESULT ConnectionEvents_Deprecated::Disconnect ( enum EventStatusEnum * adStatus, struct _Connection_Deprecated * pConnection ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x8, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x4003\x0009", adStatus, pConnection); + return _result; +} + +// +// dispinterface RecordsetEvents_Deprecated wrapper method implementations +// + +inline HRESULT RecordsetEvents_Deprecated::WillChangeField ( long cFields, const _variant_t & Fields, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x9, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x000c\x4003\x0009", cFields, &Fields, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents_Deprecated::FieldChangeComplete ( long cFields, const _variant_t & Fields, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0xa, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x000c\x0009\x4003\x0009", cFields, &Fields, pError, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents_Deprecated::WillChangeRecord ( enum EventReasonEnum adReason, long cRecords, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0xb, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x0003\x4003\x0009", adReason, cRecords, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents_Deprecated::RecordChangeComplete ( enum EventReasonEnum adReason, long cRecords, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0xc, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x0003\x0009\x4003\x0009", adReason, cRecords, pError, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents_Deprecated::WillChangeRecordset ( enum EventReasonEnum adReason, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0xd, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x4003\x0009", adReason, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents_Deprecated::RecordsetChangeComplete ( enum EventReasonEnum adReason, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0xe, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x0009\x4003\x0009", adReason, pError, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents_Deprecated::WillMove ( enum EventReasonEnum adReason, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0xf, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x4003\x0009", adReason, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents_Deprecated::MoveComplete ( enum EventReasonEnum adReason, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x10, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x0009\x4003\x0009", adReason, pError, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents_Deprecated::EndOfRecordset ( VARIANT_BOOL * fMoreData, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x11, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x400b\x4003\x0009", fMoreData, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents_Deprecated::FetchProgress ( long Progress, long MaxProgress, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x12, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0003\x0003\x4003\x0009", Progress, MaxProgress, adStatus, pRecordset); + return _result; +} + +inline HRESULT RecordsetEvents_Deprecated::FetchComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _result = 0; + _com_dispatch_method(this, 0x13, DISPATCH_METHOD, VT_ERROR, (void*)&_result, + L"\x0009\x4003\x0009", pError, adStatus, pRecordset); + return _result; +} + +// +// interface _Stream_Deprecated wrapper method implementations +// + +inline ADO_LONGPTR _Stream_Deprecated::GetSize ( ) { + ADO_LONGPTR _result; + HRESULT _hr = get_Size(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline VARIANT_BOOL _Stream_Deprecated::GetEOS ( ) { + VARIANT_BOOL _result = 0; + HRESULT _hr = get_EOS(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline ADO_LONGPTR _Stream_Deprecated::GetPosition ( ) { + ADO_LONGPTR _result; + HRESULT _hr = get_Position(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Stream_Deprecated::PutPosition ( ADO_LONGPTR pPos ) { + HRESULT _hr = put_Position(pPos); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum StreamTypeEnum _Stream_Deprecated::GetType ( ) { + enum StreamTypeEnum _result; + HRESULT _hr = get_Type(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Stream_Deprecated::PutType ( enum StreamTypeEnum ptype ) { + HRESULT _hr = put_Type(ptype); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum LineSeparatorEnum _Stream_Deprecated::GetLineSeparator ( ) { + enum LineSeparatorEnum _result; + HRESULT _hr = get_LineSeparator(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Stream_Deprecated::PutLineSeparator ( enum LineSeparatorEnum pLS ) { + HRESULT _hr = put_LineSeparator(pLS); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum ObjectStateEnum _Stream_Deprecated::GetState ( ) { + enum ObjectStateEnum _result; + HRESULT _hr = get_State(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline enum ConnectModeEnum _Stream_Deprecated::GetMode ( ) { + enum ConnectModeEnum _result; + HRESULT _hr = get_Mode(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Stream_Deprecated::PutMode ( enum ConnectModeEnum pMode ) { + HRESULT _hr = put_Mode(pMode); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _bstr_t _Stream_Deprecated::GetCharset ( ) { + BSTR _result = 0; + HRESULT _hr = get_Charset(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void _Stream_Deprecated::PutCharset ( _bstr_t pbstrCharset ) { + HRESULT _hr = put_Charset(pbstrCharset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _variant_t _Stream_Deprecated::Read ( long NumBytes ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = raw_Read(NumBytes, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline HRESULT _Stream_Deprecated::Open ( const _variant_t & Source, enum ConnectModeEnum Mode, enum StreamOpenOptionsEnum Options, _bstr_t UserName, _bstr_t Password ) { + HRESULT _hr = raw_Open(Source, Mode, Options, UserName, Password); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream_Deprecated::Close ( ) { + HRESULT _hr = raw_Close(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream_Deprecated::SkipLine ( ) { + HRESULT _hr = raw_SkipLine(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream_Deprecated::Write ( const _variant_t & Buffer ) { + HRESULT _hr = raw_Write(Buffer); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream_Deprecated::SetEOS ( ) { + HRESULT _hr = raw_SetEOS(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream_Deprecated::CopyTo ( struct _Stream_Deprecated * DestStream, ADO_LONGPTR CharNumber ) { + HRESULT _hr = raw_CopyTo(DestStream, CharNumber); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream_Deprecated::Flush ( ) { + HRESULT _hr = raw_Flush(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream_Deprecated::SaveToFile ( _bstr_t FileName, enum SaveOptionsEnum Options ) { + HRESULT _hr = raw_SaveToFile(FileName, Options); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream_Deprecated::LoadFromFile ( _bstr_t FileName ) { + HRESULT _hr = raw_LoadFromFile(FileName); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline _bstr_t _Stream_Deprecated::ReadText ( long NumChars ) { + BSTR _result = 0; + HRESULT _hr = raw_ReadText(NumChars, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline HRESULT _Stream_Deprecated::WriteText ( _bstr_t Data, enum StreamWriteEnum Options ) { + HRESULT _hr = raw_WriteText(Data, Options); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Stream_Deprecated::Cancel ( ) { + HRESULT _hr = raw_Cancel(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface Field15_Deprecated wrapper method implementations +// + +inline ADO_LONGPTR Field15_Deprecated::GetActualSize ( ) { + ADO_LONGPTR _result; + HRESULT _hr = get_ActualSize(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline long Field15_Deprecated::GetAttributes ( ) { + long _result = 0; + HRESULT _hr = get_Attributes(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline ADO_LONGPTR Field15_Deprecated::GetDefinedSize ( ) { + ADO_LONGPTR _result; + HRESULT _hr = get_DefinedSize(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _bstr_t Field15_Deprecated::GetName ( ) { + BSTR _result = 0; + HRESULT _hr = get_Name(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline enum DataTypeEnum Field15_Deprecated::GetType ( ) { + enum DataTypeEnum _result; + HRESULT _hr = get_Type(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _variant_t Field15_Deprecated::GetValue ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_Value(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void Field15_Deprecated::PutValue ( const _variant_t & pvar ) { + HRESULT _hr = put_Value(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline unsigned char Field15_Deprecated::GetPrecision ( ) { + unsigned char _result = 0; + HRESULT _hr = get_Precision(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline unsigned char Field15_Deprecated::GetNumericScale ( ) { + unsigned char _result = 0; + HRESULT _hr = get_NumericScale(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline HRESULT Field15_Deprecated::AppendChunk ( const _variant_t & Data ) { + HRESULT _hr = raw_AppendChunk(Data); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline _variant_t Field15_Deprecated::GetChunk ( long Length ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = raw_GetChunk(Length, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline _variant_t Field15_Deprecated::GetOriginalValue ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_OriginalValue(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline _variant_t Field15_Deprecated::GetUnderlyingValue ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_UnderlyingValue(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +// +// interface Command15 wrapper method implementations +// + +inline _ConnectionPtr Command15::GetActiveConnection ( ) { + struct _Connection * _result = 0; + HRESULT _hr = get_ActiveConnection(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _ConnectionPtr(_result, false); +} + +inline void Command15::PutRefActiveConnection ( struct _Connection * ppvObject ) { + HRESULT _hr = putref_ActiveConnection(ppvObject); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Command15::PutActiveConnection ( const _variant_t & ppvObject ) { + HRESULT _hr = put_ActiveConnection(ppvObject); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _bstr_t Command15::GetCommandText ( ) { + BSTR _result = 0; + HRESULT _hr = get_CommandText(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void Command15::PutCommandText ( _bstr_t pbstr ) { + HRESULT _hr = put_CommandText(pbstr); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long Command15::GetCommandTimeout ( ) { + long _result = 0; + HRESULT _hr = get_CommandTimeout(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Command15::PutCommandTimeout ( long pl ) { + HRESULT _hr = put_CommandTimeout(pl); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline VARIANT_BOOL Command15::GetPrepared ( ) { + VARIANT_BOOL _result = 0; + HRESULT _hr = get_Prepared(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Command15::PutPrepared ( VARIANT_BOOL pfPrepared ) { + HRESULT _hr = put_Prepared(pfPrepared); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _RecordsetPtr Command15::Execute ( VARIANT * RecordsAffected, VARIANT * Parameters, long Options ) { + struct _Recordset * _result = 0; + HRESULT _hr = raw_Execute(RecordsAffected, Parameters, Options, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _RecordsetPtr(_result, false); +} + +inline _ParameterPtr Command15::CreateParameter ( _bstr_t Name, enum DataTypeEnum Type, enum ParameterDirectionEnum Direction, long Size, const _variant_t & Value ) { + struct _Parameter * _result = 0; + HRESULT _hr = raw_CreateParameter(Name, Type, Direction, Size, Value, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _ParameterPtr(_result, false); +} + +inline ParametersPtr Command15::GetParameters ( ) { + struct Parameters * _result = 0; + HRESULT _hr = get_Parameters(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return ParametersPtr(_result, false); +} + +inline void Command15::PutCommandType ( enum CommandTypeEnum plCmdType ) { + HRESULT _hr = put_CommandType(plCmdType); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum CommandTypeEnum Command15::GetCommandType ( ) { + enum CommandTypeEnum _result; + HRESULT _hr = get_CommandType(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _bstr_t Command15::GetName ( ) { + BSTR _result = 0; + HRESULT _hr = get_Name(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void Command15::PutName ( _bstr_t pbstrName ) { + HRESULT _hr = put_Name(pbstrName); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +// +// interface Command25 wrapper method implementations +// + +inline long Command25::GetState ( ) { + long _result = 0; + HRESULT _hr = get_State(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline HRESULT Command25::Cancel ( ) { + HRESULT _hr = raw_Cancel(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface _Command wrapper method implementations +// + +inline void _Command::PutRefCommandStream ( IUnknown * pvStream ) { + HRESULT _hr = putref_CommandStream(pvStream); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _variant_t _Command::GetCommandStream ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_CommandStream(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void _Command::PutDialect ( _bstr_t pbstrDialect ) { + HRESULT _hr = put_Dialect(pbstrDialect); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _bstr_t _Command::GetDialect ( ) { + BSTR _result = 0; + HRESULT _hr = get_Dialect(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void _Command::PutNamedParameters ( VARIANT_BOOL pfNamedParameters ) { + HRESULT _hr = put_NamedParameters(pfNamedParameters); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline VARIANT_BOOL _Command::GetNamedParameters ( ) { + VARIANT_BOOL _result = 0; + HRESULT _hr = get_NamedParameters(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +// +// interface Connection15 wrapper method implementations +// + +inline _bstr_t Connection15::GetConnectionString ( ) { + BSTR _result = 0; + HRESULT _hr = get_ConnectionString(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void Connection15::PutConnectionString ( _bstr_t pbstr ) { + HRESULT _hr = put_ConnectionString(pbstr); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long Connection15::GetCommandTimeout ( ) { + long _result = 0; + HRESULT _hr = get_CommandTimeout(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Connection15::PutCommandTimeout ( long plTimeout ) { + HRESULT _hr = put_CommandTimeout(plTimeout); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long Connection15::GetConnectionTimeout ( ) { + long _result = 0; + HRESULT _hr = get_ConnectionTimeout(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Connection15::PutConnectionTimeout ( long plTimeout ) { + HRESULT _hr = put_ConnectionTimeout(plTimeout); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _bstr_t Connection15::GetVersion ( ) { + BSTR _result = 0; + HRESULT _hr = get_Version(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline HRESULT Connection15::Close ( ) { + HRESULT _hr = raw_Close(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline _RecordsetPtr Connection15::Execute ( _bstr_t CommandText, VARIANT * RecordsAffected, long Options ) { + struct _Recordset * _result = 0; + HRESULT _hr = raw_Execute(CommandText, RecordsAffected, Options, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _RecordsetPtr(_result, false); +} + +inline long Connection15::BeginTrans ( ) { + long _result = 0; + HRESULT _hr = raw_BeginTrans(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline HRESULT Connection15::CommitTrans ( ) { + HRESULT _hr = raw_CommitTrans(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Connection15::RollbackTrans ( ) { + HRESULT _hr = raw_RollbackTrans(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Connection15::Open ( _bstr_t ConnectionString, _bstr_t UserID, _bstr_t Password, long Options ) { + HRESULT _hr = raw_Open(ConnectionString, UserID, Password, Options); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline ErrorsPtr Connection15::GetErrors ( ) { + struct Errors * _result = 0; + HRESULT _hr = get_Errors(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return ErrorsPtr(_result, false); +} + +inline _bstr_t Connection15::GetDefaultDatabase ( ) { + BSTR _result = 0; + HRESULT _hr = get_DefaultDatabase(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void Connection15::PutDefaultDatabase ( _bstr_t pbstr ) { + HRESULT _hr = put_DefaultDatabase(pbstr); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum IsolationLevelEnum Connection15::GetIsolationLevel ( ) { + enum IsolationLevelEnum _result; + HRESULT _hr = get_IsolationLevel(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Connection15::PutIsolationLevel ( enum IsolationLevelEnum Level ) { + HRESULT _hr = put_IsolationLevel(Level); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long Connection15::GetAttributes ( ) { + long _result = 0; + HRESULT _hr = get_Attributes(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Connection15::PutAttributes ( long plAttr ) { + HRESULT _hr = put_Attributes(plAttr); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum CursorLocationEnum Connection15::GetCursorLocation ( ) { + enum CursorLocationEnum _result; + HRESULT _hr = get_CursorLocation(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Connection15::PutCursorLocation ( enum CursorLocationEnum plCursorLoc ) { + HRESULT _hr = put_CursorLocation(plCursorLoc); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum ConnectModeEnum Connection15::GetMode ( ) { + enum ConnectModeEnum _result; + HRESULT _hr = get_Mode(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Connection15::PutMode ( enum ConnectModeEnum plMode ) { + HRESULT _hr = put_Mode(plMode); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _bstr_t Connection15::GetProvider ( ) { + BSTR _result = 0; + HRESULT _hr = get_Provider(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void Connection15::PutProvider ( _bstr_t pbstr ) { + HRESULT _hr = put_Provider(pbstr); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long Connection15::GetState ( ) { + long _result = 0; + HRESULT _hr = get_State(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _RecordsetPtr Connection15::OpenSchema ( enum SchemaEnum Schema, const _variant_t & Restrictions, const _variant_t & SchemaID ) { + struct _Recordset * _result = 0; + HRESULT _hr = raw_OpenSchema(Schema, Restrictions, SchemaID, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _RecordsetPtr(_result, false); +} + +// +// interface _Connection wrapper method implementations +// + +inline HRESULT _Connection::Cancel ( ) { + HRESULT _hr = raw_Cancel(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface Recordset15 wrapper method implementations +// + +inline enum PositionEnum Recordset15::GetAbsolutePosition ( ) { + enum PositionEnum _result; + HRESULT _hr = get_AbsolutePosition(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15::PutAbsolutePosition ( enum PositionEnum pl ) { + HRESULT _hr = put_AbsolutePosition(pl); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Recordset15::PutRefActiveConnection ( IDispatch * pvar ) { + HRESULT _hr = putref_ActiveConnection(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Recordset15::PutActiveConnection ( const _variant_t & pvar ) { + HRESULT _hr = put_ActiveConnection(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _variant_t Recordset15::GetActiveConnection ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_ActiveConnection(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline VARIANT_BOOL Recordset15::GetadoBOF ( ) { + VARIANT_BOOL _result = 0; + HRESULT _hr = get_adoBOF(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _variant_t Recordset15::GetBookmark ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_Bookmark(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void Recordset15::PutBookmark ( const _variant_t & pvBookmark ) { + HRESULT _hr = put_Bookmark(pvBookmark); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long Recordset15::GetCacheSize ( ) { + long _result = 0; + HRESULT _hr = get_CacheSize(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15::PutCacheSize ( long pl ) { + HRESULT _hr = put_CacheSize(pl); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum CursorTypeEnum Recordset15::GetCursorType ( ) { + enum CursorTypeEnum _result; + HRESULT _hr = get_CursorType(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15::PutCursorType ( enum CursorTypeEnum plCursorType ) { + HRESULT _hr = put_CursorType(plCursorType); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline VARIANT_BOOL Recordset15::GetadoEOF ( ) { + VARIANT_BOOL _result = 0; + HRESULT _hr = get_adoEOF(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline FieldsPtr Recordset15::GetFields ( ) { + struct Fields * _result = 0; + HRESULT _hr = get_Fields(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return FieldsPtr(_result, false); +} + +inline enum LockTypeEnum Recordset15::GetLockType ( ) { + enum LockTypeEnum _result; + HRESULT _hr = get_LockType(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15::PutLockType ( enum LockTypeEnum plLockType ) { + HRESULT _hr = put_LockType(plLockType); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long Recordset15::GetMaxRecords ( ) { + long _result = 0; + HRESULT _hr = get_MaxRecords(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15::PutMaxRecords ( long plMaxRecords ) { + HRESULT _hr = put_MaxRecords(plMaxRecords); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long Recordset15::GetRecordCount ( ) { + long _result = 0; + HRESULT _hr = get_RecordCount(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15::PutRefSource ( IDispatch * pvSource ) { + HRESULT _hr = putref_Source(pvSource); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Recordset15::PutSource ( _bstr_t pvSource ) { + HRESULT _hr = put_Source(pvSource); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _variant_t Recordset15::GetSource ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_Source(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline HRESULT Recordset15::AddNew ( const _variant_t & FieldList, const _variant_t & Values ) { + HRESULT _hr = raw_AddNew(FieldList, Values); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15::CancelUpdate ( ) { + HRESULT _hr = raw_CancelUpdate(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15::Close ( ) { + HRESULT _hr = raw_Close(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15::Delete ( enum AffectEnum AffectRecords ) { + HRESULT _hr = raw_Delete(AffectRecords); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline _variant_t Recordset15::GetRows ( long Rows, const _variant_t & Start, const _variant_t & Fields ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = raw_GetRows(Rows, Start, Fields, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline HRESULT Recordset15::Move ( long NumRecords, const _variant_t & Start ) { + HRESULT _hr = raw_Move(NumRecords, Start); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15::MoveNext ( ) { + HRESULT _hr = raw_MoveNext(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15::MovePrevious ( ) { + HRESULT _hr = raw_MovePrevious(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15::MoveFirst ( ) { + HRESULT _hr = raw_MoveFirst(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15::MoveLast ( ) { + HRESULT _hr = raw_MoveLast(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15::Open ( const _variant_t & Source, const _variant_t & ActiveConnection, enum CursorTypeEnum CursorType, enum LockTypeEnum LockType, long Options ) { + HRESULT _hr = raw_Open(Source, ActiveConnection, CursorType, LockType, Options); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15::Requery ( long Options ) { + HRESULT _hr = raw_Requery(Options); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15::_xResync ( enum AffectEnum AffectRecords ) { + HRESULT _hr = raw__xResync(AffectRecords); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15::Update ( const _variant_t & Fields, const _variant_t & Values ) { + HRESULT _hr = raw_Update(Fields, Values); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline enum PositionEnum Recordset15::GetAbsolutePage ( ) { + enum PositionEnum _result; + HRESULT _hr = get_AbsolutePage(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15::PutAbsolutePage ( enum PositionEnum pl ) { + HRESULT _hr = put_AbsolutePage(pl); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum EditModeEnum Recordset15::GetEditMode ( ) { + enum EditModeEnum _result; + HRESULT _hr = get_EditMode(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _variant_t Recordset15::GetFilter ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_Filter(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void Recordset15::PutFilter ( const _variant_t & Criteria ) { + HRESULT _hr = put_Filter(Criteria); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long Recordset15::GetPageCount ( ) { + long _result = 0; + HRESULT _hr = get_PageCount(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline long Recordset15::GetPageSize ( ) { + long _result = 0; + HRESULT _hr = get_PageSize(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15::PutPageSize ( long pl ) { + HRESULT _hr = put_PageSize(pl); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _bstr_t Recordset15::GetSort ( ) { + BSTR _result = 0; + HRESULT _hr = get_Sort(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void Recordset15::PutSort ( _bstr_t Criteria ) { + HRESULT _hr = put_Sort(Criteria); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long Recordset15::GetStatus ( ) { + long _result = 0; + HRESULT _hr = get_Status(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline long Recordset15::GetState ( ) { + long _result = 0; + HRESULT _hr = get_State(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _RecordsetPtr Recordset15::_xClone ( ) { + struct _Recordset * _result = 0; + HRESULT _hr = raw__xClone(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _RecordsetPtr(_result, false); +} + +inline HRESULT Recordset15::UpdateBatch ( enum AffectEnum AffectRecords ) { + HRESULT _hr = raw_UpdateBatch(AffectRecords); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15::CancelBatch ( enum AffectEnum AffectRecords ) { + HRESULT _hr = raw_CancelBatch(AffectRecords); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline enum CursorLocationEnum Recordset15::GetCursorLocation ( ) { + enum CursorLocationEnum _result; + HRESULT _hr = get_CursorLocation(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15::PutCursorLocation ( enum CursorLocationEnum plCursorLoc ) { + HRESULT _hr = put_CursorLocation(plCursorLoc); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _RecordsetPtr Recordset15::NextRecordset ( VARIANT * RecordsAffected ) { + struct _Recordset * _result = 0; + HRESULT _hr = raw_NextRecordset(RecordsAffected, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _RecordsetPtr(_result, false); +} + +inline VARIANT_BOOL Recordset15::Supports ( enum CursorOptionEnum CursorOptions ) { + VARIANT_BOOL _result = 0; + HRESULT _hr = raw_Supports(CursorOptions, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _variant_t Recordset15::GetCollect ( const _variant_t & Index ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_Collect(Index, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void Recordset15::PutCollect ( const _variant_t & Index, const _variant_t & pvar ) { + HRESULT _hr = put_Collect(Index, pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum MarshalOptionsEnum Recordset15::GetMarshalOptions ( ) { + enum MarshalOptionsEnum _result; + HRESULT _hr = get_MarshalOptions(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15::PutMarshalOptions ( enum MarshalOptionsEnum peMarshal ) { + HRESULT _hr = put_MarshalOptions(peMarshal); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline HRESULT Recordset15::Find ( _bstr_t Criteria, long SkipRecords, enum SearchDirectionEnum SearchDirection, const _variant_t & Start ) { + HRESULT _hr = raw_Find(Criteria, SkipRecords, SearchDirection, Start); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface Recordset20 wrapper method implementations +// + +inline HRESULT Recordset20::Cancel ( ) { + HRESULT _hr = raw_Cancel(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline IUnknownPtr Recordset20::GetDataSource ( ) { + IUnknown * _result = 0; + HRESULT _hr = get_DataSource(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return IUnknownPtr(_result, false); +} + +inline void Recordset20::PutRefDataSource ( IUnknown * ppunkDataSource ) { + HRESULT _hr = putref_DataSource(ppunkDataSource); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline HRESULT Recordset20::_xSave ( _bstr_t FileName, enum PersistFormatEnum PersistFormat ) { + HRESULT _hr = raw__xSave(FileName, PersistFormat); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline IDispatchPtr Recordset20::GetActiveCommand ( ) { + IDispatch * _result = 0; + HRESULT _hr = get_ActiveCommand(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return IDispatchPtr(_result, false); +} + +inline void Recordset20::PutStayInSync ( VARIANT_BOOL pbStayInSync ) { + HRESULT _hr = put_StayInSync(pbStayInSync); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline VARIANT_BOOL Recordset20::GetStayInSync ( ) { + VARIANT_BOOL _result = 0; + HRESULT _hr = get_StayInSync(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _bstr_t Recordset20::GetString ( enum StringFormatEnum StringFormat, long NumRows, _bstr_t ColumnDelimeter, _bstr_t RowDelimeter, _bstr_t NullExpr ) { + BSTR _result = 0; + HRESULT _hr = raw_GetString(StringFormat, NumRows, ColumnDelimeter, RowDelimeter, NullExpr, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline _bstr_t Recordset20::GetDataMember ( ) { + BSTR _result = 0; + HRESULT _hr = get_DataMember(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void Recordset20::PutDataMember ( _bstr_t pbstrDataMember ) { + HRESULT _hr = put_DataMember(pbstrDataMember); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum CompareEnum Recordset20::CompareBookmarks ( const _variant_t & Bookmark1, const _variant_t & Bookmark2 ) { + enum CompareEnum _result; + HRESULT _hr = raw_CompareBookmarks(Bookmark1, Bookmark2, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _RecordsetPtr Recordset20::Clone ( enum LockTypeEnum LockType ) { + struct _Recordset * _result = 0; + HRESULT _hr = raw_Clone(LockType, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _RecordsetPtr(_result, false); +} + +inline HRESULT Recordset20::Resync ( enum AffectEnum AffectRecords, enum ResyncEnum ResyncValues ) { + HRESULT _hr = raw_Resync(AffectRecords, ResyncValues); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface Recordset21 wrapper method implementations +// + +inline HRESULT Recordset21::Seek ( const _variant_t & KeyValues, enum SeekEnum SeekOption ) { + HRESULT _hr = raw_Seek(KeyValues, SeekOption); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline void Recordset21::PutIndex ( _bstr_t pbstrIndex ) { + HRESULT _hr = put_Index(pbstrIndex); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _bstr_t Recordset21::GetIndex ( ) { + BSTR _result = 0; + HRESULT _hr = get_Index(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +// +// interface _Recordset wrapper method implementations +// + +inline HRESULT _Recordset::Save ( const _variant_t & Destination, enum PersistFormatEnum PersistFormat ) { + HRESULT _hr = raw_Save(Destination, PersistFormat); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface ConnectionEventsVt wrapper method implementations +// + +inline HRESULT ConnectionEventsVt::InfoMessage ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) { + HRESULT _hr = raw_InfoMessage(pError, adStatus, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT ConnectionEventsVt::BeginTransComplete ( long TransactionLevel, struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) { + HRESULT _hr = raw_BeginTransComplete(TransactionLevel, pError, adStatus, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT ConnectionEventsVt::CommitTransComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) { + HRESULT _hr = raw_CommitTransComplete(pError, adStatus, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT ConnectionEventsVt::RollbackTransComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) { + HRESULT _hr = raw_RollbackTransComplete(pError, adStatus, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT ConnectionEventsVt::WillExecute ( BSTR * Source, enum CursorTypeEnum * CursorType, enum LockTypeEnum * LockType, long * Options, enum EventStatusEnum * adStatus, struct _Command * pCommand, struct _Recordset * pRecordset, struct _Connection * pConnection ) { + HRESULT _hr = raw_WillExecute(Source, CursorType, LockType, Options, adStatus, pCommand, pRecordset, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT ConnectionEventsVt::ExecuteComplete ( long RecordsAffected, struct Error * pError, enum EventStatusEnum * adStatus, struct _Command * pCommand, struct _Recordset * pRecordset, struct _Connection * pConnection ) { + HRESULT _hr = raw_ExecuteComplete(RecordsAffected, pError, adStatus, pCommand, pRecordset, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT ConnectionEventsVt::WillConnect ( BSTR * ConnectionString, BSTR * UserID, BSTR * Password, long * Options, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) { + HRESULT _hr = raw_WillConnect(ConnectionString, UserID, Password, Options, adStatus, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT ConnectionEventsVt::ConnectComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection * pConnection ) { + HRESULT _hr = raw_ConnectComplete(pError, adStatus, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT ConnectionEventsVt::Disconnect ( enum EventStatusEnum * adStatus, struct _Connection * pConnection ) { + HRESULT _hr = raw_Disconnect(adStatus, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface RecordsetEventsVt wrapper method implementations +// + +inline HRESULT RecordsetEventsVt::WillChangeField ( long cFields, const _variant_t & Fields, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _hr = raw_WillChangeField(cFields, Fields, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt::FieldChangeComplete ( long cFields, const _variant_t & Fields, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _hr = raw_FieldChangeComplete(cFields, Fields, pError, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt::WillChangeRecord ( enum EventReasonEnum adReason, long cRecords, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _hr = raw_WillChangeRecord(adReason, cRecords, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt::RecordChangeComplete ( enum EventReasonEnum adReason, long cRecords, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _hr = raw_RecordChangeComplete(adReason, cRecords, pError, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt::WillChangeRecordset ( enum EventReasonEnum adReason, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _hr = raw_WillChangeRecordset(adReason, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt::RecordsetChangeComplete ( enum EventReasonEnum adReason, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _hr = raw_RecordsetChangeComplete(adReason, pError, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt::WillMove ( enum EventReasonEnum adReason, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _hr = raw_WillMove(adReason, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt::MoveComplete ( enum EventReasonEnum adReason, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _hr = raw_MoveComplete(adReason, pError, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt::EndOfRecordset ( VARIANT_BOOL * fMoreData, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _hr = raw_EndOfRecordset(fMoreData, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt::FetchProgress ( long Progress, long MaxProgress, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _hr = raw_FetchProgress(Progress, MaxProgress, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt::FetchComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset * pRecordset ) { + HRESULT _hr = raw_FetchComplete(pError, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface _Record wrapper method implementations +// + +inline _variant_t _Record::GetActiveConnection ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_ActiveConnection(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void _Record::PutActiveConnection ( _bstr_t pvar ) { + HRESULT _hr = put_ActiveConnection(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void _Record::PutRefActiveConnection ( struct _Connection * pvar ) { + HRESULT _hr = putref_ActiveConnection(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum ObjectStateEnum _Record::GetState ( ) { + enum ObjectStateEnum _result; + HRESULT _hr = get_State(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _variant_t _Record::GetSource ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_Source(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void _Record::PutSource ( _bstr_t pvar ) { + HRESULT _hr = put_Source(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void _Record::PutRefSource ( IDispatch * pvar ) { + HRESULT _hr = putref_Source(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum ConnectModeEnum _Record::GetMode ( ) { + enum ConnectModeEnum _result; + HRESULT _hr = get_Mode(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Record::PutMode ( enum ConnectModeEnum pMode ) { + HRESULT _hr = put_Mode(pMode); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _bstr_t _Record::GetParentURL ( ) { + BSTR _result = 0; + HRESULT _hr = get_ParentURL(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline _bstr_t _Record::MoveRecord ( _bstr_t Source, _bstr_t Destination, _bstr_t UserName, _bstr_t Password, enum MoveRecordOptionsEnum Options, VARIANT_BOOL Async ) { + BSTR _result = 0; + HRESULT _hr = raw_MoveRecord(Source, Destination, UserName, Password, Options, Async, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline _bstr_t _Record::CopyRecord ( _bstr_t Source, _bstr_t Destination, _bstr_t UserName, _bstr_t Password, enum CopyRecordOptionsEnum Options, VARIANT_BOOL Async ) { + BSTR _result = 0; + HRESULT _hr = raw_CopyRecord(Source, Destination, UserName, Password, Options, Async, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline HRESULT _Record::DeleteRecord ( _bstr_t Source, VARIANT_BOOL Async ) { + HRESULT _hr = raw_DeleteRecord(Source, Async); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Record::Open ( const _variant_t & Source, const _variant_t & ActiveConnection, enum ConnectModeEnum Mode, enum RecordCreateOptionsEnum CreateOptions, enum RecordOpenOptionsEnum Options, _bstr_t UserName, _bstr_t Password ) { + HRESULT _hr = raw_Open(Source, ActiveConnection, Mode, CreateOptions, Options, UserName, Password); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Record::Close ( ) { + HRESULT _hr = raw_Close(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline FieldsPtr _Record::GetFields ( ) { + struct Fields * _result = 0; + HRESULT _hr = get_Fields(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return FieldsPtr(_result, false); +} + +inline enum RecordTypeEnum _Record::GetRecordType ( ) { + enum RecordTypeEnum _result; + HRESULT _hr = get_RecordType(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _RecordsetPtr _Record::GetChildren ( ) { + struct _Recordset * _result = 0; + HRESULT _hr = raw_GetChildren(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _RecordsetPtr(_result, false); +} + +inline HRESULT _Record::Cancel ( ) { + HRESULT _hr = raw_Cancel(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface ConnectionEventsVt_Deprecated wrapper method implementations +// + +inline HRESULT ConnectionEventsVt_Deprecated::InfoMessage ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection_Deprecated * pConnection ) { + HRESULT _hr = raw_InfoMessage(pError, adStatus, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT ConnectionEventsVt_Deprecated::BeginTransComplete ( long TransactionLevel, struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection_Deprecated * pConnection ) { + HRESULT _hr = raw_BeginTransComplete(TransactionLevel, pError, adStatus, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT ConnectionEventsVt_Deprecated::CommitTransComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection_Deprecated * pConnection ) { + HRESULT _hr = raw_CommitTransComplete(pError, adStatus, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT ConnectionEventsVt_Deprecated::RollbackTransComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection_Deprecated * pConnection ) { + HRESULT _hr = raw_RollbackTransComplete(pError, adStatus, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT ConnectionEventsVt_Deprecated::WillExecute ( BSTR * Source, enum CursorTypeEnum * CursorType, enum LockTypeEnum * LockType, long * Options, enum EventStatusEnum * adStatus, struct _Command_Deprecated * pCommand, struct _Recordset_Deprecated * pRecordset, struct _Connection_Deprecated * pConnection ) { + HRESULT _hr = raw_WillExecute(Source, CursorType, LockType, Options, adStatus, pCommand, pRecordset, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT ConnectionEventsVt_Deprecated::ExecuteComplete ( long RecordsAffected, struct Error * pError, enum EventStatusEnum * adStatus, struct _Command_Deprecated * pCommand, struct _Recordset_Deprecated * pRecordset, struct _Connection_Deprecated * pConnection ) { + HRESULT _hr = raw_ExecuteComplete(RecordsAffected, pError, adStatus, pCommand, pRecordset, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT ConnectionEventsVt_Deprecated::WillConnect ( BSTR * ConnectionString, BSTR * UserID, BSTR * Password, long * Options, enum EventStatusEnum * adStatus, struct _Connection_Deprecated * pConnection ) { + HRESULT _hr = raw_WillConnect(ConnectionString, UserID, Password, Options, adStatus, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT ConnectionEventsVt_Deprecated::ConnectComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Connection_Deprecated * pConnection ) { + HRESULT _hr = raw_ConnectComplete(pError, adStatus, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT ConnectionEventsVt_Deprecated::Disconnect ( enum EventStatusEnum * adStatus, struct _Connection_Deprecated * pConnection ) { + HRESULT _hr = raw_Disconnect(adStatus, pConnection); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface Connection15_Deprecated wrapper method implementations +// + +inline _bstr_t Connection15_Deprecated::GetConnectionString ( ) { + BSTR _result = 0; + HRESULT _hr = get_ConnectionString(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void Connection15_Deprecated::PutConnectionString ( _bstr_t pbstr ) { + HRESULT _hr = put_ConnectionString(pbstr); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long Connection15_Deprecated::GetCommandTimeout ( ) { + long _result = 0; + HRESULT _hr = get_CommandTimeout(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Connection15_Deprecated::PutCommandTimeout ( long plTimeout ) { + HRESULT _hr = put_CommandTimeout(plTimeout); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long Connection15_Deprecated::GetConnectionTimeout ( ) { + long _result = 0; + HRESULT _hr = get_ConnectionTimeout(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Connection15_Deprecated::PutConnectionTimeout ( long plTimeout ) { + HRESULT _hr = put_ConnectionTimeout(plTimeout); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _bstr_t Connection15_Deprecated::GetVersion ( ) { + BSTR _result = 0; + HRESULT _hr = get_Version(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline HRESULT Connection15_Deprecated::Close ( ) { + HRESULT _hr = raw_Close(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline _Recordset_DeprecatedPtr Connection15_Deprecated::Execute ( _bstr_t CommandText, VARIANT * RecordsAffected, long Options ) { + struct _Recordset_Deprecated * _result = 0; + HRESULT _hr = raw_Execute(CommandText, RecordsAffected, Options, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _Recordset_DeprecatedPtr(_result, false); +} + +inline long Connection15_Deprecated::BeginTrans ( ) { + long _result = 0; + HRESULT _hr = raw_BeginTrans(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline HRESULT Connection15_Deprecated::CommitTrans ( ) { + HRESULT _hr = raw_CommitTrans(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Connection15_Deprecated::RollbackTrans ( ) { + HRESULT _hr = raw_RollbackTrans(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Connection15_Deprecated::Open ( _bstr_t ConnectionString, _bstr_t UserID, _bstr_t Password, long Options ) { + HRESULT _hr = raw_Open(ConnectionString, UserID, Password, Options); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline ErrorsPtr Connection15_Deprecated::GetErrors ( ) { + struct Errors * _result = 0; + HRESULT _hr = get_Errors(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return ErrorsPtr(_result, false); +} + +inline _bstr_t Connection15_Deprecated::GetDefaultDatabase ( ) { + BSTR _result = 0; + HRESULT _hr = get_DefaultDatabase(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void Connection15_Deprecated::PutDefaultDatabase ( _bstr_t pbstr ) { + HRESULT _hr = put_DefaultDatabase(pbstr); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum IsolationLevelEnum Connection15_Deprecated::GetIsolationLevel ( ) { + enum IsolationLevelEnum _result; + HRESULT _hr = get_IsolationLevel(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Connection15_Deprecated::PutIsolationLevel ( enum IsolationLevelEnum Level ) { + HRESULT _hr = put_IsolationLevel(Level); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long Connection15_Deprecated::GetAttributes ( ) { + long _result = 0; + HRESULT _hr = get_Attributes(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Connection15_Deprecated::PutAttributes ( long plAttr ) { + HRESULT _hr = put_Attributes(plAttr); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum CursorLocationEnum Connection15_Deprecated::GetCursorLocation ( ) { + enum CursorLocationEnum _result; + HRESULT _hr = get_CursorLocation(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Connection15_Deprecated::PutCursorLocation ( enum CursorLocationEnum plCursorLoc ) { + HRESULT _hr = put_CursorLocation(plCursorLoc); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum ConnectModeEnum Connection15_Deprecated::GetMode ( ) { + enum ConnectModeEnum _result; + HRESULT _hr = get_Mode(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Connection15_Deprecated::PutMode ( enum ConnectModeEnum plMode ) { + HRESULT _hr = put_Mode(plMode); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _bstr_t Connection15_Deprecated::GetProvider ( ) { + BSTR _result = 0; + HRESULT _hr = get_Provider(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void Connection15_Deprecated::PutProvider ( _bstr_t pbstr ) { + HRESULT _hr = put_Provider(pbstr); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long Connection15_Deprecated::GetState ( ) { + long _result = 0; + HRESULT _hr = get_State(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _Recordset_DeprecatedPtr Connection15_Deprecated::OpenSchema ( enum SchemaEnum Schema, const _variant_t & Restrictions, const _variant_t & SchemaID ) { + struct _Recordset_Deprecated * _result = 0; + HRESULT _hr = raw_OpenSchema(Schema, Restrictions, SchemaID, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _Recordset_DeprecatedPtr(_result, false); +} + +// +// interface _Connection_Deprecated wrapper method implementations +// + +inline HRESULT _Connection_Deprecated::Cancel ( ) { + HRESULT _hr = raw_Cancel(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface Recordset15_Deprecated wrapper method implementations +// + +inline PositionEnum_Param Recordset15_Deprecated::GetAbsolutePosition ( ) { + PositionEnum_Param _result; + HRESULT _hr = get_AbsolutePosition(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15_Deprecated::PutAbsolutePosition ( PositionEnum_Param pl ) { + HRESULT _hr = put_AbsolutePosition(pl); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Recordset15_Deprecated::PutRefActiveConnection ( IDispatch * pvar ) { + HRESULT _hr = putref_ActiveConnection(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Recordset15_Deprecated::PutActiveConnection ( const _variant_t & pvar ) { + HRESULT _hr = put_ActiveConnection(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _variant_t Recordset15_Deprecated::GetActiveConnection ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_ActiveConnection(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline VARIANT_BOOL Recordset15_Deprecated::GetadoBOF ( ) { + VARIANT_BOOL _result = 0; + HRESULT _hr = get_adoBOF(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _variant_t Recordset15_Deprecated::GetBookmark ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_Bookmark(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void Recordset15_Deprecated::PutBookmark ( const _variant_t & pvBookmark ) { + HRESULT _hr = put_Bookmark(pvBookmark); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long Recordset15_Deprecated::GetCacheSize ( ) { + long _result = 0; + HRESULT _hr = get_CacheSize(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15_Deprecated::PutCacheSize ( long pl ) { + HRESULT _hr = put_CacheSize(pl); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum CursorTypeEnum Recordset15_Deprecated::GetCursorType ( ) { + enum CursorTypeEnum _result; + HRESULT _hr = get_CursorType(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15_Deprecated::PutCursorType ( enum CursorTypeEnum plCursorType ) { + HRESULT _hr = put_CursorType(plCursorType); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline VARIANT_BOOL Recordset15_Deprecated::GetadoEOF ( ) { + VARIANT_BOOL _result = 0; + HRESULT _hr = get_adoEOF(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline Fields_DeprecatedPtr Recordset15_Deprecated::GetFields ( ) { + struct Fields_Deprecated * _result = 0; + HRESULT _hr = get_Fields(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return Fields_DeprecatedPtr(_result, false); +} + +inline enum LockTypeEnum Recordset15_Deprecated::GetLockType ( ) { + enum LockTypeEnum _result; + HRESULT _hr = get_LockType(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15_Deprecated::PutLockType ( enum LockTypeEnum plLockType ) { + HRESULT _hr = put_LockType(plLockType); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline ADO_LONGPTR Recordset15_Deprecated::GetMaxRecords ( ) { + ADO_LONGPTR _result; + HRESULT _hr = get_MaxRecords(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15_Deprecated::PutMaxRecords ( ADO_LONGPTR plMaxRecords ) { + HRESULT _hr = put_MaxRecords(plMaxRecords); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline ADO_LONGPTR Recordset15_Deprecated::GetRecordCount ( ) { + ADO_LONGPTR _result; + HRESULT _hr = get_RecordCount(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15_Deprecated::PutRefSource ( IDispatch * pvSource ) { + HRESULT _hr = putref_Source(pvSource); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Recordset15_Deprecated::PutSource ( _bstr_t pvSource ) { + HRESULT _hr = put_Source(pvSource); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _variant_t Recordset15_Deprecated::GetSource ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_Source(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline HRESULT Recordset15_Deprecated::AddNew ( const _variant_t & FieldList, const _variant_t & Values ) { + HRESULT _hr = raw_AddNew(FieldList, Values); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15_Deprecated::CancelUpdate ( ) { + HRESULT _hr = raw_CancelUpdate(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15_Deprecated::Close ( ) { + HRESULT _hr = raw_Close(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15_Deprecated::Delete ( enum AffectEnum AffectRecords ) { + HRESULT _hr = raw_Delete(AffectRecords); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline _variant_t Recordset15_Deprecated::GetRows ( long Rows, const _variant_t & Start, const _variant_t & Fields ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = raw_GetRows(Rows, Start, Fields, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline HRESULT Recordset15_Deprecated::Move ( ADO_LONGPTR NumRecords, const _variant_t & Start ) { + HRESULT _hr = raw_Move(NumRecords, Start); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15_Deprecated::MoveNext ( ) { + HRESULT _hr = raw_MoveNext(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15_Deprecated::MovePrevious ( ) { + HRESULT _hr = raw_MovePrevious(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15_Deprecated::MoveFirst ( ) { + HRESULT _hr = raw_MoveFirst(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15_Deprecated::MoveLast ( ) { + HRESULT _hr = raw_MoveLast(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15_Deprecated::Open ( const _variant_t & Source, const _variant_t & ActiveConnection, enum CursorTypeEnum CursorType, enum LockTypeEnum LockType, long Options ) { + HRESULT _hr = raw_Open(Source, ActiveConnection, CursorType, LockType, Options); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15_Deprecated::Requery ( long Options ) { + HRESULT _hr = raw_Requery(Options); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15_Deprecated::_xResync ( enum AffectEnum AffectRecords ) { + HRESULT _hr = raw__xResync(AffectRecords); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15_Deprecated::Update ( const _variant_t & Fields, const _variant_t & Values ) { + HRESULT _hr = raw_Update(Fields, Values); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline PositionEnum_Param Recordset15_Deprecated::GetAbsolutePage ( ) { + PositionEnum_Param _result; + HRESULT _hr = get_AbsolutePage(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15_Deprecated::PutAbsolutePage ( PositionEnum_Param pl ) { + HRESULT _hr = put_AbsolutePage(pl); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum EditModeEnum Recordset15_Deprecated::GetEditMode ( ) { + enum EditModeEnum _result; + HRESULT _hr = get_EditMode(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _variant_t Recordset15_Deprecated::GetFilter ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_Filter(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void Recordset15_Deprecated::PutFilter ( const _variant_t & Criteria ) { + HRESULT _hr = put_Filter(Criteria); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline ADO_LONGPTR Recordset15_Deprecated::GetPageCount ( ) { + ADO_LONGPTR _result; + HRESULT _hr = get_PageCount(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline long Recordset15_Deprecated::GetPageSize ( ) { + long _result = 0; + HRESULT _hr = get_PageSize(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15_Deprecated::PutPageSize ( long pl ) { + HRESULT _hr = put_PageSize(pl); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _bstr_t Recordset15_Deprecated::GetSort ( ) { + BSTR _result = 0; + HRESULT _hr = get_Sort(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void Recordset15_Deprecated::PutSort ( _bstr_t Criteria ) { + HRESULT _hr = put_Sort(Criteria); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long Recordset15_Deprecated::GetStatus ( ) { + long _result = 0; + HRESULT _hr = get_Status(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline long Recordset15_Deprecated::GetState ( ) { + long _result = 0; + HRESULT _hr = get_State(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _Recordset_DeprecatedPtr Recordset15_Deprecated::_xClone ( ) { + struct _Recordset_Deprecated * _result = 0; + HRESULT _hr = raw__xClone(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _Recordset_DeprecatedPtr(_result, false); +} + +inline HRESULT Recordset15_Deprecated::UpdateBatch ( enum AffectEnum AffectRecords ) { + HRESULT _hr = raw_UpdateBatch(AffectRecords); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT Recordset15_Deprecated::CancelBatch ( enum AffectEnum AffectRecords ) { + HRESULT _hr = raw_CancelBatch(AffectRecords); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline enum CursorLocationEnum Recordset15_Deprecated::GetCursorLocation ( ) { + enum CursorLocationEnum _result; + HRESULT _hr = get_CursorLocation(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15_Deprecated::PutCursorLocation ( enum CursorLocationEnum plCursorLoc ) { + HRESULT _hr = put_CursorLocation(plCursorLoc); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _Recordset_DeprecatedPtr Recordset15_Deprecated::NextRecordset ( VARIANT * RecordsAffected ) { + struct _Recordset_Deprecated * _result = 0; + HRESULT _hr = raw_NextRecordset(RecordsAffected, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _Recordset_DeprecatedPtr(_result, false); +} + +inline VARIANT_BOOL Recordset15_Deprecated::Supports ( enum CursorOptionEnum CursorOptions ) { + VARIANT_BOOL _result = 0; + HRESULT _hr = raw_Supports(CursorOptions, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _variant_t Recordset15_Deprecated::GetCollect ( const _variant_t & Index ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_Collect(Index, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void Recordset15_Deprecated::PutCollect ( const _variant_t & Index, const _variant_t & pvar ) { + HRESULT _hr = put_Collect(Index, pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum MarshalOptionsEnum Recordset15_Deprecated::GetMarshalOptions ( ) { + enum MarshalOptionsEnum _result; + HRESULT _hr = get_MarshalOptions(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Recordset15_Deprecated::PutMarshalOptions ( enum MarshalOptionsEnum peMarshal ) { + HRESULT _hr = put_MarshalOptions(peMarshal); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline HRESULT Recordset15_Deprecated::Find ( _bstr_t Criteria, ADO_LONGPTR SkipRecords, enum SearchDirectionEnum SearchDirection, const _variant_t & Start ) { + HRESULT _hr = raw_Find(Criteria, SkipRecords, SearchDirection, Start); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface Recordset20_Deprecated wrapper method implementations +// + +inline HRESULT Recordset20_Deprecated::Cancel ( ) { + HRESULT _hr = raw_Cancel(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline IUnknownPtr Recordset20_Deprecated::GetDataSource ( ) { + IUnknown * _result = 0; + HRESULT _hr = get_DataSource(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return IUnknownPtr(_result, false); +} + +inline void Recordset20_Deprecated::PutRefDataSource ( IUnknown * ppunkDataSource ) { + HRESULT _hr = putref_DataSource(ppunkDataSource); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline HRESULT Recordset20_Deprecated::_xSave ( _bstr_t FileName, enum PersistFormatEnum PersistFormat ) { + HRESULT _hr = raw__xSave(FileName, PersistFormat); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline IDispatchPtr Recordset20_Deprecated::GetActiveCommand ( ) { + IDispatch * _result = 0; + HRESULT _hr = get_ActiveCommand(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return IDispatchPtr(_result, false); +} + +inline void Recordset20_Deprecated::PutStayInSync ( VARIANT_BOOL pbStayInSync ) { + HRESULT _hr = put_StayInSync(pbStayInSync); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline VARIANT_BOOL Recordset20_Deprecated::GetStayInSync ( ) { + VARIANT_BOOL _result = 0; + HRESULT _hr = get_StayInSync(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _bstr_t Recordset20_Deprecated::GetString ( enum StringFormatEnum StringFormat, long NumRows, _bstr_t ColumnDelimeter, _bstr_t RowDelimeter, _bstr_t NullExpr ) { + BSTR _result = 0; + HRESULT _hr = raw_GetString(StringFormat, NumRows, ColumnDelimeter, RowDelimeter, NullExpr, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline _bstr_t Recordset20_Deprecated::GetDataMember ( ) { + BSTR _result = 0; + HRESULT _hr = get_DataMember(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void Recordset20_Deprecated::PutDataMember ( _bstr_t pbstrDataMember ) { + HRESULT _hr = put_DataMember(pbstrDataMember); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum CompareEnum Recordset20_Deprecated::CompareBookmarks ( const _variant_t & Bookmark1, const _variant_t & Bookmark2 ) { + enum CompareEnum _result; + HRESULT _hr = raw_CompareBookmarks(Bookmark1, Bookmark2, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _Recordset_DeprecatedPtr Recordset20_Deprecated::Clone ( enum LockTypeEnum LockType ) { + struct _Recordset_Deprecated * _result = 0; + HRESULT _hr = raw_Clone(LockType, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _Recordset_DeprecatedPtr(_result, false); +} + +inline HRESULT Recordset20_Deprecated::Resync ( enum AffectEnum AffectRecords, enum ResyncEnum ResyncValues ) { + HRESULT _hr = raw_Resync(AffectRecords, ResyncValues); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface Recordset21_Deprecated wrapper method implementations +// + +inline HRESULT Recordset21_Deprecated::Seek ( const _variant_t & KeyValues, enum SeekEnum SeekOption ) { + HRESULT _hr = raw_Seek(KeyValues, SeekOption); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline void Recordset21_Deprecated::PutIndex ( _bstr_t pbstrIndex ) { + HRESULT _hr = put_Index(pbstrIndex); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _bstr_t Recordset21_Deprecated::GetIndex ( ) { + BSTR _result = 0; + HRESULT _hr = get_Index(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +// +// interface _Recordset_Deprecated wrapper method implementations +// + +inline HRESULT _Recordset_Deprecated::Save ( const _variant_t & Destination, enum PersistFormatEnum PersistFormat ) { + HRESULT _hr = raw_Save(Destination, PersistFormat); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface Command15_Deprecated wrapper method implementations +// + +inline _Connection_DeprecatedPtr Command15_Deprecated::GetActiveConnection ( ) { + struct _Connection_Deprecated * _result = 0; + HRESULT _hr = get_ActiveConnection(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _Connection_DeprecatedPtr(_result, false); +} + +inline void Command15_Deprecated::PutRefActiveConnection ( struct _Connection_Deprecated * ppvObject ) { + HRESULT _hr = putref_ActiveConnection(ppvObject); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void Command15_Deprecated::PutActiveConnection ( const _variant_t & ppvObject ) { + HRESULT _hr = put_ActiveConnection(ppvObject); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _bstr_t Command15_Deprecated::GetCommandText ( ) { + BSTR _result = 0; + HRESULT _hr = get_CommandText(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void Command15_Deprecated::PutCommandText ( _bstr_t pbstr ) { + HRESULT _hr = put_CommandText(pbstr); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline long Command15_Deprecated::GetCommandTimeout ( ) { + long _result = 0; + HRESULT _hr = get_CommandTimeout(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Command15_Deprecated::PutCommandTimeout ( long pl ) { + HRESULT _hr = put_CommandTimeout(pl); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline VARIANT_BOOL Command15_Deprecated::GetPrepared ( ) { + VARIANT_BOOL _result = 0; + HRESULT _hr = get_Prepared(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void Command15_Deprecated::PutPrepared ( VARIANT_BOOL pfPrepared ) { + HRESULT _hr = put_Prepared(pfPrepared); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _Recordset_DeprecatedPtr Command15_Deprecated::Execute ( VARIANT * RecordsAffected, VARIANT * Parameters, long Options ) { + struct _Recordset_Deprecated * _result = 0; + HRESULT _hr = raw_Execute(RecordsAffected, Parameters, Options, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _Recordset_DeprecatedPtr(_result, false); +} + +inline _Parameter_DeprecatedPtr Command15_Deprecated::CreateParameter ( _bstr_t Name, enum DataTypeEnum Type, enum ParameterDirectionEnum Direction, ADO_LONGPTR Size, const _variant_t & Value ) { + struct _Parameter_Deprecated * _result = 0; + HRESULT _hr = raw_CreateParameter(Name, Type, Direction, Size, Value, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _Parameter_DeprecatedPtr(_result, false); +} + +inline Parameters_DeprecatedPtr Command15_Deprecated::GetParameters ( ) { + struct Parameters_Deprecated * _result = 0; + HRESULT _hr = get_Parameters(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return Parameters_DeprecatedPtr(_result, false); +} + +inline void Command15_Deprecated::PutCommandType ( enum CommandTypeEnum plCmdType ) { + HRESULT _hr = put_CommandType(plCmdType); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum CommandTypeEnum Command15_Deprecated::GetCommandType ( ) { + enum CommandTypeEnum _result; + HRESULT _hr = get_CommandType(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _bstr_t Command15_Deprecated::GetName ( ) { + BSTR _result = 0; + HRESULT _hr = get_Name(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void Command15_Deprecated::PutName ( _bstr_t pbstrName ) { + HRESULT _hr = put_Name(pbstrName); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +// +// interface Command25_Deprecated wrapper method implementations +// + +inline long Command25_Deprecated::GetState ( ) { + long _result = 0; + HRESULT _hr = get_State(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline HRESULT Command25_Deprecated::Cancel ( ) { + HRESULT _hr = raw_Cancel(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface _Command_Deprecated wrapper method implementations +// + +inline void _Command_Deprecated::PutRefCommandStream ( IUnknown * pvStream ) { + HRESULT _hr = putref_CommandStream(pvStream); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _variant_t _Command_Deprecated::GetCommandStream ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_CommandStream(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void _Command_Deprecated::PutDialect ( _bstr_t pbstrDialect ) { + HRESULT _hr = put_Dialect(pbstrDialect); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _bstr_t _Command_Deprecated::GetDialect ( ) { + BSTR _result = 0; + HRESULT _hr = get_Dialect(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline void _Command_Deprecated::PutNamedParameters ( VARIANT_BOOL pfNamedParameters ) { + HRESULT _hr = put_NamedParameters(pfNamedParameters); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline VARIANT_BOOL _Command_Deprecated::GetNamedParameters ( ) { + VARIANT_BOOL _result = 0; + HRESULT _hr = get_NamedParameters(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +// +// interface RecordsetEventsVt_Deprecated wrapper method implementations +// + +inline HRESULT RecordsetEventsVt_Deprecated::WillChangeField ( long cFields, const _variant_t & Fields, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _hr = raw_WillChangeField(cFields, Fields, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt_Deprecated::FieldChangeComplete ( long cFields, const _variant_t & Fields, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _hr = raw_FieldChangeComplete(cFields, Fields, pError, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt_Deprecated::WillChangeRecord ( enum EventReasonEnum adReason, long cRecords, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _hr = raw_WillChangeRecord(adReason, cRecords, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt_Deprecated::RecordChangeComplete ( enum EventReasonEnum adReason, long cRecords, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _hr = raw_RecordChangeComplete(adReason, cRecords, pError, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt_Deprecated::WillChangeRecordset ( enum EventReasonEnum adReason, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _hr = raw_WillChangeRecordset(adReason, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt_Deprecated::RecordsetChangeComplete ( enum EventReasonEnum adReason, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _hr = raw_RecordsetChangeComplete(adReason, pError, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt_Deprecated::WillMove ( enum EventReasonEnum adReason, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _hr = raw_WillMove(adReason, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt_Deprecated::MoveComplete ( enum EventReasonEnum adReason, struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _hr = raw_MoveComplete(adReason, pError, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt_Deprecated::EndOfRecordset ( VARIANT_BOOL * fMoreData, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _hr = raw_EndOfRecordset(fMoreData, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt_Deprecated::FetchProgress ( long Progress, long MaxProgress, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _hr = raw_FetchProgress(Progress, MaxProgress, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT RecordsetEventsVt_Deprecated::FetchComplete ( struct Error * pError, enum EventStatusEnum * adStatus, struct _Recordset_Deprecated * pRecordset ) { + HRESULT _hr = raw_FetchComplete(pError, adStatus, pRecordset); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +// +// interface _Record_Deprecated wrapper method implementations +// + +inline _variant_t _Record_Deprecated::GetActiveConnection ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_ActiveConnection(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void _Record_Deprecated::PutActiveConnection ( _bstr_t pvar ) { + HRESULT _hr = put_ActiveConnection(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void _Record_Deprecated::PutRefActiveConnection ( struct _Connection_Deprecated * pvar ) { + HRESULT _hr = putref_ActiveConnection(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum ObjectStateEnum _Record_Deprecated::GetState ( ) { + enum ObjectStateEnum _result; + HRESULT _hr = get_State(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _variant_t _Record_Deprecated::GetSource ( ) { + VARIANT _result; + VariantInit(&_result); + HRESULT _hr = get_Source(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _variant_t(_result, false); +} + +inline void _Record_Deprecated::PutSource ( _bstr_t pvar ) { + HRESULT _hr = put_Source(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline void _Record_Deprecated::PutRefSource ( IDispatch * pvar ) { + HRESULT _hr = putref_Source(pvar); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline enum ConnectModeEnum _Record_Deprecated::GetMode ( ) { + enum ConnectModeEnum _result; + HRESULT _hr = get_Mode(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline void _Record_Deprecated::PutMode ( enum ConnectModeEnum pMode ) { + HRESULT _hr = put_Mode(pMode); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); +} + +inline _bstr_t _Record_Deprecated::GetParentURL ( ) { + BSTR _result = 0; + HRESULT _hr = get_ParentURL(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline _bstr_t _Record_Deprecated::MoveRecord ( _bstr_t Source, _bstr_t Destination, _bstr_t UserName, _bstr_t Password, enum MoveRecordOptionsEnum Options, VARIANT_BOOL Async ) { + BSTR _result = 0; + HRESULT _hr = raw_MoveRecord(Source, Destination, UserName, Password, Options, Async, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline _bstr_t _Record_Deprecated::CopyRecord ( _bstr_t Source, _bstr_t Destination, _bstr_t UserName, _bstr_t Password, enum CopyRecordOptionsEnum Options, VARIANT_BOOL Async ) { + BSTR _result = 0; + HRESULT _hr = raw_CopyRecord(Source, Destination, UserName, Password, Options, Async, &_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _bstr_t(_result, false); +} + +inline HRESULT _Record_Deprecated::DeleteRecord ( _bstr_t Source, VARIANT_BOOL Async ) { + HRESULT _hr = raw_DeleteRecord(Source, Async); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Record_Deprecated::Open ( const _variant_t & Source, const _variant_t & ActiveConnection, enum ConnectModeEnum Mode, enum RecordCreateOptionsEnum CreateOptions, enum RecordOpenOptionsEnum Options, _bstr_t UserName, _bstr_t Password ) { + HRESULT _hr = raw_Open(Source, ActiveConnection, Mode, CreateOptions, Options, UserName, Password); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline HRESULT _Record_Deprecated::Close ( ) { + HRESULT _hr = raw_Close(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} + +inline Fields_DeprecatedPtr _Record_Deprecated::GetFields ( ) { + struct Fields_Deprecated * _result = 0; + HRESULT _hr = get_Fields(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return Fields_DeprecatedPtr(_result, false); +} + +inline enum RecordTypeEnum _Record_Deprecated::GetRecordType ( ) { + enum RecordTypeEnum _result; + HRESULT _hr = get_RecordType(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _result; +} + +inline _Recordset_DeprecatedPtr _Record_Deprecated::GetChildren ( ) { + struct _Recordset_Deprecated * _result = 0; + HRESULT _hr = raw_GetChildren(&_result); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _Recordset_DeprecatedPtr(_result, false); +} + +inline HRESULT _Record_Deprecated::Cancel ( ) { + HRESULT _hr = raw_Cancel(); + if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); + return _hr; +} diff --git a/zf_itk_c/x64/Release/test.obj b/zf_itk_c/x64/Release/test.obj new file mode 100644 index 0000000..885cf9a Binary files /dev/null and b/zf_itk_c/x64/Release/test.obj differ diff --git a/zf_itk_c/x64/Release/vc142.pdb b/zf_itk_c/x64/Release/vc142.pdb new file mode 100644 index 0000000..af3ed1d Binary files /dev/null and b/zf_itk_c/x64/Release/vc142.pdb differ diff --git a/zf_itk_c/x64/Release/zf_itk_c.Build.CppClean.log b/zf_itk_c/x64/Release/zf_itk_c.Build.CppClean.log new file mode 100644 index 0000000..9205c3d --- /dev/null +++ b/zf_itk_c/x64/Release/zf_itk_c.Build.CppClean.log @@ -0,0 +1,30 @@ +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\vc142.pdb +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\zf_sendparttoerp.obj +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\zf_sendpartbomtoerp.obj +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\zf_sendpart.obj +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\zf_sendgylxtoerp.obj +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\zf_sendbzgxtoerp.obj +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\erp_send_part.obj +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\zf_itk_c.obj +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\test.obj +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\kutil.obj +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\erp_send_gylx.obj +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\erp_send_gx.obj +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\erp_send_bzgx.obj +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\erp_send_bom.obj +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\connor_itk_util.obj +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\x64\release\zf_itk_c.dll +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\zf_itk_c.ipdb +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\zf_itk_c.iobj +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\x64\release\zf_itk_c.pdb +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\x64\release\zf_itk_c.lib +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\x64\release\zf_itk_c.exp +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\msado15.tli +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\msado15.tlh +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\zf_itk_c.tlog\cl.command.1.tlog +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\zf_itk_c.tlog\cl.read.1.tlog +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\zf_itk_c.tlog\cl.write.1.tlog +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\zf_itk_c.tlog\link.command.1.tlog +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\zf_itk_c.tlog\link.read.1.tlog +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\zf_itk_c.tlog\link.write.1.tlog +e:\itk_workspace\itk\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\x64\release\zf_itk_c.tlog\zf_itk_c.write.1u.tlog diff --git a/zf_itk_c/x64/Release/zf_itk_c.dll.recipe b/zf_itk_c/x64/Release/zf_itk_c.dll.recipe new file mode 100644 index 0000000..bab9b5b --- /dev/null +++ b/zf_itk_c/x64/Release/zf_itk_c.dll.recipe @@ -0,0 +1,11 @@ + + + + + E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\x64\Release\zf_itk_c.dll + + + + + + \ No newline at end of file diff --git a/zf_itk_c/x64/Release/zf_itk_c.iobj b/zf_itk_c/x64/Release/zf_itk_c.iobj new file mode 100644 index 0000000..979fda9 Binary files /dev/null and b/zf_itk_c/x64/Release/zf_itk_c.iobj differ diff --git a/zf_itk_c/x64/Release/zf_itk_c.ipdb b/zf_itk_c/x64/Release/zf_itk_c.ipdb new file mode 100644 index 0000000..2f97cd3 Binary files /dev/null and b/zf_itk_c/x64/Release/zf_itk_c.ipdb differ diff --git a/zf_itk_c/x64/Release/zf_itk_c.log b/zf_itk_c/x64/Release/zf_itk_c.log new file mode 100644 index 0000000..d5cd926 --- /dev/null +++ b/zf_itk_c/x64/Release/zf_itk_c.log @@ -0,0 +1,147 @@ + connor_itk_util.cpp +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\connor_itk_util.cpp(121,6): warning C4996: 'chdir': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _chdir. See online help for details. +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\connor_itk_util.cpp(128,7): warning C4996: 'chdir': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _chdir. See online help for details. +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\connor_itk_util.cpp(203,6): warning C4996: 'chdir': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _chdir. See online help for details. +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\connor_itk_util.cpp(210,7): warning C4996: 'chdir': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _chdir. See online help for details. + connor_set_prop_value.cpp +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include_cpp\base_utils\IFail.hxx(114,17): warning C4251: “IFail::m_message”: class“std::basic_string,std::allocator>”需要有 dll 接口由 class“IFail”的客户端使用 +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 + erp_send_bom.cpp +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include_cpp\base_utils\IFail.hxx(114,17): warning C4251: “IFail::m_message”: class“std::basic_string,std::allocator>”需要有 dll 接口由 class“IFail”的客户端使用 +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 + erp_send_bzgx.cpp +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include_cpp\base_utils\IFail.hxx(114,17): warning C4251: “IFail::m_message”: class“std::basic_string,std::allocator>”需要有 dll 接口由 class“IFail”的客户端使用 +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 + erp_send_gx.cpp +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include_cpp\base_utils\IFail.hxx(114,17): warning C4251: “IFail::m_message”: class“std::basic_string,std::allocator>”需要有 dll 接口由 class“IFail”的客户端使用 +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 + erp_send_gylx.cpp +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include_cpp\base_utils\IFail.hxx(114,17): warning C4251: “IFail::m_message”: class“std::basic_string,std::allocator>”需要有 dll 接口由 class“IFail”的客户端使用 +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 + kutil.cpp +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include_cpp\base_utils\IFail.hxx(114,17): warning C4251: “IFail::m_message”: class“std::basic_string,std::allocator>”需要有 dll 接口由 class“IFail”的客户端使用 +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include_cpp\mld\logging\Logger.hxx(592,29): warning C4251: “Teamcenter::Logging::Logger::loggerName”: class“std::basic_string,std::allocator>”需要有 dll 接口由 class“Teamcenter::Logging::Logger”的客户端使用 +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\kutil.cpp(42,13): warning C4101: “arg”: 未引用的局部变量 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\kutil.cpp(136,29): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\kutil.cpp(158,27): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\kutil.cpp(221,12): warning C4101: “now”: 未引用的局部变量 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\kutil.cpp(220,10): warning C4101: “date_string”: 未引用的局部变量 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\kutil.cpp(222,16): warning C4101: “p”: 未引用的局部变量 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\kutil.cpp(289,29): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 + test.cpp + zf_itk_c.cpp +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\zf_itk_c.cpp(101,17): warning C4101: “mth_tag”: 未引用的局部变量 + erp_send_part.cpp +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include_cpp\base_utils\IFail.hxx(114,17): warning C4251: “IFail::m_message”: class“std::basic_string,std::allocator>”需要有 dll 接口由 class“IFail”的客户端使用 +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 + ZF_SendBZGXToERP.cpp +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include_cpp\base_utils\IFail.hxx(114,17): warning C4251: “IFail::m_message”: class“std::basic_string,std::allocator>”需要有 dll 接口由 class“IFail”的客户端使用 +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(85,30): warning C4190: “getCurrentTime”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(86,37): warning C4190: “getCurrentTimestamp17”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(88,53): warning C4190: “getLogFilePath”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(89,32): warning C4190: “generate_uuid_v4”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendBZGXToERP.cpp(746,56): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendBZGXToERP.cpp(760,60): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendBZGXToERP.cpp(775,60): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendBZGXToERP.cpp(790,60): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendBZGXToERP.cpp(773,3): warning C4996: 'AOM_UIF_ask_value': "AOM_UIF_ask_value" deprecated in Teamcenter "11.1"; Use "AOM_ask_displayable_values" instead. +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendBZGXToERP.cpp(788,3): warning C4996: 'AOM_UIF_ask_value': "AOM_UIF_ask_value" deprecated in Teamcenter "11.1"; Use "AOM_ask_displayable_values" instead. + ZF_SendGYLXToERP.cpp +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include_cpp\base_utils\IFail.hxx(114,17): warning C4251: “IFail::m_message”: class“std::basic_string,std::allocator>”需要有 dll 接口由 class“IFail”的客户端使用 +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(85,30): warning C4190: “getCurrentTime”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(86,37): warning C4190: “getCurrentTimestamp17”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(88,53): warning C4190: “getLogFilePath”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(89,32): warning C4190: “generate_uuid_v4”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendGYLXToERP.cpp(164,9): warning C4996: 'AOM_UIF_ask_value': "AOM_UIF_ask_value" deprecated in Teamcenter "11.1"; Use "AOM_ask_displayable_values" instead. +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendGYLXToERP.cpp(198,9): warning C4996: 'AOM_UIF_ask_values': "AOM_UIF_ask_values" deprecated in Teamcenter "11.1"; Use "AOM_ask_displayable_values" instead. +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendGYLXToERP.cpp(267,11): warning C4996: 'AOM_UIF_ask_value': "AOM_UIF_ask_value" deprecated in Teamcenter "11.1"; Use "AOM_ask_displayable_values" instead. + ZF_SendPart.cpp +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include_cpp\base_utils\IFail.hxx(114,17): warning C4251: “IFail::m_message”: class“std::basic_string,std::allocator>”需要有 dll 接口由 class“IFail”的客户端使用 +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(85,30): warning C4190: “getCurrentTime”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(86,37): warning C4190: “getCurrentTimestamp17”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(88,53): warning C4190: “getLogFilePath”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(89,32): warning C4190: “generate_uuid_v4”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 + ZF_SendPartBOMToERP.cpp +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include_cpp\base_utils\IFail.hxx(114,17): warning C4251: “IFail::m_message”: class“std::basic_string,std::allocator>”需要有 dll 接口由 class“IFail”的客户端使用 +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(85,30): warning C4190: “getCurrentTime”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(86,37): warning C4190: “getCurrentTimestamp17”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(88,53): warning C4190: “getLogFilePath”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(89,32): warning C4190: “generate_uuid_v4”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPartBOMToERP.cpp(166,9): warning C4996: 'AOM_UIF_ask_value': "AOM_UIF_ask_value" deprecated in Teamcenter "11.1"; Use "AOM_ask_displayable_values" instead. +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPartBOMToERP.cpp(199,9): warning C4996: 'AOM_UIF_ask_values': "AOM_UIF_ask_values" deprecated in Teamcenter "11.1"; Use "AOM_ask_displayable_values" instead. +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPartBOMToERP.cpp(201,9): warning C4996: 'AOM_UIF_ask_values': "AOM_UIF_ask_values" deprecated in Teamcenter "11.1"; Use "AOM_ask_displayable_values" instead. + ZF_SendPartToERP.cpp +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(806,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include\pom\pom\pom.h(5417,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include_cpp\base_utils\IFail.hxx(114,17): warning C4251: “IFail::m_message”: class“std::basic_string,std::allocator>”需要有 dll 接口由 class“IFail”的客户端使用 +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(85,30): warning C4190: “getCurrentTime”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(86,37): warning C4190: “getCurrentTimestamp17”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(88,53): warning C4190: “getLogFilePath”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPart.h(89,32): warning C4190: “generate_uuid_v4”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string,std::allocator>” +D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstring(4871): message : 参见“std::basic_string,std::allocator>”的声明 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPartToERP.cpp(348,9): warning C4996: 'AOM_UIF_ask_value': "AOM_UIF_ask_value" deprecated in Teamcenter "11.1"; Use "AOM_ask_displayable_values" instead. +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPartToERP.cpp(381,9): warning C4996: 'AOM_UIF_ask_values': "AOM_UIF_ask_values" deprecated in Teamcenter "11.1"; Use "AOM_ask_displayable_values" instead. +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPartToERP.cpp(456,8): warning C4996: 'AOM_UIF_ask_value': "AOM_UIF_ask_value" deprecated in Teamcenter "11.1"; Use "AOM_ask_displayable_values" instead. +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPartToERP.cpp(457,8): warning C4996: 'AOM_UIF_ask_value': "AOM_UIF_ask_value" deprecated in Teamcenter "11.1"; Use "AOM_ask_displayable_values" instead. +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendPartToERP.cpp(789,13): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details. + 正在创建库 E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\x64\Release\zf_itk_c.lib 和对象 E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\x64\Release\zf_itk_c.exp + 正在生成代码 + Previous IPDB not found, fall back to full compilation. +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\erp_send_bzgx.cpp(170): warning C4715: “erp_send_bzgx”: 不是所有的控件路径都返回值 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\erp_send_gylx.cpp(187): warning C4715: “erp_send_gylx”: 不是所有的控件路径都返回值 +E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\zf_itk_c\ZF_SendBZGXToERP.cpp(986): warning C4715: “updateJson”: 不是所有的控件路径都返回值 + All 2912 functions were compiled because no usable IPDB/IOBJ from previous compilation was found. + 已完成代码的生成 + zf_itk_c.vcxproj -> E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\x64\Release\zf_itk_c.dll diff --git a/zf_itk_c/x64/Release/zf_itk_c.obj b/zf_itk_c/x64/Release/zf_itk_c.obj new file mode 100644 index 0000000..e5c653b Binary files /dev/null and b/zf_itk_c/x64/Release/zf_itk_c.obj differ diff --git a/zf_itk_c/x64/Release/zf_itk_c.tlog/CL.command.1.tlog b/zf_itk_c/x64/Release/zf_itk_c.tlog/CL.command.1.tlog new file mode 100644 index 0000000..3cc496f Binary files /dev/null and b/zf_itk_c/x64/Release/zf_itk_c.tlog/CL.command.1.tlog differ diff --git a/zf_itk_c/x64/Release/zf_itk_c.tlog/CL.read.1.tlog b/zf_itk_c/x64/Release/zf_itk_c.tlog/CL.read.1.tlog new file mode 100644 index 0000000..3bc4e57 Binary files /dev/null and b/zf_itk_c/x64/Release/zf_itk_c.tlog/CL.read.1.tlog differ diff --git a/zf_itk_c/x64/Release/zf_itk_c.tlog/CL.write.1.tlog b/zf_itk_c/x64/Release/zf_itk_c.tlog/CL.write.1.tlog new file mode 100644 index 0000000..84cb65b Binary files /dev/null and b/zf_itk_c/x64/Release/zf_itk_c.tlog/CL.write.1.tlog differ diff --git a/zf_itk_c/x64/Release/zf_itk_c.tlog/link.command.1.tlog b/zf_itk_c/x64/Release/zf_itk_c.tlog/link.command.1.tlog new file mode 100644 index 0000000..1008945 Binary files /dev/null and b/zf_itk_c/x64/Release/zf_itk_c.tlog/link.command.1.tlog differ diff --git a/zf_itk_c/x64/Release/zf_itk_c.tlog/link.read.1.tlog b/zf_itk_c/x64/Release/zf_itk_c.tlog/link.read.1.tlog new file mode 100644 index 0000000..1f96f61 Binary files /dev/null and b/zf_itk_c/x64/Release/zf_itk_c.tlog/link.read.1.tlog differ diff --git a/zf_itk_c/x64/Release/zf_itk_c.tlog/link.write.1.tlog b/zf_itk_c/x64/Release/zf_itk_c.tlog/link.write.1.tlog new file mode 100644 index 0000000..514d212 Binary files /dev/null and b/zf_itk_c/x64/Release/zf_itk_c.tlog/link.write.1.tlog differ diff --git a/zf_itk_c/x64/Release/zf_itk_c.tlog/zf_itk_c.lastbuildstate b/zf_itk_c/x64/Release/zf_itk_c.tlog/zf_itk_c.lastbuildstate new file mode 100644 index 0000000..a15bca2 --- /dev/null +++ b/zf_itk_c/x64/Release/zf_itk_c.tlog/zf_itk_c.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0: +Release|x64|E:\ITK_WorkSpace\ITK\兆丰\zf_itk_c_final\zf_itk_c\| diff --git a/zf_itk_c/x64/Release/zf_itk_c.tlog/zf_itk_c.write.1u.tlog b/zf_itk_c/x64/Release/zf_itk_c.tlog/zf_itk_c.write.1u.tlog new file mode 100644 index 0000000..68b952c Binary files /dev/null and b/zf_itk_c/x64/Release/zf_itk_c.tlog/zf_itk_c.write.1u.tlog differ diff --git a/zf_itk_c/x64/Release/zf_itk_c.vcxproj.FileListAbsolute.txt b/zf_itk_c/x64/Release/zf_itk_c.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..e69de29 diff --git a/zf_itk_c/zf_itk_c.cpp b/zf_itk_c/zf_itk_c.cpp new file mode 100644 index 0000000..31f3556 --- /dev/null +++ b/zf_itk_c/zf_itk_c.cpp @@ -0,0 +1,157 @@ +#include +#include +#include +#include +#include "handlers.h" +#define PREF_HANDLER_PREFIX "Connor_Std_Handler_Prefix" +using namespace std; + +extern DLLAPI int k_register_handlers(int* decision, va_list args) +{ + int ifail = ITK_ok; + + //erp_send_part + ITKCALL(ifail = EPM_register_action_handler("erp_send_part", "", (EPM_action_handler_t)erp_send_part)); + if (ifail == 0) { + printf("עɹerp_send_part\n"); + } + else { + printf("עʧ[%d]erp_send_part\n", ifail); + } + + //erp_send_bom + ITKCALL(ifail = EPM_register_action_handler("erp_send_bom", "", (EPM_action_handler_t)erp_send_bom)); + if (ifail == 0) { + printf("עɹerp_send_bom\n"); + } + else { + printf("עʧ[%d]erp_send_bom\n", ifail); + } + //erp_send_gx + ITKCALL(ifail = EPM_register_action_handler("erp_send_gx", "", (EPM_action_handler_t)erp_send_gx)); + if (ifail == 0) { + printf("עɹerp_send_gx\n"); + } + else { + printf("עʧ[%d]erp_send_gx\n", ifail); + } + //erp_send_bzgx + ITKCALL(ifail = EPM_register_action_handler("erp_send_bzgx", "", (EPM_action_handler_t)erp_send_bzgx)); + if (ifail == 0) { + printf("עɹerp_send_bzgx\n"); + } + else { + printf("עʧ[%d]erp_send_bzgx\n", ifail); + } + //erp_send_gylx + ITKCALL(ifail = EPM_register_action_handler("erp_send_gylx", "", (EPM_action_handler_t)erp_send_gylx)); + if (ifail == 0) { + printf("עɹerp_send_gylx\n"); + } + else { + printf("עʧ[%d]erp_send_gylx\n", ifail); + } + //ZF_SendPartToERP + ITKCALL(ifail = EPM_register_action_handler("ZF_SendPartToERP", "", (EPM_action_handler_t)ZF_SendPartToERP)); + if (ifail == 0) { + printf("עɹZF_SendPartToERP\n"); + } + else { + printf("עʧ[%d]ZF_SendPartToERP\n", ifail); + } + //ZF_SendPartBOMToERP + ITKCALL(ifail = EPM_register_action_handler("ZF_SendPartBOMToERP", "", (EPM_action_handler_t)ZF_SendPartBOMToERP)); + if (ifail == 0) { + printf("עɹZF_SendPartBOMToERP\n"); + } + else { + printf("עʧ[%d]ZF_SendPartBOMToERP\n", ifail); + } + //ZF_SendGYLXToERP + ITKCALL(ifail = EPM_register_action_handler("ZF_SendGYLXToERP", "", (EPM_action_handler_t)ZF_SendGYLXToERP)); + if (ifail == 0) { + printf("עɹZF_SendGYLXToERP\n"); + } + else { + printf("עʧ[%d]ZF_SendGYLXToERP\n", ifail); + } + + //ZF_SendBZGXToERP ׼ͬ + ITKCALL(ifail = EPM_register_action_handler("ZF_SendBZGXToERP", "", (EPM_action_handler_t)ZF_SendBZGXToERP)); + if (ifail == 0) { + printf("עɹZF_SendBZGXToERP\n"); + } + else { + printf("עʧ[%d]ZF_SendBZGXToERP\n", ifail); + } + + return ifail; +} + +////register service method +extern DLLAPI int USERSERVICE_custom_register_methods() +{ + int + status = ITK_ok, + numberOfArguments = 0, + returnValueType = USERARG_STRING_TYPE, + * argumentList = NULL; + USER_function_t functionPtr; + + METHOD_id_t mth_tag; + + + + //涨javaҪݹĸ + numberOfArguments = 3; + //Ҫõĺַַ + functionPtr = connor_set_prop_value; + //javaҪݵIJ + argumentList = (int*)MEM_alloc(numberOfArguments * sizeof(int)); + argumentList[0] = USERARG_STRING_TYPE; + argumentList[1] = USERARG_STRING_TYPE; + argumentList[2] = USERARG_STRING_TYPE; + //巵ֵ + returnValueType = USERARG_VOID_TYPE; + status = USERSERVICE_register_method("connor_set_prop_value", functionPtr, numberOfArguments, + argumentList, returnValueType); + MEM_free(argumentList); + if (status == ITK_ok) + { + printf("\n Registering connor_set_prop_value finished\n"); + } + else + { + printf("\n Registering connor_set_prop_value failed %d\n", status); + } + + + return(status); +} + + + + + + + +#ifdef __cplusplus +extern "C" { +#endif + //˺й淶дdllƼ"_"ͷ + DLLAPI int zf_itk_c_register_callbacks() + { + int ifail = ITK_ok; + ITKCALL(ifail = CUSTOM_register_exit("zf_itk_c", "USER_gs_shell_init_module", (CUSTOM_EXIT_ftn_t)k_register_handlers)); + ITKCALL(ifail = CUSTOM_register_exit("zf_itk_c", "USERSERVICE_register_methods", (CUSTOM_EXIT_ftn_t)USERSERVICE_custom_register_methods)); + if (ifail == ITK_ok) { + printf("General_register_callbacks עɹ\n"); + } + else { + printf("General_register_callbacks עʧܣ%d\n", ifail); + } + return ifail; + } +#ifdef __cplusplus +} +#endif diff --git a/zf_itk_c/zf_itk_c.vcxproj b/zf_itk_c/zf_itk_c.vcxproj new file mode 100644 index 0000000..6e64ae1 --- /dev/null +++ b/zf_itk_c/zf_itk_c.vcxproj @@ -0,0 +1,175 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {68ddf508-8d60-4777-994c-369e7a4b18c1} + zfitkc + 10.0.19041.0 + + + + DynamicLibrary + true + v142 + Unicode + + + DynamicLibrary + false + v142 + true + Unicode + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;ZFITKC_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + + + Windows + true + false + + + + + Level3 + true + true + true + WIN32;NDEBUG;ZFITKC_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + false + + + + + Level3 + true + _DEBUG;ZFITKC_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + + + Windows + true + false + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;IPLIB=none;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + D:\WorkEnvironment\LiYuan\include_cpp;D:\WorkEnvironment\LiYuan\include;D:\WorkEnvironment\LiYuan\curllaoban\include;C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include;C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\include_cpp;C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\oci\include;%(AdditionalIncludeDirectories) + + + Console + true + true + true + D:\WorkEnvironment\LiYuan\lib\*.lib;D:\WorkEnvironment\LiYuan\curllaoban\lib\*.lib;C:\environment\Teamcenter-ENV\ITK_Configuration_File\ZF_ITK\lib\*.lib;%(AdditionalDependencies) + libuser_exits.ar.lib + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zf_itk_c/zf_itk_c.vcxproj.filters b/zf_itk_c/zf_itk_c.vcxproj.filters new file mode 100644 index 0000000..34cdfbb --- /dev/null +++ b/zf_itk_c/zf_itk_c.vcxproj.filters @@ -0,0 +1,78 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + + + 头文件 + + + 头文件 + + + 源文件 + + + 源文件 + + + \ No newline at end of file diff --git a/zf_itk_c/zf_itk_c.vcxproj.user b/zf_itk_c/zf_itk_c.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/zf_itk_c/zf_itk_c.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file