PC Review


Reply
Thread Tools Rate Thread

Amazing failures in C# ???

 
 
schaf
Guest
Posts: n/a
 
      21st Jul 2006
Hi NG !
In my application I have some amazing failures detected. Maybe you can
help to solve my confusion.

1.) Why the following code does not return the same result ?
Dns.GetHostName(); \\PCname
and
ns.GetHostByAddress(<LocalIPAddress>).HostName; \\PCname inclusive the
domain

2.) I copy files from dir DirA to dir DirB. The file DirA\FileA has a
hidden flag, the file DirA\FileB not. On the DirB I set a read-only
flag for all files (FileA and FileB) after the copy process.
Now if I do the same once again, I have to remove the read-only flag on
DirB\FileA and DirB\FileB to ensure a successful copy process. Ok no
problem, now I have the same situation on the DirB (DirB\FileA with
hidden and read-only flag; DirB\FileB with a read-only flag).
Now I set the hidden flag on DirB\FileB (manually).
If I start the same copy process (which removes the read-only flag of
all DirB files) it will crash because of the File DirB\FileB. In the
code the read-only flag would be removed, but it is not possible the
override the file ! Why it is possible to override a file with hidden
flag, if it was set before the copy process and why it is not possible
when i change the flag by hand ?
(Both files have the same fileAttributes set (35 => Archive, Hidden,
Readonly) before removing the readonly flag and also after (34 =>
Archive, Hidden), but overriden the file DirB\FileB is not possible)
????

3.) My Gui looks very good on my computer, but if the same application
runs on another computer, the texts of the listboxes would not be shown
! Why ?

Thanks for hints
Marcel

 
Reply With Quote
 
 
 
 
Barry Kelly
Guest
Posts: n/a
 
      21st Jul 2006
"schaf" <(E-Mail Removed)> wrote:

> 1.) Why the following code does not return the same result ?
> Dns.GetHostName(); \\PCname
> and
> ns.GetHostByAddress(<LocalIPAddress>).HostName; \\PCname inclusive the
> domain


Because they are different methods? GetHostByAddress / GetHostEntry use
a DNS server. The machine may be multi-homed (i.e. have multiple IP
addresses) each with a different domain; it may have aliases etc.

GetHostName() can only return one value.

> 2.) I copy files from dir DirA to dir DirB.


You should write a small sample program that demonstrates this behaviour
and repost in a separate topic - it's too hard to follow, IMHO.

> 3.) My Gui looks very good on my computer, but if the same application
> runs on another computer, the texts of the listboxes would not be shown


Ditto - more details needed, reproduction code so people can test.

-- Barry

--
http://barrkel.blogspot.com/
 
Reply With Quote
 
William Stacey [MVP]
Guest
Posts: n/a
 
      21st Jul 2006
| 3.) My Gui looks very good on my computer, but if the same application
| runs on another computer, the texts of the listboxes would not be shown
| ! Why ?

Change your graphic resolution to be the same as the other computer. Does
you see the same issue? If so, you need to adjust your app to also look
right with lower resolutions.
--
wjs


 
Reply With Quote
 
Thomas T. Veldhouse
Guest
Posts: n/a
 
      21st Jul 2006
schaf <(E-Mail Removed)> wrote:
> Hi NG !
> In my application I have some amazing failures detected. Maybe you can
> help to solve my confusion.
>
> 1.) Why the following code does not return the same result ?
> Dns.GetHostName(); \\PCname
> and
> ns.GetHostByAddress(<LocalIPAddress>).HostName; \\PCname inclusive the
> domain
>


The former probably uses a local lookup to get the hostname and the latter
probably goes to the DNS server to get that information. The former is
usually assigned by DHCP, which the latter is configured in DNS.

> 2.) I copy files from dir DirA to dir DirB. The file DirA\FileA has a


<skipping this one -- you are hurting my brain .. how about sample code?>

>
> 3.) My Gui looks very good on my computer, but if the same application
> runs on another computer, the texts of the listboxes would not be shown


Sample code please? There could be 100 different reasons, depending upon how
that text gets there, what locality is setup, etc.

--
Thomas T. Veldhouse
Key Fingerprint: 2DB9 813F F510 82C2 E1AE 34D0 D69D 1EDC D5EC AED1

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Blank windows/Print failures/Search failures Ian Windows XP Internet Explorer 5 21st Jun 2009 10:17 PM
This is really amazing... s.becker Microsoft Access 0 15th Sep 2003 01:05 AM
This is really amazing... s.becker Microsoft Access 0 15th Sep 2003 12:23 AM
This is really amazing... s.becker Microsoft Access 0 15th Sep 2003 12:22 AM
This is really amazing... s.becker Microsoft Access 0 15th Sep 2003 12:22 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:53 AM.