logplus/BaseFun/src/io.cpp
2025-10-29 17:23:30 +08:00

89 lines
1.6 KiB
C++

#include "io.h"
#include "MemRdWt.h"
#include "DepthProgress.h"
extern "C"
{
__declspec( dllexport ) CMemRdWt MemRdWt;
__declspec( dllexport ) DepthProgress MyDepthProgress;
__declspec( dllexport ) DiDepthProgress MyDiDepthProgress;
}
void CREATEPRG(float *sdep,float *edep,char *Name)
{
MyDepthProgress.CreatProgress(*sdep,*edep,Name);
}
bool SETDEPTH(float *dep)
{
return MyDepthProgress.SetDepth(*dep);
}
bool CHECKCANCLE()
{
return MyDepthProgress.CheckCancle();
}
void DELPRG()
{
MyDepthProgress.DelProgress();
}
void SETSHOWNAME(char * Name)
{
MyDepthProgress.SetShowName(Name);
}
/////////////////////////////////////////
void DICREATEPRG(float *sdep,float *edep,char *Name,int *Index)
{
if(Index) MyDiDepthProgress.CreatProgress(*sdep,*edep,Name,*Index);
else MyDiDepthProgress.CreatProgress(*sdep,*edep,Name,0);
}
bool DISETDEPTH(float *dep,int *Index)
{
if(Index) MyDiDepthProgress.SetDepth(*dep,*Index);
return MyDiDepthProgress.SetDepth(*dep,0);
}
bool DICHECKCANCLE()
{
return MyDiDepthProgress.CheckCancle();
}
void DIDELPRG(int *Index)
{
if(Index)MyDiDepthProgress.DelProgress(*Index);
else MyDiDepthProgress.DelProgress(0);
}
void DISETSHOWNAME(char * Name,int *Index)
{
if(Index)MyDiDepthProgress.SetShowName(Name,*Index);
else MyDiDepthProgress.SetShowName(Name,0);
}
void GETPAR()
{
MemRdWt.Const();
}
void INDATA()
{
MemRdWt.In();
}
void OUTDATA()
{
MemRdWt.Out();
}
//void GETDIR(char *str)
//{
// DWORD dd=GetModuleFileName(NULL,str,MAX_PATH);
// for(int i=strlen(str)-1;i>0;i--)
// {
// if(str[i]=='\\') {
// str[i]='\0';
// break;
// }
// }
//}