Welcome, Guest. Please login or register.

Author Topic: ReadArgs() problem.  (Read 1521 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: ReadArgs() problem.
« on: July 20, 2003, 03:31:25 AM »
Quote
printf("Device name length chosen: %d\n", (LONG *)arguments[0]);

/N are *pointer* to LONG value, not LONG itself, or else there would be no way to enter 0.

So, to make it work, reference the pointer (with '*'):

printf("Device name length chosen: %d\n", *(LONG *)arguments[0]);

Or to make it more readable:

LONG *longptr;

longptr = (LONG *) arguments[0];
printf("Device name length chosen: %d\n", *longptr);