powerbuilder

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nikhilkpm
    New Member
    • Aug 2007
    • 1

    #1

    powerbuilder

    I need help declaring this structure in VB.
    Particularly the bit flags, like fOutxCtsFlow.


    typedef struct _DCB {
    DWORD DCBlength;
    DWORD BaudRate;
    DWORD fBinary:1;
    DWORD fParity:1;
    DWORD fOutxCtsFlow:1;
    DWORD fOutxDsrFlow:1;
    DWORD fDtrControl:2;
    DWORD fDsrSensitivity :1;
    DWORD fTXContinueOnXo ff:1;
    DWORD fOutX: 1;
    DWORD fInX: 1;
    DWORD fErrorChar:1;
    DWORD fNull:1;
    DWORD fRtsControl:2;
    DWORD fAbortOnError:1 ;
    DWORD fDummy2:17;
    WORD wReserved;
    WORD XonLim;
    WORD XoffLim;
    BYTE ByteSize;
    BYTE Parity;
    BYTE StopBits;
    char XonChar;
    char XoffChar;
    char ErrorChar;
    char EofChar;
    char EvtChar;
    WORD wReserved1;
    } DCB;
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    Then I'm going to go ahead and move you over to our 'Visual Basic Forum'.

    (In the future, please make sure you post your question in the relevant forum. Thanks!)

    Comment

    • QVeen72
      Recognized Expert Top Contributor
      • Oct 2006
      • 1445

      #3
      Hi,

      I think, what u r looking at is UDT(User Defined Type)
      U can declare it like this, Always it has to be declared in the Declaration Section of the Code Module (Top of the Code/Form Level) Or in the Bas Module (at the top). Check this :

      [code=vb]
      Public Type EmpDetails
      FirstName As String
      Addr1 As String
      EID As Long
      ESalary As Currency
      End Type
      [/code]

      Whenever, u want To Create a Variable of this Type, u can Dim it:

      Dim MyEmp As EmpDetails

      Assign the Value :
      MyEmp.FirstName ="Veena"

      U can also declare array of this UDT.

      Sorry, if u were not looking for this...

      Regards
      Veena

      Comment

      Working...