Convert some functions from C++ to VB.NET 2.0 Code

已完成 已发布的 Oct 27, 2008 货到付款
已完成 货到付款

Convert approx. 20 C++ functions to VB.NET 2.0 functions.

Please only c++ people apply only.? You will need to understand how byte arrays work in c++.? When bidding on this request, please answer these 2 simple? questions to show your understanding of c++ code:

Test QUESTION #1:? in this example below, what does the d+2 and d+5 mean in this c++ code?? ? Please tell me the answer, show me that you can actually read this c++ code..? if you can not understand and answer this question, then this task is not for you.

Test QUESTION #2:? in this example below what would the vb.net data type declaration and bref or byval you would use for this parameter: unsigned char* data?

example code:

bool ecu::write_cmd(

? unsigned char cmd,

? unsigned int addr,

? unsigned char* data,

? unsigned int datalen)

{

? unsigned char d[264];

? if (datalen > 255)

? ? return false;

? d[0] = cmd_extended;? //= 0x3A;

? d[1] = datalen;

? int16_to_byte(d+2,addr & 0xFFFF,true);

? d[4] = cmd;

? memcpy(d+5,data,datalen);

? d[datalen+5] = (0x100 - (checksum32(d+1,datalen+4,1,true) & 0xFF)) & 0xFF;

? if (!ser->write_echocheck(d,datalen+6))

? ? return false;

? return ser->read_match_byte(mitsu_rsp_ok);

}

void int16_to_byte(unsigned char* data,int i, bool littleEndian)

{

? if (littleEndian)

? {

? ? data[0] = i >> 8;

? ? data[1] = i & 0xFF;

? }

? else

? {

? ? data[1] = i >> 8;

? ? data[0] = i & 0xFF;

? }

}

.NET C 编程 工程 微软 MySQL PHP 软件构架 软件测试 Visual Basic 视窗桌面

项目ID: #3343950

关于项目

8个方案 远程项目 活跃的Oct 28, 2008

授予:

xorand

See private message.

$85 USD 在27天内
(2条评论)
2.4

有8名威客正在参与此工作的竞标,均价$85/小时

jacobdd1

See private message.

$85 USD 在27天内
(277条评论)
7.1
nigrom

See private message.

$85 USD 在27天内
(26条评论)
5.1
lexican

See private message.

$85 USD 在27天内
(10条评论)
4.7
burhanulhaq

See private message.

$85 USD 在27天内
(48条评论)
4.3
mmraza

See private message.

$85 USD 在27天内
(6条评论)
3.3
lilianli

See private message.

$85 USD 在27天内
(2条评论)
0.7
ahmedalyvw

See private message.

$85 USD 在27天内
(0条评论)
0.0