dmcwincppWord格式.docx

上传人:b****5 文档编号:19861870 上传时间:2023-01-11 格式:DOCX 页数:25 大小:17.22KB
下载 相关 举报
dmcwincppWord格式.docx_第1页
第1页 / 共25页
dmcwincppWord格式.docx_第2页
第2页 / 共25页
dmcwincppWord格式.docx_第3页
第3页 / 共25页
dmcwincppWord格式.docx_第4页
第4页 / 共25页
dmcwincppWord格式.docx_第5页
第5页 / 共25页
点击查看更多>>
下载资源
资源描述

dmcwincppWord格式.docx

《dmcwincppWord格式.docx》由会员分享,可在线阅读,更多相关《dmcwincppWord格式.docx(25页珍藏版)》请在冰豆网上搜索。

dmcwincppWord格式.docx

m_bConnected=FALSE;

m_hDmc=-1;

m_lLastError=0;

#ifdefDMCMULTIPLETHREADS

InitializeCriticalSection(&

m_CritSec);

#endif

}

CDMCWin(USHORTusController,HWNDhWnd,LONGlThreadID)

m_usController=usController;

m_hWnd=hWnd;

m_lThreadID=lThreadID;

if(m_usController>

0&

&

m_usController<

17)

{

EnterCriticalSection(&

if(m_lThreadID)

m_lLastError=DMCOpen2(m_usController,m_lThreadID,&

m_hDmc);

else

m_lLastError=DMCOpen(m_usController,m_hWnd,&

LeaveCriticalSection(&

if(m_lLastError==0)

m_bConnected=TRUE;

else

m_hDmc=-1;

}

~CDMCWin()

if(m_hDmc!

=-1)

Close();

DeleteCriticalSection(&

LONGCDMCWin:

Open()

if(m_bConnected)

returnm_lLastError;

#endif

else

m_lLastError=DMCERROR_CONTROLLER;

returnm_lLastError;

Open(USHORTusController,HWNDhWnd,LONGlThreadID)

returnOpen();

HANDLEDMCCDMCWin:

GetHandle()

returnm_hDmc;

{

m_lLastError=DMCGetHandle(m_usController,&

returnm_hDmc;

}

return-1;

voidCDMCWin:

SethWnd(HWNDhWnd)

m_lLastError=DMCChangeInterruptNotification(m_hDmc,(long)hWnd);

};

SetThreadID(LONGlThreadID)

m_lLastError=DMCChangeInterruptNotification(m_hDmc,(long)lThreadID);

Close()

=-1)

m_lLastError=DMCClose(m_hDmc);

Command(constPSZpszCommand,PCHARpchResponse,ULONGcbResponse)

m_lLastError=DMCCommand(m_hDmc,(PSZ)pszCommand,pchResponse,cbResponse);

m_lLastError=DMCERROR_HANDLE;

FastCommand(constPSZpszCommand)

m_lLastError=DMCFastCommand(m_hDmc,(PSZ)pszCommand);

BinaryCommand(PBYTEpbCommand,ULONGulCommandLength,PCHARpchResponse,ULONGcbResponse)

m_lLastError=DMCBinaryCommand(m_hDmc,pbCommand,ulCommandLength,pchResponse,cbResponse);

GetUnsolicitedResponse(PCHARpchResponse,ULONGcbResponse)

m_lLastError=DMCGetUnsolicitedResponse(m_hDmc,pchResponse,cbResponse);

GetAdditionalResponseLen()

LONGlLength;

m_lLastError=DMCGetAdditionalResponseLen(m_hDmc,(PULONG)&

lLength);

if(m_lLastError!

=0)

lLength=0;

returnlLength;

GetAdditionalResponse(PCHARpchResponse,ULONGcbResponse)

m_lLastError=DMCGetAdditionalResponse(m_hDmc,pchResponse,cbResponse);

GetErrorText(LONGlError,PCHARpchMessage,ULONGcbMessage)

EnterCriticalSection(&

m_lLastError=DMCError(m_hDmc,lError,pchMessage,cbMessage);

LeaveCriticalSection(&

Clear()

m_lLastError=DMCClear(m_hDmc);

Reset()

m_lLastError=DMCReset(m_hDmc);

MasterReset()

m_lLastError=DMCMasterReset(m_hDmc);

GetVersion(PCHARpchVersion,ULONGcbVersion)

m_lLastError=DMCVersion(m_hDmc,pchVersion,cbVersion);

DownloadFile(constPSZpszFileName,constPSZpszLabel)

m_lLastError=DMCDownloadFile(m_hDmc,(PSZ)pszFileName,(PSZ)pszLabel);

DownloadFromBuffer(constPSZpszBuffer,constPSZpszLabel)

m_lLastError=DMCDownloadFromBuffer(m_hDmc,(PSZ)pszBuffer,(PSZ)pszLabel);

UploadFile(constPSZpszFileName)

m_lLastError=DMCUploadFile(m_hDmc,(PSZ)pszFileName);

UploadToBuffer(PCHARpchBuffer,ULONGcbBuffer)

m_lLastError=DMCUploadToBuffer(m_hDmc,pchBuffer,cbBuffer);

SendFile(constPSZpszFileName)

m_lLastError=DMCSendFile(m_hDmc,(PSZ)pszFileName);

SendBinaryFile(constPSZpszFileName)

m_lLastError=DMCSendBinaryFile(m_hDmc,(PSZ)pszFileName);

AsciiCommandToBinaryCommand(PSZpszAsciiCommand,ULONGulAsciiCommandLength,PBYTEpbBinaryResult,ULONGcbBinaryResult,ULONGFAR*pulBinaryResultLength)

m_lLastError=DMCCommand_AsciiToBinary(m_hDmc,pszAsciiCommand,ulAsciiCommandLength,pbBinaryResult,cbBinaryResult,pulBinaryResultLength);

BinaryCommandToAsciiCommand(PBYTEpbBinaryCommand,ULONGulBinaryCommandLength,PSZpszAsciiResult,ULONGcbAsciiResult,ULONGFAR*pulAsciiResultLength)

m_lLastError=DMCCommand_BinaryToAscii(m_hDmc,pbBinaryCommand,ulBinaryCommandLength,pszAsciiResult,cbAsciiResult,pulAsciiResultLength);

AsciiFileToBinaryFile(constPSZpszInputFileName,constPSZpszOutputFileName)

m_lLastError=DMCFil

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 法律文书 > 调解书

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1