Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7824831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:43:46+00:00 2026-06-02T08:43:46+00:00

I am trying to use some VB6 code in a .net app. It uses

  • 0

I am trying to use some VB6 code in a .net app. It uses a function AscB which is no longer availiable. What would I need to use in .net?

Extract of how the function is used (function in third line from end)….

' Combine each block of 4 bytes (ascii code of character) into one long
' value and store in the message. The high-order (most significant) bit of
' each byte is listed first. However, the low-order (least significant) byte
' is given first in each word.
lBytePosition = 0
lByteCount = 0
Do Until lByteCount >= lMessageLength
    ' Each word is 4 bytes
    lWordCount = lByteCount \ BYTES_TO_A_WORD

    ' The bytes are put in the word from the right most edge
    lBytePosition = (lByteCount Mod BYTES_TO_A_WORD) * BITS_TO_A_BYTE
    lWordArray(lWordCount) = lWordArray(lWordCount) Or _
        LShift(AscB(Mid(sMessage, lByteCount + 1, 1)), lBytePosition)
    lByteCount = lByteCount + 1
Loop

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T08:43:50+00:00Added an answer on June 2, 2026 at 8:43 am

    Gent, many thanks for your replies… The code I had was part of an MD5 encryption class written in VB6. Over the weekend I came across a .net class I was unaware of… System.Security.Cryptography which gave me the encryption I needed in 5 lines of code instead of the 100+ lines of VB6 code. Many thanks for your efforts.

    BTW both your answers worked. Albeit I needed to tweak the VB6 code a bit more.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to convert some old VB6 code to VB.NET. The VB6 uses
I am trying to use some pinvoke code to call a C function. The
I am trying to use some rails code withing a javascript and need to
I'm trying to use some off-the-shelf PHP code in RHEL5 which requires the sqlite
I'm trying to use some jQuery code for Ajax which works well in Firefox
I am trying to use some external Framework in my iPhone app. I did
I am trying to use some sample code and my compiler won't compile this
I have a VB6 App that uses a .Net component (via a .tlb reference
I am trying to use some C++ classes in my Objective-C code for an
I am trying to use some LLVM API in my C++ code, and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.