From 8c33d0b44a5407d6bd40df767968ce3c49cb60d5 Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期四, 27 六月 2024 17:41:46 +0800
Subject: [PATCH] update win api
---
jrj/xframe/system/base.hpp | 2
jrj/xframe/wobject/xutil.hpp | 2
jrj/xframe/wobject/xaserver.hpp | 4
jrj/xframe/win32/win.hpp | 6
jrj/ext-jrj/ext-jrj.vcxproj | 20 +++-
jrj/project/business/quote.enquiry.cpp | 82 ++++++++++----------
jrj/xframe/win32/xfile.hpp | 82 ++++++++++---------
jrj/ext-jrj/ext-jrj.vcxproj.filters | 15 +++
8 files changed, 121 insertions(+), 92 deletions(-)
diff --git a/jrj/ext-jrj/ext-jrj.vcxproj b/jrj/ext-jrj/ext-jrj.vcxproj
index 5f52ebe..01fca5c 100644
--- a/jrj/ext-jrj/ext-jrj.vcxproj
+++ b/jrj/ext-jrj/ext-jrj.vcxproj
@@ -268,11 +268,21 @@
<ClCompile Include="..\project\business\SO3.maint.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
</ClCompile>
- <ClCompile Include="..\project\business\SO\delivery.base.maint.so.cpp" />
- <ClCompile Include="..\project\business\SO\maint.Document.SO3.v3.cpp" />
- <ClCompile Include="..\project\business\SO\paymentterm.base.maint.so.cpp" />
- <ClCompile Include="..\project\business\SO\Product.Select.SO.cpp" />
- <ClCompile Include="..\project\business\SO\select.item.so.cpp" />
+ <ClCompile Include="..\project\business\SO\delivery.base.maint.so.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\project\business\SO\maint.Document.SO3.v3.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\project\business\SO\paymentterm.base.maint.so.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\project\business\SO\Product.Select.SO.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\project\business\SO\select.item.so.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="..\project\business\Supplier.maint.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
</ClCompile>
diff --git a/jrj/ext-jrj/ext-jrj.vcxproj.filters b/jrj/ext-jrj/ext-jrj.vcxproj.filters
index 1c0471f..9732631 100644
--- a/jrj/ext-jrj/ext-jrj.vcxproj.filters
+++ b/jrj/ext-jrj/ext-jrj.vcxproj.filters
@@ -344,8 +344,23 @@
<ClCompile Include="..\project\business\SO\paymentterm.base.maint.so.cpp">
<Filter>project\business\SO</Filter>
</ClCompile>
+ <ClCompile Include="..\project\business\SO\paymentterm.base.maint.so.cpp">
+ <Filter>婧愭枃浠�</Filter>
+ </ClCompile>
<ClCompile Include="..\project\business\quote.enquiry.cpp">
<Filter>project\business</Filter>
</ClCompile>
+ <ClCompile Include="..\project\business\SO\delivery.base.maint.so.cpp">
+ <Filter>project\business\SO</Filter>
+ </ClCompile>
+ <ClCompile Include="..\project\business\SO\maint.Document.SO3.v3.cpp">
+ <Filter>project\business\SO</Filter>
+ </ClCompile>
+ <ClCompile Include="..\project\business\SO\Product.Select.SO.cpp">
+ <Filter>project\business\SO</Filter>
+ </ClCompile>
+ <ClCompile Include="..\project\business\SO\select.item.so.cpp">
+ <Filter>project\business\SO</Filter>
+ </ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
diff --git a/jrj/project/business/quote.enquiry.cpp b/jrj/project/business/quote.enquiry.cpp
index 5e5912d..d31a72a 100644
--- a/jrj/project/business/quote.enquiry.cpp
+++ b/jrj/project/business/quote.enquiry.cpp
@@ -3,6 +3,9 @@
#include <xcontrol/xdwgrid.hpp>
#include <xcontrol/ximageview.hpp>
#include <xcontrol/xcell.hpp>
+#include <adt/xarray.hpp>
+#include <win32/xfile.hpp>
+#include <wobject/xdouble.hpp>
#include "vbusiness/vframe/listwin.vframe.vbusiness.hpp"
@@ -1053,7 +1056,7 @@
itemStr += L"<ItemName>" + dw_cell.GetItemString(row, colItemName) + L"</ItemName>";
itemStr += L"<ItemCName>" + dw_cell.GetItemString(row, colItemCName) + L"</ItemCName>";
itemStr += L"<ItemSpec>" + dw_cell.GetItemString(row, colItemSpec) + L"</ItemSpec>";
- itemStr += L"<RowNo>" + (row - startRow + 1).toString() + L"</RowNo>";
+ itemStr += L"<RowNo>" + xstring(row - startRow + 1) + L"</RowNo>";
itemStr += L"<Purchor>" + dw_cell.GetItemString(row, colBuyer) + L"</Purchor>";
itemStr += L"<Package>" + dw_cell.GetItemString(row, colPackage) + L"</Package>";
itemStr += L"<NWT>" + dw_cell.GetItemString(row, colNW) + L"</NWT>";
@@ -1327,18 +1330,17 @@
arg4.setNativePointer(xaserverarg::CreateInstance());
trace(items);
arg4.AddArg(L"value", items);
- OpenWindow(L"dev:xpage[QuoteFilePurched.vx]", cast(arg4 as int));
+ OpenWindow(L"dev:xpage[QuoteFilePurched.vx]", arg4);
if (arg4.GetArgString(L"process") != L"ok") return 1;
items = arg4.GetArgString(L"value");
xml x0 ;
- x0.setNativePointer(xml::CreateInstance());
x0.loadXML(items);
KXMLDOMNodeList ts = x0.selectNodes(L"data/Item[IsSend='1']");
int len = ts.length();
- if (len < 1) return L"";
+ if (len < 1) return 0;
xstring content = L"";
xstring sdate = publiccode::GetCurrentDate();
@@ -1471,7 +1473,7 @@
{
trace(L"\r\ntaskid:" + taskid + L" finished:" + finished);
ProcessSendMessage(myurl, L"", content, datacontent, true);
- win32::PostMessage(GetFrameWindow().GetHWND(), 0x401, L"xmRefreshTask", 0);
+ PostMessage(GetFrameWindow().GetHWND(), 0x401, (WPARAM)L"xmRefreshTask", 0);
}
return 1;
@@ -1534,7 +1536,7 @@
arg4.setNativePointer(xaserverarg::CreateInstance());
trace(items);
arg4.AddArg(L"value", items);
- OpenWindow(L"dev:xpage[QuoteFilePurch.vx]", cast(arg4 as int));
+ OpenWindow(L"dev:xpage[QuoteFilePurch.vx]", arg4);
if (arg4.GetArgString(L"process") != L"ok") return 1;
items = arg4.GetArgString(L"value");
@@ -1630,14 +1632,12 @@
xstring items = GetPurchItems();
xaserverarg arg4 ;
- arg4.setNativePointer(xaserverarg::CreateInstance());
arg4.AddArg(L"value", items);
- OpenWindow(L"dev:xpage[QuoteFilePurch.vx]", cast(arg4 as int));
+ OpenWindow(L"dev:xpage[QuoteFilePurch.vx]", arg4);
if (arg4.GetArgString(L"process") != L"ok") return 1;
items = arg4.GetArgString(L"value");
xml x0 ;
- x0.setNativePointer(xml::CreateInstance());
x0.loadXML(items);
KXMLDOMNodeList ts1 = x0.selectNodes(L"data/Item");
int len1 = ts1.length();
@@ -1780,6 +1780,7 @@
}
}
+ int purchercol1 = 0;
//update purch
if (1 == 0)
{
@@ -1810,8 +1811,9 @@
headrow1 = row2;
startrow1 = headrow1 + 1;
- int purchercol1 = getItemCol(cell1, headrow1, L"閲囪喘浜哄憳");
+ purchercol1 = getItemCol(cell1, headrow1, L"閲囪喘浜哄憳");
}
+
//Clear
if (1 == 1)
@@ -1833,7 +1835,7 @@
supplier = dw_cell.GetItemString(lastrow, purchercol);
if (supplier != username)
{
- KXMLDOMNode n1 = x0.selectSingleNode(L"data/Item[IsSend='1' and Purchor='" + supplier + L"' and RowNo='" + (lastrow - row + 1).toString() + L"']");
+ KXMLDOMNode n1 = x0.selectSingleNode(L"data/Item[IsSend='1' and Purchor='" + supplier + L"' and RowNo='" + xstring(lastrow - row + 1) + L"']");
if (n1)
{
xstring rowid = getRowID(dw_cell, lastrow);
@@ -2028,7 +2030,7 @@
arg4.setNativePointer(xaserverarg::CreateInstance());
trace(items);
arg4.AddArg(L"value", items);
- OpenWindow(L"dev:xpage[QuoteFilePurch.vx]", cast(arg4 as int));
+ OpenWindow(L"dev:xpage[QuoteFilePurch.vx]", arg4);
if (arg4.GetArgString(L"process") != L"ok") return 1;
items = arg4.GetArgString(L"value");
@@ -2055,7 +2057,6 @@
}
xml x0 ;
- x0.setNativePointer(xml::CreateInstance());
x0.loadXML(items);
while (supplier != L"")
@@ -2200,7 +2201,7 @@
xml x = ViewObject::RetrieveData(L"/sale/data/TO/template/param", L"TemplateID", id);
xml sheet ;
- sheet.loadXML(x.selectSingleNode(L"data/*").xml);
+ sheet.loadXML(x.selectSingleNode(L"data/*").xml());
dw_cell.LoadTemplate(sheet);
dw_cell.Redraw();
@@ -2319,7 +2320,7 @@
return L"";
}
- xstring appPath = GetModuleTmpPath();
+ xstring appPath = xutil::GetModuleTmpPath();
xaserver::CreateDirectory(appPath);
ret = xaserver::DownLoadFile(GetServerUrl(), L"/business/products/chanpin/" + str + L"/" + name, name, appPath + L"/" + name);
if (ret < 0)
@@ -2559,7 +2560,7 @@
dw_cell.SetCellProps(row, colPhoto, props);
dw_cell.SetCellProps(row, colPhoto1, props);
- xstring appPath = GetModuleTmpPath();
+ xstring appPath = xutil::GetModuleTmpPath();
xstring guid = ViewObject::GetGuid();
xstring filename1 = UploadImage(guid);
if (filename1 != L"")
@@ -2586,7 +2587,7 @@
return 1;
}
- int GetOpenFileNames(StringArray items, xstring initFileName, xstring filter, xstring ext)
+ int GetOpenFileNames(xarray<xstring>& items, xstring initFileName, xstring filter, xstring ext)
{
//xstring path = GetOpenFileName(L"",
// "JPEG 鏂囦欢(*.jpg)\0*.jpg;*.jpeg;*.png;*.gif;*.bmp\0鍏ㄩ儴鏂囦欢(*.*)\0*.*\0",
@@ -2636,7 +2637,7 @@
ofn.nFileExtension = 0;
//debugbreak();
- if (file::GetOpenFileName(ofn))
+ if (xfile::GetOpenFileName(ofn))
{
int pos = ofn.nFileOffset & 0xffff;
xstring path = szPath;
@@ -2646,22 +2647,18 @@
}
else
{
- int start = cast(szPath as int);
+ wchar_t* start = szPath;
start += pos * 2;
- xstring str = cast(start as xstring);
+ xstring str = start;
while (true)
{
if (str == L"")break;
items.push_back(path + L"/" + str);
start += (str.length() + 1) * 2;
- str = cast(start as xstring);
+ str = start;
}
}
}
- delete szFileName;
- delete szPath;
- delete ofn;
-
return items.length();
}
@@ -2678,12 +2675,11 @@
int LastRow = dw_cell.GetValidRow();
if (row < startRow) return 0;
- xstring appPath = GetModuleTmpPath();
- StringArray items;
- items = StringArray::make();
+ xstring appPath = xutil::GetModuleTmpPath();
+ xarray<xstring> items;
GetOpenFileNames(items, L"",
- "JPEG 鏂囦欢(*.jpg)\0*.jpg;*.jpeg;*.png;*.gif;*.bmp\0鍏ㄩ儴鏂囦欢(*.*)\0*.*\0",
- "jpg");
+ L"JPEG 鏂囦欢(*.jpg)\0*.jpg;*.jpeg;*.png;*.gif;*.bmp\0鍏ㄩ儴鏂囦欢(*.*)\0*.*\0",
+ L"jpg");
if (items.length() < 1) return 1;
int sRow = row;
@@ -2756,12 +2752,11 @@
dw_cell.SetCellProps(row, colPhoto, props);
dw_cell.SetCellProps(row, colPhoto1, props);
- xstring appPath = GetModuleTmpPath();
- StringArray items;
- items = StringArray::make();
+ xstring appPath = xutil::GetModuleTmpPath();
+ xarray<xstring> items;
GetOpenFileNames(items, L"",
L"JPEG 鏂囦欢(*.jpg)\0*.jpg;*.jpeg;*.png;*.gif;*.bmp\0鍏ㄩ儴鏂囦欢(*.*)\0*.*\0",
- "jpg");
+ L"jpg");
if (items.length() < 1) return 1;
for (int i = 0; i < items.length(); i++)
@@ -2857,7 +2852,7 @@
double colFOBPriceEx = fobprice.toDouble();
double colFOBPriceS;
- colFOBPriceS = colFOBPriceEx.round(2);
+ colFOBPriceS = xdouble(colFOBPriceEx).round(2);
xstring colFOBPriceS1 = xstring(colFOBPriceS);
xstring colFOBPriceS2 = colFOBPriceS1.left(colFOBPriceS1.find(L"."));
xstring colFOBPriceS3 = colFOBPriceS1.mid(colFOBPriceS1.find(L"."), colFOBPriceS1.length());
@@ -2875,7 +2870,7 @@
xaserverarg argx ;
argx.setNativePointer(argx.CreateInstance());
argx.AddArg(L"GoodsNo", dw_cell.GetItemString(row, colItemNo));
- OpenWindow(L"dev:xpage[CustomerItemNoList.vx]", cast(argx as int));
+ OpenWindow(L"dev:xpage[CustomerItemNoList.vx]", argx);
if (argx.GetArgString(L"action") != L"ok") return 1;
xml x1 ;
@@ -2919,7 +2914,10 @@
dw_cell.SetItemString(row, colQtyPerPack, str2 + L"/" + str1);
}
else
+ {
+ xstring str1 = goods.selectSingleNode(L"//PackingRate[1]").text();
dw_cell.SetItemString(row, colQtyPerPack, str1);
+ }
}
ProcessItemImage(dw_cell.GetItemString(row, colSKUNo), row);
//ProcessItemImage1(dw_cell.GetItemString(row,colItemNo),row);
@@ -2973,7 +2971,7 @@
//if(qty2 !=L"") qty = qty*qty2.toDouble();
qty = qty2.toDouble();
double ttl = 65.0 * qty / v;
- dw_cell.SetItemString(row, col40HQ, ttl.toInt().toString());
+ dw_cell.SetItemString(row, col40HQ, xstring((int)ttl));
}
}
@@ -3464,7 +3462,7 @@
}
else if (comdid == L"xmRefreshTask1")
{
- win32::PostMessage(GetFrameWindow().GetHWND(), 0x401, L"xmRefreshTask", 0);
+ PostMessage(GetFrameWindow().GetHWND(), 0x401, L"xmRefreshTask", 0);
return 1;
}
else if (comdid == L"xmFileOpen" || comdid == L"xmOpen" || comdid == L"xmNew")
@@ -3513,7 +3511,7 @@
dw_cell.Redraw();
filename = args.GetArgString(L"filename");
fileid = args.GetArgString(L"ID");
- win32::SetWindowText(GetHWND(), L"鎶ヤ环鏂囦欢:" + filename);
+ SetWindowText(GetHWND(), L"鎶ヤ环鏂囦欢:" + filename);
}
return 1;
}
@@ -3523,7 +3521,7 @@
dw_cell.Redraw();
filename = L"";
fileid = L"";
- win32::SetWindowText(GetHWND(), L"鎶ヤ环鏂囦欢:[new]");
+ SetWindowText(GetHWND(), L"鎶ヤ环鏂囦欢:[new]");
return 1;
}
else if (comdid == L"xmFileSave" || comdid == L"xmSave")
@@ -4540,7 +4538,7 @@
xstring sh = doc.GetXml();
int p = cast(sh as int);
- win32::SendMessage(m_winHwnd, 0x401, p, 0);
+ SendMessage(m_winHwnd, 0x401, p, 0);
*/
return 1;
}
@@ -4797,7 +4795,7 @@
dw_cell.openUrl(templateurl);
*/
- //win32::SetWindowText(GetHWND(),L"鎶ヤ环鏂囦欢:[new]");
+ //SetWindowText(GetHWND(),L"鎶ヤ环鏂囦欢:[new]");
}
ARow = 0;
diff --git a/jrj/xframe/system/base.hpp b/jrj/xframe/system/base.hpp
index 8afd671..37bf966 100644
--- a/jrj/xframe/system/base.hpp
+++ b/jrj/xframe/system/base.hpp
@@ -41,7 +41,7 @@
typedef const wchar_t* LPCTSTR;
typedef wchar_t* LPWSTR;
-typedef wchar_t* LPCWSTR;
+typedef const wchar_t* LPCWSTR;
typedef wchar_t TCHAR;
typedef wchar_t* LPTSTR;
typedef int BOOL;
diff --git a/jrj/xframe/win32/win.hpp b/jrj/xframe/win32/win.hpp
index 1fca858..0b12726 100644
--- a/jrj/xframe/win32/win.hpp
+++ b/jrj/xframe/win32/win.hpp
@@ -60,8 +60,8 @@
bool WINAPI AnimateWindow(HWND hWnd,int dwTime,int dwFlags) ;//native from "user32.dll" alias "AnimateWindow";
int WINAPI GetKeyState(int nVirtKey) ;//native from "user32.dll" alias "GetKeyState";
- int WINAPI SetWindowLong(HWND hWnd, int nIndex, int dwNewLong) ;//native from "user32.dll" alias "SetWindowLongW";
- LPARAM WINAPI GetWindowLong(HWND hWnd, int nIndex) ;//native from "user32.dll" alias "GetWindowLongW";
+ int WINAPI SetWindowLongW(HWND hWnd, int nIndex, int dwNewLong) ;//native from "user32.dll" alias "SetWindowLongW";
+ LPARAM WINAPI GetWindowLongW(HWND hWnd, int nIndex) ;//native from "user32.dll" alias "GetWindowLongW";
int WINAPI GetClientRect(HWND hWnd, xrect & lpRect) ;//native from "user32.dll" alias "GetClientRect";
int WINAPI GetWindowRect(HWND hWnd, xrect & lpRect) ;//native from "user32.dll" alias "GetWindowRect";
int WINAPI MoveWindow(HWND hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint) ;//native from "user32.dll" alias "MoveWindow";
@@ -107,7 +107,7 @@
int WINAPI GetModuleHandleW(string lpModuleName) ;//native from "kernel32.dll" alias "GetModuleHandleW";
int WINAPI GetModuleFileNameW(int hModule ,string lpFileName, int nSize);//native from "kernel32.dll" alias "GetModuleFileNameW";
void WINAPI GetLocalTime(SYSTEMTIME& lpSystemTime) ;//native from "kernel32.dll" alias "GetLocalTime";
- int WINAPI PathRemoveFileSpecW(xstring lpFileName);// native from "shlwapi.dll" alias "PathRemoveFileSpecW";
+ int WINAPI PathRemoveFileSpecW(string lpFileName);// native from "shlwapi.dll" alias "PathRemoveFileSpecW";
}
#define SendMessage SendMessageW
diff --git a/jrj/xframe/win32/xfile.hpp b/jrj/xframe/win32/xfile.hpp
index aa59820..502e07f 100644
--- a/jrj/xframe/win32/xfile.hpp
+++ b/jrj/xframe/win32/xfile.hpp
@@ -108,79 +108,83 @@
extern "C"
{
- bool WINAPI GetSaveFileNameW(OPENFILENAMEW &);//native from "comdlg32.dll" alias "GetSaveFileNameW";
- bool WINAPI GetOpenFileNameW(OPENFILENAMEW&);//native from "comdlg32.dll" alias "GetOpenFileNameW";
+ namespace win32
+ {
+ bool WINAPI GetSaveFileNameW(OPENFILENAMEW&);//native from "comdlg32.dll" alias "GetSaveFileNameW";
+ bool WINAPI GetOpenFileNameW(OPENFILENAMEW&);//native from "comdlg32.dll" alias "GetOpenFileNameW";
- HANDLE WINAPI FindFirstFileW(const WCHAR * lpFileName, WIN32_FIND_DATAW& lpFindFileData); //native from "kernel32.dll" alias "FindFirstFileW"; //根据文件名查找文件,一旦不再需要,应该用FindClose函数关闭这个句柄
- HANDLE WINAPI FindNextFileW(HANDLE hFindFile, WIN32_FIND_DATAW& lpFindFileData); //native from "kernel32.dll" alias "FindNextFileW"; //继续查找FindFirstFile函数搜索后的文件 ,HANDLE hFindFile搜索的文件句柄 函数执行的时候搜索的是此句柄的下一文件。非零表示成功,零表示失败。如不再有与指定条件相符的文件,会将GetLastError设置成ERROR_NO_MORE_FILES
- bool WINAPI FindClose(HANDLE hFindFile); //native from "kernel32.dll" alias "FindClose"; //关闭由FindFirstFile函数创建的一个搜索句柄。返回非零表示成功,零表示失败。会设置GetLastError
+ HANDLE WINAPI FindFirstFileW(const WCHAR* lpFileName, WIN32_FIND_DATAW& lpFindFileData); //native from "kernel32.dll" alias "FindFirstFileW"; //根据文件名查找文件,一旦不再需要,应该用FindClose函数关闭这个句柄
+ HANDLE WINAPI FindNextFileW(HANDLE hFindFile, WIN32_FIND_DATAW& lpFindFileData); //native from "kernel32.dll" alias "FindNextFileW"; //继续查找FindFirstFile函数搜索后的文件 ,HANDLE hFindFile搜索的文件句柄 函数执行的时候搜索的是此句柄的下一文件。非零表示成功,零表示失败。如不再有与指定条件相符的文件,会将GetLastError设置成ERROR_NO_MORE_FILES
+ bool WINAPI FindClose(HANDLE hFindFile); //native from "kernel32.dll" alias "FindClose"; //关闭由FindFirstFile函数创建的一个搜索句柄。返回非零表示成功,零表示失败。会设置GetLastError
- int WINAPI CreateFileW(LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile); //native from "kernel32.dll" alias "CreateFileW";
- int WINAPI OpenFile(LPCSTR lpFileName, OFSTRUCT lpReOpenBuff, UINT wStyle); //native from "kernel32.dll" alias "OpenFile";
- int WINAPI SetFilePointer(HANDLE hFile, LONG lDistanceToMove, LONG* lpDistanceToMoveHigh, DWORD dwMoveMethod); //native from "kernel32.dll" alias "SetFilePointer";
- int WINAPI ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped); //native from "kernel32.dll" alias "ReadFile";
- int WINAPI WriteFile(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped); //native from "kernel32.dll" alias "ReadFile";
- int WINAPI CloseHandle(HANDLE hFile); //native from "kernel32.dll" alias "CloseHandle";
- int WINAPI GetFileSize(HANDLE hFile, int lpFileSizeHigh); //native from "kernel32.dll" alias "GetFileSize";
- int WINAPI GetKeyState(HANDLE nVirtKey); //native from "user32.dll" alias "GetKeyState";
+ int WINAPI CreateFileW(LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile); //native from "kernel32.dll" alias "CreateFileW";
+ int WINAPI OpenFile(LPCSTR lpFileName, OFSTRUCT lpReOpenBuff, UINT wStyle); //native from "kernel32.dll" alias "OpenFile";
+ int WINAPI SetFilePointer(HANDLE hFile, LONG lDistanceToMove, LONG* lpDistanceToMoveHigh, DWORD dwMoveMethod); //native from "kernel32.dll" alias "SetFilePointer";
+ int WINAPI ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped); //native from "kernel32.dll" alias "ReadFile";
+ int WINAPI WriteFile(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped); //native from "kernel32.dll" alias "ReadFile";
+ int WINAPI CloseHandle(HANDLE hFile); //native from "kernel32.dll" alias "CloseHandle";
+ int WINAPI GetFileSize(HANDLE hFile, int lpFileSizeHigh); //native from "kernel32.dll" alias "GetFileSize";
+ int WINAPI GetKeyState(HANDLE nVirtKey); //native from "user32.dll" alias "GetKeyState";
+ }
}
class xfile
{
- bool WINAPI GetSaveFileName(OPENFILENAMEW& OpenFileName)
+public:
+ static bool WINAPI GetSaveFileName(OPENFILENAMEW& OpenFileName)
{
- return GetSaveFileNameW(OpenFileName);
+ return win32::GetSaveFileNameW(OpenFileName);
}
- bool WINAPI GetOpenFileName(OPENFILENAMEW& SaveFileName)
+ static bool WINAPI GetOpenFileName(OPENFILENAMEW& SaveFileName)
{
- return GetOpenFileName(SaveFileName);
+ return win32::GetOpenFileNameW(SaveFileName);
}
- HANDLE WINAPI FindFirstFile(const WCHAR* lpFileName, WIN32_FIND_DATAW& lpFindFileData)
+ static HANDLE WINAPI FindFirstFile(const WCHAR* lpFileName, WIN32_FIND_DATAW& lpFindFileData)
{
- return FindFirstFileW(lpFileName, lpFindFileData);
+ return win32::FindFirstFileW(lpFileName, lpFindFileData);
}
- HANDLE WINAPI FindNextFile(HANDLE hFindFile, WIN32_FIND_DATAW& lpFindFileData)
+ static HANDLE WINAPI FindNextFile(HANDLE hFindFile, WIN32_FIND_DATAW& lpFindFileData)
{
- return FindNextFileW(hFindFile, lpFindFileData);
+ return win32::FindNextFileW(hFindFile, lpFindFileData);
}
- bool WINAPI FindClose(HANDLE hFindFile)
+ static bool WINAPI FindClose(HANDLE hFindFile)
{
- return FindClose(hFindFile);
+ return win32::FindClose(hFindFile);
}
- int WINAPI CreateFile(LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
+ static int WINAPI CreateFile(LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
{
- return CreateFileW(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
+ return win32::CreateFileW(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
}
- int WINAPI OpenFile(LPCSTR lpFileName, OFSTRUCT lpReOpenBuff, UINT wStyle)
+ static int WINAPI OpenFile(LPCSTR lpFileName, OFSTRUCT lpReOpenBuff, UINT wStyle)
{
- return OpenFile(lpFileName, lpReOpenBuff, wStyle);
+ return win32::OpenFile(lpFileName, lpReOpenBuff, wStyle);
}
- int WINAPI SetFilePointer(HANDLE hFile, LONG lDistanceToMove, LONG* lpDistanceToMoveHigh, DWORD dwMoveMethod)
+ static int WINAPI SetFilePointer(HANDLE hFile, LONG lDistanceToMove, LONG* lpDistanceToMoveHigh, DWORD dwMoveMethod)
{
- return SetFilePointer(hFile, lDistanceToMove, lpDistanceToMoveHigh, dwMoveMethod);
+ return win32::SetFilePointer(hFile, lDistanceToMove, lpDistanceToMoveHigh, dwMoveMethod);
}
- int WINAPI ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped)
+ static int WINAPI ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped)
{
- return ReadFile(hFile, lpBuffer, nNumberOfBytesToRead, lpNumberOfBytesRead, lpOverlapped);
+ return win32::ReadFile(hFile, lpBuffer, nNumberOfBytesToRead, lpNumberOfBytesRead, lpOverlapped);
}
- int WINAPI WriteFile(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped)
+ static int WINAPI WriteFile(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped)
{
- return WriteFile(hFile, lpBuffer, nNumberOfBytesToRead, lpNumberOfBytesRead, lpOverlapped);
+ return win32::WriteFile(hFile, lpBuffer, nNumberOfBytesToRead, lpNumberOfBytesRead, lpOverlapped);
}
- int WINAPI CloseHandle(HANDLE hFile)
+ static int WINAPI CloseHandle(HANDLE hFile)
{
- return CloseHandle(hFile);
+ return win32::CloseHandle(hFile);
}
- int WINAPI GetFileSize(HANDLE hFile, int lpFileSizeHigh)
+ static int WINAPI GetFileSize(HANDLE hFile, int lpFileSizeHigh)
{
- return GetFileSize(hFile, lpFileSizeHigh);
+ return win32::GetFileSize(hFile, lpFileSizeHigh);
}
- int WINAPI GetKeyState(HANDLE nVirtKey)
+ static int WINAPI GetKeyState(HANDLE nVirtKey)
{
- return GetKeyState(nVirtKey);
+ return win32::GetKeyState(nVirtKey);
}
};
diff --git a/jrj/xframe/wobject/xaserver.hpp b/jrj/xframe/wobject/xaserver.hpp
index 0378f58..154845d 100644
--- a/jrj/xframe/wobject/xaserver.hpp
+++ b/jrj/xframe/wobject/xaserver.hpp
@@ -196,9 +196,9 @@
{
return kxaserver::__CreateDirectory((LPTSTR)pName);
}
- static int DownLoadFile(LPCTSTR pStrServer,LPCTSTR pUrl,LPCTSTR pExt,LPTSTR pName=NULL)
+ static int DownLoadFile(LPCTSTR pStrServer,LPCTSTR pUrl,LPCTSTR pExt,LPCTSTR pName=NULL)
{
- return kxaserver::DownLoadFile(pStrServer,pUrl,pExt,pName);
+ return kxaserver::DownLoadFile(pStrServer,pUrl,pExt,(LPTSTR)pName);
}
static int UploadData(LPCTSTR pUri,LPCTSTR pName,LPCTSTR pData)
diff --git a/jrj/xframe/wobject/xutil.hpp b/jrj/xframe/wobject/xutil.hpp
index 8ce0f0e..b7a6e4d 100644
--- a/jrj/xframe/wobject/xutil.hpp
+++ b/jrj/xframe/wobject/xutil.hpp
@@ -2,6 +2,8 @@
#include "xbase.hpp"
#include "kobject/kutil.hpp"
+#include "wobject/xaserver.hpp"
+#include "win32/win.hpp"
using kutil = Hxsoft::XFrame::IXFUtil;
class xutil
--
Gitblit v1.9.3