Error CS1026, CryptoDesktop.dll

Discussion in 'Questions (Windows Mobile)' started by Standa, May 6, 2008.

  1. Standa

    Standa Member Licensed User

    Hi,
    I write little crypting software using Erel's crypto example. Application works good from IDE on desktop and on device too. Non-optimized compilation is without mistake too, but when I try optimized compiling, it ends with error CS1026 in this line: Do While(true)

    Piece of example code:
    Code:
    Do While(true)
          data() = Crypto.Decrypt(PassPhrase,secret())
          writer.WriteBytes(data())
          
    If reader.Position = reader.Length Then Exit
          c = reader.ReadInt32 
    'Read the next packet length.
          If ArrayLen(secret()) <> c Then
             
    Dim secret(c) As Byte
          
    End If
          reader.ReadBytes(secret(),c)
       
    Loop
    Anybody knows, where is a problem?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You should change it to:
    Code:
    Do While true
    ...
     
  3. Standa

    Standa Member Licensed User

    Yes, that's it! Thanks :)

    And I have similar problem with optimized compiler: error CS1002 and code Form1.Height=640. Do you have some advice?

    Are these problems described anywhere on this sites?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    'Form1.Height=640' is correct.
    The optimized compiler should behave like the IDE.
    If it doesn't do so then it is a bug.
    The 'While (true)' will be fixed in the next version (after 6.30 probably).
     
  5. Standa

    Standa Member Licensed User

    I wrote simple application:
    Code:
    Sub App_Start
       Form1.Show
       Form1.Height=
    240
    End Sub
    Run from IDE and non-optimized compiling is ok, but optimized compiling shows this error CS1002.
    If this is bug, not my mistake, I will wait for next release :)
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Sorry for the confusion.
    You can't set the height of a Form control.
    You can only read this value.
     
  7. Standa

    Standa Member Licensed User

    Yes, I am still newbie, thanks :)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice