随便写了下,应该就这样吧..
有错误请指出...
static void MYFUNCTION(ref byte pcs, ref short pwd, int len, ref byte bypmo)
{
int i;
if (pcs == 0 || pwd == 0 || len <= 0) return;
for (i = 0; i < len; i++, pcs++, pwd++)
{
pwd = (short)(((pcs - 128) << bypmo));
}
return;
}
有错误请指出...
static void MYFUNCTION(ref byte pcs, ref short pwd, int len, ref byte bypmo)
{
int i;
if (pcs == 0 || pwd == 0 || len <= 0) return;
for (i = 0; i < len; i++, pcs++, pwd++)
{
pwd = (short)(((pcs - 128) << bypmo));
}
return;
}
{
int i;
if (pcs.Length == 0 ¦ ¦ pwd.Length == 0 ¦ ¦ len <= 0) return;
for (i = 0; i < len; i++)
{
pwd[i] = (short)(((pcs[i]-128) << bypmo));
}
return;
}
unsigned char *pcs --> byte[] pcs
short * pwd ---> ref short[] pwd
unsigned char byPmo ---> byte bypmo
==================================================================
博客空间:http://blog.csdn.net/lovingkiss
资源下载:http://download.csdn.net/user/lovingkiss
Email:loving-kiss@163.com
优惠接单开发,组件控件定制开发,成品源代码批发
联系方式:Q66840199 全天在线
==================================================================