Jump to content

AndrewHoward

Members
  • Content Count

    34
  • Joined

  • Last visited

Posts posted by AndrewHoward


  1. Hi,

    What's the equivalent of this code in C# ?

    procedure FetchFromIStream( myStream : TStream ; myIStream : IStream ) ;
    var
       TOS : TOLEStream ;
    begin
       TOS:=TOLEStream.Create(myIStream) ;
       try
          TOS.position:=0 ;
          myStream.position:=0 ;
          myStream.copyFrom(TOS,TOS.Size) ;
          myStream.Position:=0 ;
          TOS.position:=0 ;
        finally
          FreeAndNil(TOS);
       End ;
    end ;

    TIA


  2. Hi,

    I have an application which loads & uses an unmanaged dll. All I have to do is drop the dll it in a specific folder.

    Can I use a .Net  dll instead ? (I know the .Net dll needs to expose the same functions which are in the unmanaged dll)

    Can an unmanaged & managed DLLs  be used interchangeably ?


    Thanks

     


  3. Hello,
    I am receiving data about different holidays in a delimited string e.g:
    Booking number, flight details, package type, etc...

     

    There are serveral holiday types e.g
    Beach holidays
    Ski holidays
    All-inclusive
    City breaks

     

    Most of the holiday types have the same fields but there are some differences, e.g. some holidays don't have fight details.

     

    I would like to create a function to which I pass the delimited string & it returns the object which represents the booked holiday:
    Booking number, flight details, package type
    Booking number, cruise details, package type, pick-up point

     

    Which is the best to achieve this ?

     

    I can create a record which holds all possible fields & return that as a result.  Is there a better way?

    Thank you.


  4. Hi,
    Can anyone recommend a non-visual component for RS232 serial commnuncation ?
    I'm working on a project which sends data over RS232.
    I need to create requests & intercept responses.

    Any RS232 components I can use or good examples I can browse ?
     
    I'm using Delphi XE7.
    My app is to run on Window platform.
    Thank you

×