Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

DwR

@DwR
About
Posts
26
Topics
15
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Legacy Windows App - Screen Scraping
    D DwR

    That's scraping of web pages rather than a Windows gui.

    Regards, Dave

    C# csharp question

  • Legacy Windows App - Screen Scraping
    D DwR

    Hi, I have a need to screen scrape a legacy windows application. Can anyone give me some pointers as to how this can be done with C# .Net? All guidance offered will be warmly appreciated.

    Regards, Dave

    C# csharp question

  • System.InvalidCastException Query
    D DwR

    Hi, I see there's no reply to this. Do I need to provide more information?

    Regards, Dave

    C# help question csharp database com

  • System.InvalidCastException Query
    D DwR

    Hi, I am passing a VBScript Object to a C# assembly and am getting the following error output: "Unable to cast COM object of type 'Agents.AgentClass' to interface type 'Agents._Agent'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{315DF678-45D7-4A60-9A50-C9E83672A5E5}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))." I'd appreciate it if someone can explain what is going on here and how I can fix it? I am confused... Note: I have tried changing the method header to accept type Agents._Agent but that causing the method call in vbscript to fail completely. Changing the type to Agents.Agent (another available type) generates a similar error. Kind Regards, Dave

    Regards, Dave

    C# help question csharp database com

  • Interrogating objects passed from COM
    D DwR

    Hi, I'm just beginning work on an assembly which, amongst other things, will perform some transformations and other operations on objects passed from COM. I've created a stub assembly to receive these objects to see what they look like in the debugger. However, because they're passed as "Object" I am not able to see any of their methods or properties. Can someone advise me on how I can get a view of the methods and properties of these objects so that I can better understand what I'm dealing with? All help and advice will be warmly received. Kind Regards, Dave

    Regards, Dave

    C# com debugging help question

  • Class inference
    D DwR

    Hi, I need to determine the parent class from which a particular subclass is derived. Could someone kindly explain to me how I can access that information please? Regards, Dave

    Regards, Dave

    C# question

  • Framework Reference not found
    D DwR

    I'm using .Net 3.5 so it should be there. I'm wondering whether there's something about my project config that's getting in the way that I'm not aware of. Target framework is marked as 3.5 but perhaps there's more I need to consider...

    Regards, Dave

    .NET (Core and Framework) csharp question

  • Is it possible to add plugin/add-in to Visual Studio 2008 IDE for a Java based application?
    D DwR

    Take a look at www.ikvm.net. That might help though i expect the newness of the java release will cause issues.

    Regards, Dave

    .NET (Core and Framework) visual-studio csharp java question

  • Framework Reference not found
    D DwR

    Hi, I'm tryig to add a project reference to Microsoft.ServiceModel.Channels.dll, specifically to access the UnSupportedOperationException exception class. However, I can't see it in the list of .Net references. I'm surprised not to find this dll in the frameowrk list. Can someone explain what I should be referencing in order to access UnSupportedOperatinException?

    Regards, Dave

    .NET (Core and Framework) csharp question

  • CharArrayReader
    D DwR

    Hi, Could anyone tell me whether there is a C# equivalent of the java CharArrayBuilder class? Regards, Dave

    Regards, Dave

    C# csharp java question

  • ObjectOutput/Input Interfaces
    D DwR

    Hi, Can anyone direct me to the C# equivalent of the ObjectOutput and ObjectInput interfaces in java?

    Regards, Dave

    C# csharp java question

  • identityHashCode
    D DwR

    That's "an" answer but I don't think it's "the" answer. The rason is that some objects override their base hashcode. And in this case it's the base hashcode that's needed. That's what the Java class returns, if I understand it corrctly. Regards, Dave

    Regards, Dave

    C# csharp java question

  • identityHashCode
    D DwR

    Hi, Does anyone know of a direct C# equivalent, or implementation, of java's System.identiyHashCode method? Regards, Dave

    Regards, Dave

    C# csharp java question

  • Java networking Code - conversion to C#
    D DwR

    As I'm not a java developer what is your interpretation of what that block of code is doing? That's one the problems I have. I'm trying to convert the code without being able to interactively debug it to see what it does.

    Regards, Dave

    C# csharp java sysadmin question

  • Java networking Code - conversion to C#
    D DwR

    Hi All, I've beenconverting some java classes to C# and am getting buffeted by headwinds with the network code conversion. Here is a block of code that has me at a loss for now:

        try {
            Enumeration; interfaces = NetworkInterface.getNetworkInterfaces();
            while (interfaces.hasMoreElements()) {
                Enumeration addresses = interfaces.nextElement().getInetAddresses();
                while (addresses.hasMoreElements()) {
                    InetAddress addr = addresses.nextElement();
                    if (!addr.isLoopbackAddress()) {
                        address = addr.getAddress();
                    }
                }
            }
        }
    

    I've interpreted the statement:

    Enumeration<NetworkInterface>; interfaces = NetworkInterface.getNetworkInterfaces();

    as:

    NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces();

    ...which return a list of network interfaces on the host. However, the statement:

    Enumeration<InetAddress> addresses = interfaces.nextElement().getInetAddresses();

    ...is giving me more trouble. I know the type that I want to create (IPHostEntry - I believe that's correct) but I can see no way to identify the IP Addresses associated with a given network interface (when the host is multi-homed). The C# classes that I have seen all seem to generically assume that the host has 1 interface which may have more than 1 IP Address. So my questions is, in a nutshell, if a host has multiple network interfaces how does one identify the ip addresses associated with each interface? All suggestions warmly welcomed...

    Regards, Dave

    C# csharp java sysadmin question

  • C# Raw IP Address
    D DwR

    Hi, I think I've resolved this. By setting the type as IPAddress the member "GetAddressBytes" can be used to convert the address to bytes matching the type of the variable "address". Thanks for your tip, it pointed me in the right directions. That said, I've hit another problem which seems to be a bit trickier. I need to determine the IP addresses associated with the network interfaces of the multi-homed host the code is running on. I am capturing the available interfaces as follows: NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces(); I then want to loop through the entries and for each one load it's associated IP Addresses into an IPHostEntry instance (or similar). However, I don't see any way to determine the list of ip addresses associated with a particular network interface returned by the foreach loop as it iterates through "interfaces". How is this done?

    Regards, Dave

    C# csharp java question

  • C# Raw IP Address
    D DwR

    Hi, Thanks for that. A couple of questions / observations: 1. The C# documentation refers to the resolve method as being obsolete. 2. The java type of "address" is byte[]. The method returns a "raw" ip address. The C# equivalents, including Dns.resolve return an IPAddress[] type which i assume isn't raw. Can C# return raw addresses? I assume the type to use is c# byte[]... Additionally, I'm unclear as to what the java documentation means by a raw ip address. Can you clarify? I'm expecting that it means that I the IPAddress[] type is not the correct type for this operation.

    Regards, Dave

    C# csharp java question

  • C# Raw IP Address
    D DwR

    Hi, Can anyone tell me the C# equivalent ofthe following java code? address = InetAddress.getLocalHost().getAddress(); I've not done anything with networking in C# before but from an admittedly quick inspection it does appear that the java implementation makes more intuitive sense. I'd say it's more feature rich too but I haven't ben able to make complete sense yet of what C# has to offer. Regards, Dave

    Regards, Dave

    C# csharp java question

  • C# vs Java Exception messages
    D DwR

    Hi, I'm working to convert some java code to C#. I'm struggling to determine what is the equivalent C# statement to the Java "UnknownHostException". Can anyone point me in the right direction?

    Regards, Dave

    C# question csharp java visual-studio

  • Applied Application Development - Book recommendation sought [modified]
    D DwR

    Hmmn. Does the lack of replies mean that this type of resource doesn't exist?

    Regards, Dave

    C# help csharp design question learning
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups