在特定水域
捕到下列
几种鱼要在licence上记录下来:
*steelhead硬头鳟(Kootenay库特奈湖 或者 Shuswap 舒斯韦普湖)
*成年Chinook salmon切努克鲑鱼(Kootenay湖 或者 Shuswap湖)
*超过半米的rainbow trout虹鳟鱼(Kootenay湖 或者 Shuswap湖)
*超过60cm的Char红点鲑鱼(Shuswap湖)
Saturday, July 18, 2015
Monday, July 13, 2015
_vbaRedim vbaRedim
__cdecl SAFEARRAY*
__vbaRedim(arg0__Flags_HAVEVARTYPE,arg4__SizeOfVbLong_4,arg8__ppSAFEARRAY_40D060,argC__VARTYPE_vbLong,arg10__cDims_1,
arg14__Dim0High,arg18__Dim0Low,...DimNHigh,DimNLow,...)
{
sub_660DAEFA(
arg0__Flags_HAVEVARTYPE,
arg4__SizeOfVbLong_4,
argC__VARTYPE_vbLong,
arg10__cDims_1,
&LowHighBounds,
arg8__ppSAFEARRAY_40D060);
return *arg8__ppSAFEARRAY_40D060;
}
void __stdcall
sub_660DAEFA(arg0__Flags_HAVEVARTYPE, arg4__SizeOfVbLong_4, arg8__VARTYPE_vbLong, argC__cDims_1, arg10__LowHighBounds, arg14_ppSAFEARRAY)
{
//loc_660DAFEA
SafeArrayAllocDescriptorEx(arg8__VARTYPE_vbLong,argC__cDims_1,arg14_ppSAFEARRAY);
pSAFEARRAY->fFeatures = arg0__Flags_HAVEVARTYPE;
pSAFEARRAY->cbElement = arg4__SizeOfVbLong_4;
arg4__SizeOfVbLong_4=0;
arg8__VARTYPE_vbLong = &pSAFEARRAY->lLbound;//The lower bound of the dimension.
for(iDim=0;iDim<cDims;++iDim)
{
pSAFEARRAY->rgsabound[iDim].cElements = arg10__LowHighBounds[iDim].High - arg10__LowHighBounds[iDim].Low + 1;
pSAFEARRAY->rgsabound[iDim].lLbound = arg10__LowHighBounds[iDim].Low;
}
pSAFEARRAY->pvData = SafeArrayAllocData(pSAFEARRAY);
}
HRESULT SafeArrayAllocDescriptorEx(arg0__VARTYPE_vbLong,arg4__cDims_1,arg8_ppSAFEARRAY)
{
val = (VAL*)new BYTE[0x10+sizeof(SAFEARRAY)+sizeof(SAFEARRAYBOUND)*arg4__cDims_1];
SAFEARRAY* pSAFEARRAY = val + 1;
memset(val,0);
val->Type = arg0__VARTYPE_vbLong;//
pSAFEARRAY->cDims = arg4__cDims_1;
pSAFEARRAY->fFeatures = FADF_HAVEVARTYPE;
*arg8_ppSAFEARRAY = pSAFEARRAY;
return 0;
}
__vbaRedim(arg0__Flags_HAVEVARTYPE,arg4__SizeOfVbLong_4,arg8__ppSAFEARRAY_40D060,argC__VARTYPE_vbLong,arg10__cDims_1,
arg14__Dim0High,arg18__Dim0Low,...DimNHigh,DimNLow,...)
{
sub_660DAEFA(
arg0__Flags_HAVEVARTYPE,
arg4__SizeOfVbLong_4,
argC__VARTYPE_vbLong,
arg10__cDims_1,
&LowHighBounds,
arg8__ppSAFEARRAY_40D060);
return *arg8__ppSAFEARRAY_40D060;
}
void __stdcall
sub_660DAEFA(arg0__Flags_HAVEVARTYPE, arg4__SizeOfVbLong_4, arg8__VARTYPE_vbLong, argC__cDims_1, arg10__LowHighBounds, arg14_ppSAFEARRAY)
{
//loc_660DAFEA
SafeArrayAllocDescriptorEx(arg8__VARTYPE_vbLong,argC__cDims_1,arg14_ppSAFEARRAY);
pSAFEARRAY->fFeatures = arg0__Flags_HAVEVARTYPE;
pSAFEARRAY->cbElement = arg4__SizeOfVbLong_4;
arg4__SizeOfVbLong_4=0;
arg8__VARTYPE_vbLong = &pSAFEARRAY->lLbound;//The lower bound of the dimension.
for(iDim=0;iDim<cDims;++iDim)
{
pSAFEARRAY->rgsabound[iDim].cElements = arg10__LowHighBounds[iDim].High - arg10__LowHighBounds[iDim].Low + 1;
pSAFEARRAY->rgsabound[iDim].lLbound = arg10__LowHighBounds[iDim].Low;
}
pSAFEARRAY->pvData = SafeArrayAllocData(pSAFEARRAY);
}
HRESULT SafeArrayAllocDescriptorEx(arg0__VARTYPE_vbLong,arg4__cDims_1,arg8_ppSAFEARRAY)
{
val = (VAL*)new BYTE[0x10+sizeof(SAFEARRAY)+sizeof(SAFEARRAYBOUND)*arg4__cDims_1];
SAFEARRAY* pSAFEARRAY = val + 1;
memset(val,0);
val->Type = arg0__VARTYPE_vbLong;//
pSAFEARRAY->cDims = arg4__cDims_1;
pSAFEARRAY->fFeatures = FADF_HAVEVARTYPE;
*arg8_ppSAFEARRAY = pSAFEARRAY;
return 0;
}
Friday, July 10, 2015
open VS fopen VS fdopen
open will return a filedes(int), while fopen and fdopen return a FILE*.
#include <fcntl.h>
#include <stdio.h>
int main(void)
{
char pathname[] = "/tmp/myfile";
int filedes;
FILE *fp;
if ((filedes = open(pathname, O_RDONLY)) == -1) {
printf("open error for %s\n", pathname);
return 1;
}
if ((fp=fdopen(filedes, "r")) == NULL) {
printf("fdopen error for %s\n", pathname);
} else {
printf("fdopen seccess for %s\n", pathname);
fclose(fp);
}
return 0;
}
#include <fcntl.h>
#include <stdio.h>
int main(void)
{
char pathname[] = "/tmp/myfile";
int filedes;
FILE *fp;
if ((filedes = open(pathname, O_RDONLY)) == -1) {
printf("open error for %s\n", pathname);
return 1;
}
if ((fp=fdopen(filedes, "r")) == NULL) {
printf("fdopen error for %s\n", pathname);
} else {
printf("fdopen seccess for %s\n", pathname);
fclose(fp);
}
return 0;
}
Sunday, July 5, 2015
Thursday, June 25, 2015
Thursday, May 23, 2013
cygwin如何编译不依赖cygwin1.dll的程序
g++ -o /cygdrive/d/temp/client.exe /cygdrive/d/temp/main.cpp -mno-cygwin
g++: The -mno-cygwin flag has been removed; use a mingw-targeted cross-compiler.
网上有人建议用i686-pc-cygwin-gcc/++-4.exe替换g++,我试了一下,还是一样的错误。
目前有个折中的方案,就是采用g++3而非4,于是运行/usr/bin/set-gcc-default-3.sh然后再编译,OK,通过。
g++: The -mno-cygwin flag has been removed; use a mingw-targeted cross-compiler.
网上有人建议用i686-pc-cygwin-gcc/++-4.exe替换g++,我试了一下,还是一样的错误。
目前有个折中的方案,就是采用g++3而非4,于是运行/usr/bin/set-gcc-default-3.sh然后再编译,OK,通过。
Subscribe to:
Posts (Atom)