| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | #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" |
| | |
| | | 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>"; |
| | |
| | | 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(); |
| | |
| | | { |
| | | 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; |
| | |
| | | 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"); |
| | | |
| | |
| | | |
| | | 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(); |
| | |
| | | } |
| | | } |
| | | |
| | | int purchercol1 = 0; |
| | | //update purch |
| | | if (1 == 0) |
| | | { |
| | |
| | | |
| | | headrow1 = row2; |
| | | startrow1 = headrow1 + 1; |
| | | int purchercol1 = getItemCol(cell1, headrow1, L"采购人员"); |
| | | purchercol1 = getItemCol(cell1, headrow1, L"采购人员"); |
| | | } |
| | | |
| | | |
| | | //Clear |
| | | if (1 == 1) |
| | |
| | | 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); |
| | |
| | | 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"); |
| | | |
| | |
| | | } |
| | | |
| | | xml x0 ; |
| | | x0.setNativePointer(xml::CreateInstance()); |
| | | x0.loadXML(items); |
| | | |
| | | while (supplier != L"") |
| | |
| | | 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(); |
| | |
| | | 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) |
| | |
| | | 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"") |
| | |
| | | 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", |
| | |
| | | ofn.nFileExtension = 0; |
| | | |
| | | //debugbreak(); |
| | | if (file::GetOpenFileName(ofn)) |
| | | if (xfile::GetOpenFileName(ofn)) |
| | | { |
| | | int pos = ofn.nFileOffset & 0xffff; |
| | | xstring path = szPath; |
| | |
| | | } |
| | | 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(); |
| | | } |
| | | |
| | |
| | | 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; |
| | |
| | | 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++) |
| | |
| | | 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()); |
| | |
| | | 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 ; |
| | |
| | | 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); |
| | |
| | | //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)); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | 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") |
| | |
| | | dw_cell.Redraw(); |
| | | filename = args.GetArgString(L"filename"); |
| | | fileid = args.GetArgString(L"ID"); |
| | | win32::SetWindowText(GetHWND(), L"报价文件:" + filename); |
| | | SetWindowText(GetHWND(), L"报价文件:" + filename); |
| | | } |
| | | return 1; |
| | | } |
| | |
| | | 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") |
| | |
| | | |
| | | 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; |
| | | } |
| | |
| | | |
| | | dw_cell.openUrl(templateurl); |
| | | */ |
| | | //win32::SetWindowText(GetHWND(),L"报价文件:[new]"); |
| | | //SetWindowText(GetHWND(),L"报价文件:[new]"); |
| | | } |
| | | |
| | | ARow = 0; |
| | |
| | | |
| | | 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; |
| | |
| | | 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"; |
| | |
| | | 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 |
| | |
| | | |
| | | 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); |
| | | } |
| | | }; |
| | |
| | | { |
| | | 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) |
| | |
| | | |
| | | #include "xbase.hpp" |
| | | #include "kobject/kutil.hpp" |
| | | #include "wobject/xaserver.hpp" |
| | | #include "win32/win.hpp" |
| | | |
| | | using kutil = Hxsoft::XFrame::IXFUtil; |
| | | class xutil |