Is there any reason why this conversion can't be done in the code if you
specify a negative number?

Since there are no such thing as negative port numbers (pseudocode):
  if (port < 0) then
    port = (2^32)-(5900+(port))
  endif

  if (port < 0) then
    port = (2^32)-(5900-abs(port))  # May be more readable
  endif

 Ryan
----- Original Message -----
From: "Jonathan Morton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 30, 2001 2:09 AM
Subject: Re: Changing port number on VNC Server for NT


> >I want to use a low number like 50 or something (I just pulled that out
of
> >the air without consulting my "standard port numbers" list).  Since
that's
> >less than 5999, can I just use "50" as the registry value or should I use
> >(2^32)-5850 = 4,294,961,446?
>
> For everything under 100, you have to use the formula (otherwise it gets
> interpreted as a display number and VNC adds 5900 to it).  For ports >=
100
> yoou should just be able to use the raw port number.
>
> I wonder when AT&T will take ChromiVNC's lead and build a proper GUI into
> WinVNC for setting this fundamental attribute.  ChromiVNC allows the user
> to set either the display number or port number, and automatically
displays
> changes to one caused by changes to the other.  It also supports negative
> numbers correctly.  What's more, this feature was introduced way back in
> alpha-1, which I released sometime last year...
>
> Come to that, WinVNC's GUI leaves a lot to be desired in other areas as
> well.  If I was *at all* interested in Win32 programming, I'd whip up a
> separate GUI which could set up the Registry entries and could control the
> WinVNC application and/or service.  Maybe someone else would like to do
> that - I think VB should be "powerful" enough to handle this simple task.
>
> --------------------------------------------------------------
> from:     Jonathan "Chromatix" Morton
> mail:     [EMAIL PROTECTED]  (not for attachments)
> big-mail: [EMAIL PROTECTED]
> uni-mail: [EMAIL PROTECTED]
>
> The key to knowledge is not to rely on people to teach you it.
>
> Get VNC Server for Macintosh from http://www.chromatix.uklinux.net/vnc/
>
> -----BEGIN GEEK CODE BLOCK-----
> Version 3.12
> GCS$/E/S dpu(!) s:- a20 C+++ UL++ P L+++ E W+ N- o? K? w--- O-- M++$ V? PS
> PE- Y+ PGP++ t- 5- X- R !tv b++ DI+++ D G e+ h+ r++ y+(*)
> -----END GEEK CODE BLOCK-----
> ---------------------------------------------------------------------
> To unsubscribe, send a message with the line: unsubscribe vnc-list
> to [EMAIL PROTECTED]
> See also: http://www.uk.research.att.com/vnc/intouch.html
> ---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to [EMAIL PROTECTED]
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------

Reply via email to